@thinkingai/ae-cli 6.1.19 → 6.1.21
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 +96 -38
- package/README.zh.md +96 -38
- package/dist/{auth-QPEVVBKT.js → auth-XZNXFRJS.js} +236 -127
- package/dist/{capability-ASI62I4A.js → capability-FYTU3X6L.js} +80 -37
- package/dist/{chunk-QL6R6TSK.js → chunk-4NRCTUZJ.js} +27045 -477
- package/dist/{chunk-JYMGHGCE.js → chunk-57RRFUEZ.js} +42 -15
- package/dist/chunk-6ZIQV5GW.js +26 -0
- package/dist/{chunk-KZ6ZHF5J.js → chunk-7FTTULED.js} +14 -14
- package/dist/chunk-7XGFSUOM.js +623 -0
- package/dist/chunk-CCS66K4K.js +155 -0
- package/dist/{chunk-B5HMQAOM.js → chunk-DVMLWQD4.js} +8 -186
- package/dist/{chunk-KEWVSO64.js → chunk-DX5CDO34.js} +28 -18
- package/dist/chunk-EQ255HKO.js +38248 -0
- package/dist/{chunk-6QK7SYYY.js → chunk-HBGADCKA.js} +29 -37
- package/dist/{chunk-GJXRF7Y6.js → chunk-HFGZGYCG.js} +54 -81
- package/dist/chunk-JOCDD4ON.js +15 -0
- package/dist/{chunk-TKHSULJT.js → chunk-KPQY44JQ.js} +6 -0
- package/dist/{chunk-FR2EDAQM.js → chunk-MAPZ7VB6.js} +90 -2
- package/dist/chunk-V2NUHPXF.js +196 -0
- package/dist/{chunk-S5PONFBM.js → chunk-VYXXOKYS.js} +9 -9
- package/dist/{community-report-client-6OL6GBQW.js → community-report-client-CU22W53K.js} +2 -4
- package/dist/{config-XNMACCKX.js → config-XO3LI3SA.js} +8 -9
- package/dist/context-IFJI3LIT.js +46 -0
- package/dist/{data-integration-4NZGZ45E.js → data-integration-HNGUKFIC.js} +55 -44
- package/dist/index.js +122 -112
- package/dist/{local-data-upload-client-EFHDLXFG.js → local-data-upload-client-GTRIT64F.js} +4 -5
- package/dist/{memory-HBJQ2GC5.js → memory-QGPSNCQS.js} +4 -6
- package/dist/{metadata-62EWBEIG.js → metadata-DI5BMYFU.js} +8 -10
- package/dist/{model-BHLJ2QMT.js → model-RNPQXIBI.js} +4 -6
- package/dist/{personal-semantic-preference-JBVMAI7L.js → personal-semantic-preference-5C3WUXFI.js} +11 -10
- package/dist/{project-semantic-BQ4MPUS5.js → project-semantic-3LF6Q6JZ.js} +29 -25
- package/dist/{sync-MUWPRM5I.js → sync-O45NXEQY.js} +7 -8
- package/dist/{te-agent-WQZTMEK4.js → te-agent-K5MSPNHJ.js} +393 -90
- package/dist/{te-analysis-MNCG65LU.js → te-analysis-AISWCOOZ.js} +1175 -377
- package/dist/{te-community-BNE6KREL.js → te-community-4OYU3BDA.js} +10 -33
- package/dist/{te-dataops-TXLKM2W6.js → te-dataops-NFIPB6FX.js} +19 -20
- package/dist/{te-engage-TPKLRVTL.js → te-engage-BAM3GBFX.js} +13 -15
- package/dist/{te-experiment-6BYKTCY7.js → te-experiment-GUTZXZ5Z.js} +132 -16
- package/dist/te-kb-3TS73NO6.js +1992 -0
- package/dist/{te-system-44LZJDTQ.js → te-system-STMHLS5J.js} +12 -9
- package/dist/{te-team-XMP47YXE.js → te-team-3I5AOX3N.js} +6 -8
- package/dist/{update-UODFOZ4P.js → update-RZXLPCRH.js} +7 -8
- package/package.json +29 -19
- package/skills/ae-agent/SKILL.md +30 -13
- package/skills/ae-agent/references/agent-distribution.md +94 -0
- package/skills/ae-agent/references/approval-request.md +4 -0
- package/skills/ae-agent/references/command_index.md +9 -2
- package/skills/ae-agent/references/create-automation.md +20 -2
- package/skills/ae-agent/references/get-agent-context.md +70 -0
- package/skills/ae-agent/references/list-automations.md +18 -3
- package/skills/ae-agent/references/list-mcp-credentials.md +1 -1
- package/skills/ae-agent/references/mcp-token.md +3 -3
- package/skills/ae-agent/references/set-mcp-credential.md +0 -1
- package/skills/ae-agent/references/update-automation.md +18 -0
- package/skills/ae-analysis/SKILL.md +101 -79
- package/skills/ae-analysis/references/adhoc_export.md +11 -18
- package/skills/ae-analysis/references/adhoc_run.md +17 -7
- package/skills/ae-analysis/references/agent_review_detail.md +11 -0
- package/skills/ae-analysis/references/agent_review_evidence.md +46 -0
- package/skills/ae-analysis/references/agent_review_list.md +9 -0
- package/skills/ae-analysis/references/agent_review_preflight.md +96 -0
- package/skills/ae-analysis/references/agent_review_priorities_comparisons.md +76 -0
- package/skills/ae-analysis/references/agent_review_records.md +9 -0
- package/skills/ae-analysis/references/agent_review_retry.md +12 -0
- package/skills/ae-analysis/references/agent_review_review.md +16 -0
- package/skills/ae-analysis/references/agent_review_submit_to_page.md +184 -0
- package/skills/ae-analysis/references/ai_models/attribution.md +29 -0
- package/skills/ae-analysis/references/ai_models/distribution.md +40 -0
- package/skills/ae-analysis/references/ai_models/event.md +108 -0
- package/skills/ae-analysis/references/ai_models/funnel.md +46 -0
- package/skills/ae-analysis/references/ai_models/heat_map.md +26 -0
- package/skills/ae-analysis/references/ai_models/interval.md +20 -0
- package/skills/ae-analysis/references/ai_models/path.md +38 -0
- package/skills/ae-analysis/references/ai_models/prop_analysis.md +39 -0
- package/skills/ae-analysis/references/ai_models/rank_list.md +25 -0
- package/skills/ae-analysis/references/ai_models/retention.md +70 -0
- package/skills/ae-analysis/references/ai_models/revenue.md +28 -0
- package/skills/ae-analysis/references/ai_models/sql.md +74 -0
- package/skills/ae-analysis/references/ai_models/tag.md +19 -0
- package/skills/ae-analysis/references/ai_models.md +32 -453
- package/skills/ae-analysis/references/alert_create.md +7 -7
- package/skills/ae-analysis/references/alert_delete.md +4 -6
- package/skills/ae-analysis/references/alert_detail_list.md +7 -9
- package/skills/ae-analysis/references/alert_get.md +5 -7
- package/skills/ae-analysis/references/alert_job_list.md +4 -6
- package/skills/ae-analysis/references/alert_list.md +6 -8
- package/skills/ae-analysis/references/alert_notice_config_list.md +4 -6
- package/skills/ae-analysis/references/alert_start.md +5 -7
- package/skills/ae-analysis/references/alert_stop.md +5 -7
- package/skills/ae-analysis/references/alert_update.md +8 -8
- package/skills/ae-analysis/references/analysis_data_export.md +72 -0
- package/skills/ae-analysis/references/analysis_data_retrieval.md +32 -196
- package/skills/ae-analysis/references/analysis_gateway_assets.md +23 -180
- package/skills/ae-analysis/references/analysis_interpretation.md +37 -17
- package/skills/ae-analysis/references/asset_abnormal_get.md +0 -1
- package/skills/ae-analysis/references/asset_abnormal_list.md +0 -1
- package/skills/ae-analysis/references/asset_authentication_export.md +4 -0
- package/skills/ae-analysis/references/asset_authentication_list.md +7 -1
- package/skills/ae-analysis/references/asset_authentication_update.md +5 -1
- package/skills/ae-analysis/references/asset_batch_dashboard_schedule_freeze.md +8 -6
- package/skills/ae-analysis/references/asset_batch_delete.md +6 -6
- package/skills/ae-analysis/references/asset_batch_disable_auto_backup.md +4 -5
- package/skills/ae-analysis/references/asset_batch_disable_auto_update.md +5 -6
- package/skills/ae-analysis/references/asset_batch_handover.md +4 -5
- package/skills/ae-analysis/references/asset_batch_info_export.md +4 -5
- package/skills/ae-analysis/references/asset_batch_sql_export.md +5 -6
- package/skills/ae-analysis/references/asset_dependency_list.md +4 -5
- package/skills/ae-analysis/references/asset_export.md +4 -5
- package/skills/ae-analysis/references/asset_impact_list.md +5 -9
- package/skills/ae-analysis/references/asset_lineage_get.md +5 -6
- package/skills/ae-analysis/references/asset_list.md +4 -5
- package/skills/ae-analysis/references/asset_query_history_list.md +4 -8
- package/skills/ae-analysis/references/asset_recent_list.md +0 -1
- package/skills/ae-analysis/references/asset_search.md +12 -9
- package/skills/ae-analysis/references/asset_url_get.md +3 -4
- package/skills/ae-analysis/references/bi_panel_copy.md +2 -2
- package/skills/ae-analysis/references/bi_panel_page_data_export.md +4 -12
- package/skills/ae-analysis/references/bi_panel_page_data_run.md +2 -0
- package/skills/ae-analysis/references/catalog_export.md +4 -17
- package/skills/ae-analysis/references/catalog_list.md +4 -4
- package/skills/ae-analysis/references/check_delete.md +5 -7
- package/skills/ae-analysis/references/check_export.md +11 -11
- package/skills/ae-analysis/references/check_get.md +8 -10
- package/skills/ae-analysis/references/check_list.md +4 -6
- package/skills/ae-analysis/references/check_retry.md +8 -10
- package/skills/ae-analysis/references/check_run.md +2 -4
- package/skills/ae-analysis/references/command_index.md +46 -28
- package/skills/ae-analysis/references/cross_source_config.md +84 -0
- package/skills/ae-analysis/references/dashboard_report_data_export.md +5 -13
- package/skills/ae-analysis/references/dashboard_report_data_run.md +1 -1
- package/skills/ae-analysis/references/dashboard_update.md +15 -4
- package/skills/ae-analysis/references/datatable_columns_get.md +0 -1
- package/skills/ae-analysis/references/datatable_influence_list.md +0 -1
- package/skills/ae-analysis/references/datatable_version_get.md +0 -1
- package/skills/ae-analysis/references/datatable_version_list.md +0 -1
- package/skills/ae-analysis/references/debug_device_add.md +1 -2
- package/skills/ae-analysis/references/drilldown_entities_export.md +3 -3
- package/skills/ae-analysis/references/drilldown_events_export.md +3 -2
- package/skills/ae-analysis/references/drilldown_user_events_export.md +2 -2
- package/skills/ae-analysis/references/entity_detail_export.md +3 -2
- package/skills/ae-analysis/references/entity_detail_run.md +1 -0
- package/skills/ae-analysis/references/event_blacklist_add.md +5 -7
- package/skills/ae-analysis/references/event_blacklist_list.md +4 -6
- package/skills/ae-analysis/references/event_blacklist_update.md +6 -8
- package/skills/ae-analysis/references/event_changelog_list.md +0 -1
- package/skills/ae-analysis/references/event_create.md +0 -1
- package/skills/ae-analysis/references/event_detail_export.md +3 -2
- package/skills/ae-analysis/references/event_detail_run.md +1 -0
- package/skills/ae-analysis/references/event_export.md +0 -1
- package/skills/ae-analysis/references/event_get.md +0 -1
- package/skills/ae-analysis/references/event_hide_update.md +0 -1
- package/skills/ae-analysis/references/event_influence_list.md +0 -1
- package/skills/ae-analysis/references/event_list.md +0 -1
- package/skills/ae-analysis/references/event_property_bundle_export.md +5 -14
- package/skills/ae-analysis/references/event_property_bundle_import.md +2 -6
- package/skills/ae-analysis/references/event_relation_update.md +0 -1
- package/skills/ae-analysis/references/event_update.md +0 -1
- package/skills/ae-analysis/references/exchange_config_update.md +0 -1
- package/skills/ae-analysis/references/exchange_rate_refresh.md +0 -1
- package/skills/ae-analysis/references/exchange_rule_list.md +0 -1
- package/skills/ae-analysis/references/exchange_rule_update.md +0 -1
- package/skills/ae-analysis/references/exchange_rule_validate.md +0 -1
- package/skills/ae-analysis/references/governance_recommendation_decisions.md +23 -0
- package/skills/ae-analysis/references/governance_recommendation_export.md +108 -0
- package/skills/ae-analysis/references/governance_recommendation_submit.md +41 -0
- package/skills/ae-analysis/references/history_tag_data_drilldown_export.md +4 -4
- package/skills/ae-analysis/references/history_tag_data_export.md +3 -3
- package/skills/ae-analysis/references/ingest_error_list.md +7 -9
- package/skills/ae-analysis/references/ingest_summary.md +6 -8
- package/skills/ae-analysis/references/live_data_export.md +10 -10
- package/skills/ae-analysis/references/live_data_list.md +7 -9
- package/skills/ae-analysis/references/metadata_resolution.md +78 -0
- package/skills/ae-analysis/references/metric_export.md +0 -1
- package/skills/ae-analysis/references/metric_get.md +0 -1
- package/skills/ae-analysis/references/metric_list.md +4 -5
- package/skills/ae-analysis/references/metric_update.md +0 -1
- package/skills/ae-analysis/references/operation_record_export.md +4 -5
- package/skills/ae-analysis/references/operation_record_list.md +4 -5
- package/skills/ae-analysis/references/personal_semantic_preference_list.md +18 -1
- package/skills/ae-analysis/references/plan_change_log_export.md +10 -10
- package/skills/ae-analysis/references/plan_change_log_list.md +4 -6
- package/skills/ae-analysis/references/plan_delete_items.md +2 -4
- package/skills/ae-analysis/references/plan_export.md +9 -9
- package/skills/ae-analysis/references/plan_generate.md +2 -4
- package/skills/ae-analysis/references/plan_get.md +4 -6
- package/skills/ae-analysis/references/plan_import_excel.md +6 -8
- package/skills/ae-analysis/references/plan_save_items.md +2 -4
- package/skills/ae-analysis/references/plan_sync_from_meta.md +4 -6
- package/skills/ae-analysis/references/project_access_detail_get.md +0 -1
- package/skills/ae-analysis/references/project_data_power_get.md +0 -1
- package/skills/ae-analysis/references/project_data_power_list.md +0 -1
- package/skills/ae-analysis/references/project_data_power_upsert.md +0 -1
- package/skills/ae-analysis/references/project_entity_create.md +0 -1
- package/skills/ae-analysis/references/project_entity_event_list.md +0 -1
- package/skills/ae-analysis/references/project_entity_get.md +0 -1
- package/skills/ae-analysis/references/project_entity_list.md +0 -1
- package/skills/ae-analysis/references/project_entity_update.md +0 -1
- package/skills/ae-analysis/references/project_function_list.md +0 -1
- package/skills/ae-analysis/references/project_info_get.md +0 -1
- package/skills/ae-analysis/references/project_info_list.md +0 -1
- package/skills/ae-analysis/references/project_info_update.md +0 -1
- package/skills/ae-analysis/references/project_mark_time_create.md +0 -1
- package/skills/ae-analysis/references/project_mark_time_list.md +0 -1
- package/skills/ae-analysis/references/project_mark_time_update.md +0 -1
- package/skills/ae-analysis/references/project_member_add.md +6 -5
- package/skills/ae-analysis/references/project_member_batch_update.md +0 -1
- package/skills/ae-analysis/references/project_member_candidate_list.md +4 -3
- package/skills/ae-analysis/references/project_member_handover_run.md +2 -3
- package/skills/ae-analysis/references/project_member_list.md +0 -1
- package/skills/ae-analysis/references/project_member_receiver_list.md +0 -1
- package/skills/ae-analysis/references/project_member_update.md +0 -1
- package/skills/ae-analysis/references/project_owner_update.md +0 -1
- package/skills/ae-analysis/references/project_permission_binding_list.md +0 -1
- package/skills/ae-analysis/references/project_role_function_list.md +0 -1
- package/skills/ae-analysis/references/project_role_get.md +0 -1
- package/skills/ae-analysis/references/project_role_list.md +0 -1
- package/skills/ae-analysis/references/project_role_upsert.md +32 -2
- package/skills/ae-analysis/references/project_role_user_list.md +0 -1
- package/skills/ae-analysis/references/project_semantic_knowledge_wiki.md +214 -0
- package/skills/ae-analysis/references/project_semantic_knowledge_wiki_plan_schema.md +93 -0
- package/skills/ae-analysis/references/project_timezone_get.md +0 -1
- package/skills/ae-analysis/references/project_timezone_overview.md +0 -1
- package/skills/ae-analysis/references/project_timezone_update.md +0 -1
- package/skills/ae-analysis/references/project_user_id_items_update.md +0 -1
- package/skills/ae-analysis/references/property_changelog_list.md +0 -1
- package/skills/ae-analysis/references/property_create.md +0 -1
- package/skills/ae-analysis/references/property_export.md +0 -1
- package/skills/ae-analysis/references/property_get.md +0 -1
- package/skills/ae-analysis/references/property_hide_update.md +0 -1
- package/skills/ae-analysis/references/property_influence_list.md +0 -1
- package/skills/ae-analysis/references/property_list.md +3 -4
- package/skills/ae-analysis/references/property_related_events.md +0 -1
- package/skills/ae-analysis/references/property_relation_update.md +0 -1
- package/skills/ae-analysis/references/property_update.md +0 -1
- package/skills/ae-analysis/references/report_create.md +4 -2
- package/skills/ae-analysis/references/report_data_export.md +11 -9
- package/skills/ae-analysis/references/report_data_run.md +14 -7
- package/skills/ae-analysis/references/report_get.md +5 -3
- package/skills/ae-analysis/references/report_list.md +2 -0
- package/skills/ae-analysis/references/report_update.md +5 -3
- package/skills/ae-analysis/references/rule_create.md +5 -6
- package/skills/ae-analysis/references/rule_delete.md +5 -5
- package/skills/ae-analysis/references/rule_list.md +3 -4
- package/skills/ae-analysis/references/rule_schema.md +3 -4
- package/skills/ae-analysis/references/rule_update.md +5 -6
- package/skills/ae-analysis/references/sdk_sample_generate.md +2 -4
- package/skills/ae-analysis/references/sql_table_columns.md +1 -1
- package/skills/ae-analysis/references/super_metadata_batch_create.md +1 -1
- package/skills/ae-analysis/references/super_metadata_batch_edit.md +1 -1
- package/skills/ae-analysis/references/system_member_add.md +1 -2
- package/skills/ae-analysis/references/system_member_status_update.md +1 -1
- package/skills/ae-analysis/references/system_ops_alert_contact_list.md +1 -1
- package/skills/ae-analysis/references/system_ops_alert_contact_test.md +0 -1
- package/skills/ae-analysis/references/system_query_monitor_overview.md +3 -3
- package/skills/ae-analysis/references/system_query_task_export.md +4 -14
- package/skills/ae-analysis/references/system_query_task_get.md +1 -1
- package/skills/ae-analysis/references/system_query_task_list.md +5 -6
- package/skills/ae-analysis/references/system_receiver_address_upsert.md +3 -3
- package/skills/ae-analysis/references/system_receiver_detection_get.md +1 -1
- package/skills/ae-analysis/references/system_third_party_login_disable.md +1 -1
- package/skills/ae-analysis/references/system_usage_trend_export.md +3 -12
- package/skills/ae-analysis/references/user_cluster_list.md +1 -1
- package/skills/ae-analysis/references/user_cluster_member_export.md +4 -4
- package/skills/ae-analysis/references/user_tag_create.md +23 -1
- package/skills/ae-analysis/references/user_tag_list.md +1 -1
- package/skills/ae-analysis/references/user_tag_member_export.md +4 -4
- package/skills/ae-analysis/references/user_tag_models.md +9 -1
- package/skills/ae-analysis/references/user_tag_update.md +14 -2
- package/skills/ae-analysis/references/virtual_event_create.md +10 -5
- package/skills/ae-analysis/references/virtual_event_get.md +0 -1
- package/skills/ae-analysis/references/virtual_property_create.md +0 -1
- package/skills/ae-analysis/references/virtual_property_sql_rule_update.md +0 -1
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/build-project-semantic-wiki.mjs +1054 -0
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/company-kb.mjs +112 -0
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-rules.md +30 -0
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/generate-build-ir.mjs +2735 -0
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/package-wiki-source-zip.mjs +376 -0
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/plan-kb-source-sync.mjs +264 -0
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/precompiled-source.mjs +49 -0
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/upload-kb-sources-concurrently.mjs +200 -0
- package/skills/ae-analysis/scripts/read_results.py +197 -0
- package/skills/ae-analysis-global/SKILL.md +1 -1
- package/skills/ae-capability/SKILL.md +1 -1
- package/skills/ae-community/SKILL.md +1 -1
- package/skills/ae-current-context/SKILL.md +53 -0
- package/skills/ae-data-integration/SKILL.md +6 -4
- package/skills/ae-data-integration/references/dimension-routing.md +36 -0
- package/skills/ae-data-integration/references/lark-bitable-source.md +288 -0
- package/skills/ae-data-integration/references/lark-sheet-source.md +130 -0
- package/skills/ae-data-integration/references/local-analysis.md +2 -0
- package/skills/ae-data-integration/references/manual-export-source.md +83 -0
- package/skills/ae-data-integration/references/reuse.md +2 -0
- package/skills/ae-data-integration/references/sink-upload.md +32 -0
- package/skills/ae-data-integration/references/source-inspect.md +1 -1
- package/skills/ae-data-integration/references/tracking-plan.md +5 -2
- package/skills/ae-data-integration/references/transform.md +1 -1
- package/skills/ae-data-integration/references/ue-mapping.md +7 -4
- package/skills/ae-data-integration/references/ue-routing.md +17 -1
- package/skills/ae-data-integration-helper/SKILL.md +5 -5
- package/skills/ae-data-integration-helper/references/android_sdk_faq.md +3 -3
- package/skills/ae-data-integration-helper/references/c_sdk_faq.md +3 -3
- package/skills/ae-data-integration-helper/references/cocoscreator_sdk_faq.md +1 -1
- package/skills/ae-data-integration-helper/references/cpp_server_sdk_faq.md +3 -3
- package/skills/ae-data-integration-helper/references/ios_sdk_faq.md +1 -1
- package/skills/ae-data-integration-helper/references/java_sdk_faq.md +3 -3
- package/skills/ae-data-integration-helper/references/javascript_sdk_faq.md +1 -1
- package/skills/ae-data-integration-helper/references/logbus2_guide.md +1 -1
- package/skills/ae-data-integration-helper/references/logbus2_parser_plugin.md +2 -2
- package/skills/ae-data-integration-helper/references/minigame_sdk_faq.md +2 -2
- package/skills/ae-data-integration-helper/references/miniprogram_sdk_faq.md +1 -1
- package/skills/ae-data-integration-helper/references/python_sdk_faq.md +2 -2
- package/skills/ae-data-integration-helper/references/restful_api_notes.md +2 -2
- package/skills/ae-data-integration-helper/references/sdk_log_guide.md +3 -3
- package/skills/ae-data-integration-helper/references/sdk_usage_notes.md +11 -11
- package/skills/ae-data-integration-helper/references/unity_sdk_faq.md +1 -1
- package/skills/ae-dataops/SKILL.md +1 -1
- package/skills/ae-engage/SKILL.md +4 -3
- package/skills/ae-engage/references/build-task-save-guide.md +3 -0
- package/skills/ae-engage/references/flow-metric-update.md +115 -1
- package/skills/ae-engage/references/save-flow.md +3 -0
- package/skills/ae-engage/references/save-task.md +21 -0
- package/skills/ae-engage/references/task-metric-update.md +151 -0
- package/skills/ae-experiment/SKILL.md +14 -7
- package/skills/ae-experiment/references/save_submit_external_experiment.md +52 -0
- package/skills/ae-experiment-design/SKILL.md +3 -3
- package/skills/ae-experiment-design/references/platform-operations.md +1 -1
- package/skills/ae-experiment-insight/SKILL.md +2 -2
- package/skills/ae-experiment-insight/references/platform-operations.md +1 -1
- package/skills/ae-generate-tracking-code/SKILL.md +2 -1
- package/skills/ae-generate-tracking-code/references/client-sdk-insert.md +1 -1
- package/skills/ae-generate-tracking-code/references/datax-config.md +1 -1
- package/skills/ae-generate-tracking-code/references/logbus-config.md +1 -1
- package/skills/ae-generate-tracking-code/references/modes.md +1 -1
- package/skills/ae-generate-tracking-code/references/server-sdk-insert.md +5 -5
- package/skills/ae-generate-tracking-code/references/snippet-delivery.md +3 -3
- package/skills/ae-generate-tracking-plan/SKILL.md +27 -15
- package/skills/ae-generate-tracking-plan/references/business-dimension-mapping.md +1 -1
- package/skills/ae-generate-tracking-plan/references/te-api.md +1 -0
- package/skills/ae-generate-tracking-plan/references/xlsx-schema.md +3 -2
- package/skills/ae-kb/SKILL.md +147 -37
- package/skills/ae-kb/references/analysis-workflow.md +292 -0
- package/skills/ae-kb/references/query-workflow.md +59 -29
- package/skills/ae-kb/references/source-mutations.md +95 -0
- package/skills/ae-kb/references/versions.md +46 -0
- package/skills/ae-kb-discovery/SKILL.md +5 -1
- package/skills/ae-metadata/SKILL.md +1 -1
- package/skills/ae-migrate-tracking-code/SKILL.md +195 -0
- package/skills/ae-migrate-tracking-code/references/ae-preset-properties.md +76 -0
- package/skills/ae-migrate-tracking-code/references/ir.md +167 -0
- package/skills/ae-migrate-tracking-code/references/mapping-framework.md +112 -0
- package/skills/ae-migrate-tracking-code/references/providers/README.md +58 -0
- package/skills/ae-migrate-tracking-code/references/providers/amplitude.md +208 -0
- package/skills/ae-migrate-tracking-code/references/providers/firebase.md +160 -0
- package/skills/ae-migrate-tracking-code/references/providers/ga4.md +92 -0
- package/skills/ae-migrate-tracking-code/references/providers/mixpanel.md +150 -0
- package/skills/ae-migrate-tracking-code/references/providers/sensors-data.md +146 -0
- package/skills/ae-project-semantic/SKILL.md +1 -1
- package/skills/ae-system/SKILL.md +5 -5
- package/skills/ae-team/SKILL.md +2 -2
- package/skills/ae-use-agent/SKILL.md +42 -0
- package/skills/ae-use-agent/references/local-agent.md +114 -0
- package/dist/auth-UMJAA72O.js +0 -15
- package/dist/chunk-533JK3YX.js +0 -72
- package/dist/chunk-DKEXH6Q5.js +0 -72
- package/dist/chunk-O6K2ODUE.js +0 -318
- package/dist/chunk-RWXIXOZG.js +0 -326
- package/dist/client-N7NGZUNI.js +0 -204
- package/dist/te-kb-BUD6N3NI.js +0 -1222
- package/skills/ae-agent/references/auto-provision-mcp-credentials.md +0 -57
- package/skills/ae-analysis/metadata_resolution.md +0 -184
|
@@ -3,16 +3,15 @@ import {
|
|
|
3
3
|
internalCallSourceHeaders
|
|
4
4
|
} from "./chunk-Y74WTIKJ.js";
|
|
5
5
|
import {
|
|
6
|
-
clearCliToken,
|
|
7
6
|
getCliToken
|
|
8
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7XGFSUOM.js";
|
|
9
8
|
import {
|
|
10
9
|
getActiveHost,
|
|
11
10
|
getSandboxRuntimeRoot
|
|
12
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-7FTTULED.js";
|
|
13
12
|
import {
|
|
14
13
|
PermissionError
|
|
15
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MAPZ7VB6.js";
|
|
16
15
|
|
|
17
16
|
// src/core/te-agent-credentials.ts
|
|
18
17
|
import { readFileSync } from "fs";
|
|
@@ -109,6 +108,17 @@ import { open, unlink } from "fs/promises";
|
|
|
109
108
|
import path from "path";
|
|
110
109
|
import { Readable } from "stream";
|
|
111
110
|
import { pipeline } from "stream/promises";
|
|
111
|
+
|
|
112
|
+
// src/core/te-claude-base-url.ts
|
|
113
|
+
function resolveTeClaudeBaseUrl(host) {
|
|
114
|
+
const base = host.replace(/\/+$/, "");
|
|
115
|
+
const configured = (process.env.TE_CLAUDE_BASE_PATH ?? process.env.AE_API_PREFIX ?? "/agent").trim();
|
|
116
|
+
const path2 = configured.replace(/^\/+|\/+$/g, "");
|
|
117
|
+
const basePath = path2 ? `/${path2}` : "";
|
|
118
|
+
return basePath && !base.endsWith(basePath) ? `${base}${basePath}` : base;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// src/core/te-agent-client.ts
|
|
112
122
|
var TeAgentApiError = class extends Error {
|
|
113
123
|
constructor(message, status, code, body) {
|
|
114
124
|
super(message);
|
|
@@ -170,9 +180,7 @@ function teClaudeBaseFromActiveHost(hostOverride) {
|
|
|
170
180
|
if (override) return override.replace(/\/+$/, "");
|
|
171
181
|
const h = hostOverride || getActiveHost();
|
|
172
182
|
if (!h) return void 0;
|
|
173
|
-
|
|
174
|
-
const bp = process.env.TE_CLAUDE_BASE_PATH || "/agent";
|
|
175
|
-
return base.endsWith(bp) ? base : base + bp;
|
|
183
|
+
return resolveTeClaudeBaseUrl(h);
|
|
176
184
|
}
|
|
177
185
|
async function signRequest(method, path2, hostOverride, includeJsonContentType = true) {
|
|
178
186
|
const sandboxCred = tryLoadTeAgentSandboxCredentials();
|
|
@@ -211,34 +219,22 @@ async function signRequest(method, path2, hostOverride, includeJsonContentType =
|
|
|
211
219
|
tokenHost: hostForToken
|
|
212
220
|
};
|
|
213
221
|
}
|
|
214
|
-
async function
|
|
215
|
-
|
|
222
|
+
async function fetchSigned(options) {
|
|
223
|
+
const signed = await signRequest(
|
|
216
224
|
options.method,
|
|
217
225
|
options.path,
|
|
218
226
|
options.hostOverride,
|
|
219
227
|
options.includeJsonContentType
|
|
220
228
|
);
|
|
221
|
-
|
|
222
|
-
|
|
229
|
+
return fetchWithTimeout(
|
|
230
|
+
signed.url,
|
|
223
231
|
{
|
|
224
232
|
method: options.method,
|
|
225
|
-
headers:
|
|
233
|
+
headers: signed.headers,
|
|
226
234
|
body: options.body
|
|
227
235
|
},
|
|
228
236
|
options.timeoutMs
|
|
229
237
|
);
|
|
230
|
-
let response = await request(signed);
|
|
231
|
-
if (response.status === 401 && signed.authKind === "cli-token" && signed.tokenHost) {
|
|
232
|
-
clearCliToken(signed.tokenHost);
|
|
233
|
-
signed = await signRequest(
|
|
234
|
-
options.method,
|
|
235
|
-
options.path,
|
|
236
|
-
options.hostOverride,
|
|
237
|
-
options.includeJsonContentType
|
|
238
|
-
);
|
|
239
|
-
response = await request(signed);
|
|
240
|
-
}
|
|
241
|
-
return response;
|
|
242
238
|
}
|
|
243
239
|
function errorDetails(parsed, defaultErrorPrefix, status) {
|
|
244
240
|
const nested = parsed && typeof parsed === "object" && parsed.error && typeof parsed.error === "object" ? parsed.error : parsed;
|
|
@@ -276,7 +272,7 @@ async function parseResponse(response, defaultErrorPrefix) {
|
|
|
276
272
|
}
|
|
277
273
|
async function postToMainApp(path2, body, hostOverride) {
|
|
278
274
|
const rawBody = JSON.stringify(body);
|
|
279
|
-
const response = await
|
|
275
|
+
const response = await fetchSigned({
|
|
280
276
|
method: "POST",
|
|
281
277
|
path: path2,
|
|
282
278
|
body: rawBody,
|
|
@@ -285,7 +281,7 @@ async function postToMainApp(path2, body, hostOverride) {
|
|
|
285
281
|
return parseResponse(response, "Main app returned");
|
|
286
282
|
}
|
|
287
283
|
async function getFromMainApp(path2, hostOverride) {
|
|
288
|
-
const response = await
|
|
284
|
+
const response = await fetchSigned({
|
|
289
285
|
method: "GET",
|
|
290
286
|
path: path2,
|
|
291
287
|
hostOverride
|
|
@@ -319,7 +315,7 @@ async function postSandboxSyncPull(args) {
|
|
|
319
315
|
});
|
|
320
316
|
}
|
|
321
317
|
async function deleteFromMainApp(path2, hostOverride) {
|
|
322
|
-
const response = await
|
|
318
|
+
const response = await fetchSigned({
|
|
323
319
|
method: "DELETE",
|
|
324
320
|
path: path2,
|
|
325
321
|
hostOverride
|
|
@@ -328,7 +324,7 @@ async function deleteFromMainApp(path2, hostOverride) {
|
|
|
328
324
|
}
|
|
329
325
|
async function patchToMainApp(path2, body, hostOverride) {
|
|
330
326
|
const rawBody = JSON.stringify(body);
|
|
331
|
-
const response = await
|
|
327
|
+
const response = await fetchSigned({
|
|
332
328
|
method: "PATCH",
|
|
333
329
|
path: path2,
|
|
334
330
|
body: rawBody,
|
|
@@ -338,7 +334,7 @@ async function patchToMainApp(path2, body, hostOverride) {
|
|
|
338
334
|
}
|
|
339
335
|
async function putToMainApp(path2, body, hostOverride) {
|
|
340
336
|
const rawBody = JSON.stringify(body);
|
|
341
|
-
const response = await
|
|
337
|
+
const response = await fetchSigned({
|
|
342
338
|
method: "PUT",
|
|
343
339
|
path: path2,
|
|
344
340
|
body: rawBody,
|
|
@@ -347,7 +343,7 @@ async function putToMainApp(path2, body, hostOverride) {
|
|
|
347
343
|
return parseResponse(response, "Main app returned");
|
|
348
344
|
}
|
|
349
345
|
async function getBufferFromMainApp(path2, hostOverride) {
|
|
350
|
-
const response = await
|
|
346
|
+
const response = await fetchSigned({
|
|
351
347
|
method: "GET",
|
|
352
348
|
path: path2,
|
|
353
349
|
hostOverride
|
|
@@ -411,7 +407,7 @@ async function downloadFromMainApp(requestPath, outputPath, hostOverride) {
|
|
|
411
407
|
"OUTPUT_ERROR"
|
|
412
408
|
);
|
|
413
409
|
}
|
|
414
|
-
|
|
410
|
+
const signed = await signRequest("GET", requestPath, hostOverride);
|
|
415
411
|
let response;
|
|
416
412
|
const request = async (requestToSend) => {
|
|
417
413
|
try {
|
|
@@ -432,11 +428,6 @@ async function downloadFromMainApp(requestPath, outputPath, hostOverride) {
|
|
|
432
428
|
}
|
|
433
429
|
};
|
|
434
430
|
response = await request(signed);
|
|
435
|
-
if (response.status === 401 && signed.authKind === "cli-token" && signed.tokenHost) {
|
|
436
|
-
clearCliToken(signed.tokenHost);
|
|
437
|
-
signed = await signRequest("GET", requestPath, hostOverride);
|
|
438
|
-
response = await request(signed);
|
|
439
|
-
}
|
|
440
431
|
if (!response.ok) {
|
|
441
432
|
await parseResponse(response, "Main app returned");
|
|
442
433
|
}
|
|
@@ -479,7 +470,7 @@ async function downloadFromMainApp(requestPath, outputPath, hostOverride) {
|
|
|
479
470
|
}
|
|
480
471
|
}
|
|
481
472
|
async function uploadToMainApp(path2, formData, hostOverride) {
|
|
482
|
-
const response = await
|
|
473
|
+
const response = await fetchSigned({
|
|
483
474
|
method: "POST",
|
|
484
475
|
path: path2,
|
|
485
476
|
body: formData,
|
|
@@ -494,6 +485,7 @@ export {
|
|
|
494
485
|
TeAgentCredentialsError,
|
|
495
486
|
tryLoadTeAgentSandboxCredentials,
|
|
496
487
|
getClaudeConfigDir,
|
|
488
|
+
resolveTeClaudeBaseUrl,
|
|
497
489
|
TeAgentApiError,
|
|
498
490
|
postToMainApp,
|
|
499
491
|
getFromMainApp,
|
|
@@ -3,35 +3,34 @@ import {
|
|
|
3
3
|
internalCallSourceHeaders
|
|
4
4
|
} from "./chunk-Y74WTIKJ.js";
|
|
5
5
|
import {
|
|
6
|
-
|
|
6
|
+
SecureStoreAuthError,
|
|
7
7
|
getCliToken
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7XGFSUOM.js";
|
|
9
9
|
import {
|
|
10
10
|
safeJsonParse
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-7FTTULED.js";
|
|
12
12
|
import {
|
|
13
13
|
PermissionError
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import {
|
|
16
|
-
logger
|
|
17
|
-
} from "./chunk-FR2EDAQM.js";
|
|
14
|
+
} from "./chunk-MAPZ7VB6.js";
|
|
18
15
|
|
|
19
16
|
// src/core/capability-api.ts
|
|
20
17
|
import { readFile } from "fs/promises";
|
|
21
18
|
import { basename } from "path";
|
|
22
19
|
var CapabilityGatewayError = class extends Error {
|
|
23
|
-
constructor(message, code, httpStatus, hint, meta) {
|
|
20
|
+
constructor(message, code, httpStatus, hint, meta, type = "api") {
|
|
24
21
|
super(message);
|
|
25
22
|
this.code = code;
|
|
26
23
|
this.httpStatus = httpStatus;
|
|
27
24
|
this.hint = hint;
|
|
28
25
|
this.meta = meta;
|
|
26
|
+
this.type = type;
|
|
29
27
|
this.name = "CapabilityGatewayError";
|
|
30
28
|
}
|
|
31
29
|
code;
|
|
32
30
|
httpStatus;
|
|
33
31
|
hint;
|
|
34
32
|
meta;
|
|
33
|
+
type;
|
|
35
34
|
};
|
|
36
35
|
function buildCapabilityGatewayUrl(host, domain, pathAfterV1, queryParams = {}) {
|
|
37
36
|
const base = host.replace(/\/+$/, "");
|
|
@@ -96,7 +95,8 @@ function parseCapabilityEnvelope(body) {
|
|
|
96
95
|
code,
|
|
97
96
|
err.http_status ?? err.httpStatus,
|
|
98
97
|
hint,
|
|
99
|
-
isRecord(body.meta) ? body.meta : void 0
|
|
98
|
+
isRecord(body.meta) ? body.meta : void 0,
|
|
99
|
+
err.type === "validation" ? "validation" : "api"
|
|
100
100
|
);
|
|
101
101
|
}
|
|
102
102
|
return { ok: true, data: body };
|
|
@@ -124,7 +124,8 @@ function buildCapabilityHttpError(resp, body) {
|
|
|
124
124
|
code,
|
|
125
125
|
resp.status,
|
|
126
126
|
hint,
|
|
127
|
-
isRecord(body.meta) ? body.meta : void 0
|
|
127
|
+
isRecord(body.meta) ? body.meta : void 0,
|
|
128
|
+
err.type === "validation" ? "validation" : "api"
|
|
128
129
|
);
|
|
129
130
|
}
|
|
130
131
|
}
|
|
@@ -135,7 +136,13 @@ function buildCapabilityHttpError(resp, body) {
|
|
|
135
136
|
}
|
|
136
137
|
async function throwCapabilityHttpError(resp) {
|
|
137
138
|
const body = parseCapabilityResponse(await resp.text());
|
|
138
|
-
|
|
139
|
+
const error = buildCapabilityHttpError(resp, body);
|
|
140
|
+
if (resp.status === 401) {
|
|
141
|
+
throw new SecureStoreAuthError(
|
|
142
|
+
`${error.message}. The stored CLI token is invalid or expired; run: ae-cli auth login`
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
throw error;
|
|
139
146
|
}
|
|
140
147
|
async function requestOnce(url, method, token, body, accept = "application/json") {
|
|
141
148
|
const headers = {
|
|
@@ -167,45 +174,17 @@ async function callGateway(host, domain, pathAfterV1, method, body, queryParams
|
|
|
167
174
|
async function callGatewayWithEnvelope(host, domain, pathAfterV1, method, body, queryParams = {}, options = {}) {
|
|
168
175
|
const url = buildCapabilityGatewayUrl(options.apiBaseUrl ?? host, domain, pathAfterV1, queryParams);
|
|
169
176
|
const token = await getCliToken(host);
|
|
170
|
-
|
|
171
|
-
let permissionMsg;
|
|
177
|
+
const resp = await requestOnce(url, method, token, body);
|
|
172
178
|
if (resp.status === 403) {
|
|
173
179
|
const error = await permissionError(resp);
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
180
|
+
if (options.retryOnInvalidTokenForbidden !== false && isInvalidCliTokenMessage(error.message)) {
|
|
181
|
+
throw new SecureStoreAuthError(
|
|
182
|
+
`${error.message} Run: ae-cli auth login`
|
|
183
|
+
);
|
|
177
184
|
}
|
|
185
|
+
throw error;
|
|
178
186
|
}
|
|
179
|
-
if (resp.
|
|
180
|
-
if (options.retryOnUnauthorized === false) {
|
|
181
|
-
await throwCapabilityHttpError(resp);
|
|
182
|
-
}
|
|
183
|
-
logger.warn(`Capability gateway request failed (HTTP 401) for ${host}, refreshing CLI token`);
|
|
184
|
-
clearCliToken(host);
|
|
185
|
-
const newToken = await getCliToken(host);
|
|
186
|
-
process.stderr.write(`[ae-cli] CLI token refreshed for ${host}
|
|
187
|
-
`);
|
|
188
|
-
resp = await requestOnce(url, method, newToken, body);
|
|
189
|
-
if (resp.status === 403) {
|
|
190
|
-
throw new PermissionError(await permissionMessage(resp));
|
|
191
|
-
}
|
|
192
|
-
if (!resp.ok) {
|
|
193
|
-
await throwCapabilityHttpError(resp);
|
|
194
|
-
}
|
|
195
|
-
} else if (resp.status === 403 && permissionMsg) {
|
|
196
|
-
logger.warn(`Capability gateway request failed (${permissionMsg}) for ${host}, refreshing CLI token`);
|
|
197
|
-
clearCliToken(host);
|
|
198
|
-
const newToken = await getCliToken(host);
|
|
199
|
-
process.stderr.write(`[ae-cli] CLI token refreshed for ${host}
|
|
200
|
-
`);
|
|
201
|
-
resp = await requestOnce(url, method, newToken, body);
|
|
202
|
-
if (resp.status === 403) {
|
|
203
|
-
throw await permissionError(resp);
|
|
204
|
-
}
|
|
205
|
-
if (!resp.ok) {
|
|
206
|
-
await throwCapabilityHttpError(resp);
|
|
207
|
-
}
|
|
208
|
-
} else if (!resp.ok) {
|
|
187
|
+
if (!resp.ok) {
|
|
209
188
|
await throwCapabilityHttpError(resp);
|
|
210
189
|
}
|
|
211
190
|
return parseCapabilityEnvelope(parseCapabilityResponse(await resp.text()));
|
|
@@ -213,24 +192,15 @@ async function callGatewayWithEnvelope(host, domain, pathAfterV1, method, body,
|
|
|
213
192
|
async function fetchCapabilityGateway(host, domain, pathAfterV1, method = "GET", body, accept = "application/json") {
|
|
214
193
|
const url = buildCapabilityGatewayUrl(host, domain, pathAfterV1);
|
|
215
194
|
const token = await getCliToken(host);
|
|
216
|
-
|
|
195
|
+
const resp = await requestOnce(url, method, token, body, accept);
|
|
217
196
|
if (resp.status === 403) {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
logger.warn(`Capability gateway request failed (HTTP 401) for ${host}, refreshing CLI token`);
|
|
222
|
-
clearCliToken(host);
|
|
223
|
-
const newToken = await getCliToken(host);
|
|
224
|
-
process.stderr.write(`[ae-cli] CLI token refreshed for ${host}
|
|
225
|
-
`);
|
|
226
|
-
resp = await requestOnce(url, method, newToken, body, accept);
|
|
227
|
-
if (resp.status === 403) {
|
|
228
|
-
throw await permissionError(resp);
|
|
229
|
-
}
|
|
230
|
-
if (!resp.ok) {
|
|
231
|
-
await throwCapabilityHttpError(resp);
|
|
197
|
+
const error = await permissionError(resp);
|
|
198
|
+
if (isInvalidCliTokenMessage(error.message)) {
|
|
199
|
+
throw new SecureStoreAuthError(`${error.message} Run: ae-cli auth login`);
|
|
232
200
|
}
|
|
233
|
-
|
|
201
|
+
throw error;
|
|
202
|
+
}
|
|
203
|
+
if (!resp.ok) {
|
|
234
204
|
await throwCapabilityHttpError(resp);
|
|
235
205
|
}
|
|
236
206
|
return resp;
|
|
@@ -243,8 +213,11 @@ async function requestCapabilityGatewayWithEnvelope(host, domain, pathAfterV1, m
|
|
|
243
213
|
const resp = await fetchCapabilityGateway(host, domain, pathAfterV1, method, body);
|
|
244
214
|
return parseCapabilityEnvelope(parseCapabilityResponse(await resp.text()));
|
|
245
215
|
}
|
|
246
|
-
async function
|
|
247
|
-
return
|
|
216
|
+
async function listCapabilitiesWithEnvelope(host, domain, projectId) {
|
|
217
|
+
return callGatewayWithEnvelope(host, domain, "capabilities", "GET", void 0, { project_id: projectId });
|
|
218
|
+
}
|
|
219
|
+
async function inspectCapabilityWithEnvelope(host, domain, capabilityId, projectId) {
|
|
220
|
+
return callGatewayWithEnvelope(host, domain, `capabilities/${capabilityId}`, "GET", void 0, { project_id: projectId });
|
|
248
221
|
}
|
|
249
222
|
async function inspectCapability(host, domain, capabilityId, projectId) {
|
|
250
223
|
return callGateway(
|
|
@@ -265,6 +238,12 @@ async function executeCapabilityWithEnvelope(host, domain, capabilityId, input =
|
|
|
265
238
|
async function dryRunCapability(host, domain, capabilityId, input = {}) {
|
|
266
239
|
return callGateway(host, domain, `capabilities/${capabilityId}/dry-run`, "POST", { input });
|
|
267
240
|
}
|
|
241
|
+
async function dryRunCapabilityWithEnvelope(host, domain, capabilityId, input = {}) {
|
|
242
|
+
return callGatewayWithEnvelope(host, domain, `capabilities/${capabilityId}/dry-run`, "POST", { input });
|
|
243
|
+
}
|
|
244
|
+
async function validateCapabilityWithEnvelope(host, domain, capabilityId, input = {}) {
|
|
245
|
+
return callGatewayWithEnvelope(host, domain, `capabilities/${capabilityId}/validate`, "POST", { input });
|
|
246
|
+
}
|
|
268
247
|
async function validateCapability(host, domain, capabilityId, input = {}) {
|
|
269
248
|
return callGateway(host, domain, `capabilities/${capabilityId}/validate`, "POST", { input });
|
|
270
249
|
}
|
|
@@ -302,24 +281,15 @@ async function uploadInputFileBytes(host, domain, projectId, purpose, bytes, fil
|
|
|
302
281
|
form.append("purpose", purpose);
|
|
303
282
|
form.append("file", new Blob([fileBuffer], { type: contentType }), filename);
|
|
304
283
|
const token = await getCliToken(host);
|
|
305
|
-
|
|
284
|
+
const resp = await requestMultipartOnce(url, token, form);
|
|
306
285
|
if (resp.status === 403) {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
logger.warn(`Capability gateway request failed (HTTP 401) for ${host}, refreshing CLI token`);
|
|
311
|
-
clearCliToken(host);
|
|
312
|
-
const newToken = await getCliToken(host);
|
|
313
|
-
process.stderr.write(`[ae-cli] CLI token refreshed for ${host}
|
|
314
|
-
`);
|
|
315
|
-
resp = await requestMultipartOnce(url, newToken, form);
|
|
316
|
-
if (resp.status === 403) {
|
|
317
|
-
throw await permissionError(resp);
|
|
318
|
-
}
|
|
319
|
-
if (!resp.ok) {
|
|
320
|
-
await throwCapabilityHttpError(resp);
|
|
286
|
+
const error = await permissionError(resp);
|
|
287
|
+
if (isInvalidCliTokenMessage(error.message)) {
|
|
288
|
+
throw new SecureStoreAuthError(`${error.message} Run: ae-cli auth login`);
|
|
321
289
|
}
|
|
322
|
-
|
|
290
|
+
throw error;
|
|
291
|
+
}
|
|
292
|
+
if (!resp.ok) {
|
|
323
293
|
await throwCapabilityHttpError(resp);
|
|
324
294
|
}
|
|
325
295
|
return unwrapCapabilityEnvelope(parseCapabilityResponse(await resp.text()));
|
|
@@ -338,11 +308,14 @@ export {
|
|
|
338
308
|
fetchCapabilityGateway,
|
|
339
309
|
requestCapabilityGateway,
|
|
340
310
|
requestCapabilityGatewayWithEnvelope,
|
|
341
|
-
|
|
311
|
+
listCapabilitiesWithEnvelope,
|
|
312
|
+
inspectCapabilityWithEnvelope,
|
|
342
313
|
inspectCapability,
|
|
343
314
|
executeCapability,
|
|
344
315
|
executeCapabilityWithEnvelope,
|
|
345
316
|
dryRunCapability,
|
|
317
|
+
dryRunCapabilityWithEnvelope,
|
|
318
|
+
validateCapabilityWithEnvelope,
|
|
346
319
|
validateCapability,
|
|
347
320
|
uploadInputFile,
|
|
348
321
|
uploadInputFileBytes,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
getActiveHost,
|
|
4
|
+
normalizeUrl
|
|
5
|
+
} from "./chunk-7FTTULED.js";
|
|
6
|
+
|
|
7
|
+
// src/core/auth.ts
|
|
8
|
+
function resolveHost(hostOverride) {
|
|
9
|
+
if (hostOverride) return normalizeUrl(hostOverride);
|
|
10
|
+
return getActiveHost();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
resolveHost
|
|
15
|
+
};
|
|
@@ -22,6 +22,11 @@ function findGatewayDomain(cliService) {
|
|
|
22
22
|
function listRegisteredCapabilityDomains() {
|
|
23
23
|
return [...cliServiceRoutes.keys()].sort();
|
|
24
24
|
}
|
|
25
|
+
function listCapabilityDiscoveryPrefixes(cliService) {
|
|
26
|
+
const route = cliServiceRoutes.get(cliService);
|
|
27
|
+
const rawPrefixes = route?.capabilityPrefixes?.length ? route.capabilityPrefixes : [cliService];
|
|
28
|
+
return [...new Set(rawPrefixes.map((prefix) => prefix.trim().toLowerCase()).filter(Boolean).map((prefix) => prefix.endsWith(".") ? prefix : `${prefix}.`))];
|
|
29
|
+
}
|
|
25
30
|
function resolveGatewayDomain(cliService, override) {
|
|
26
31
|
const envDomain = envGatewayDomain(cliService);
|
|
27
32
|
if (envDomain !== void 0) {
|
|
@@ -43,5 +48,6 @@ export {
|
|
|
43
48
|
registerCapabilityGatewayRoute,
|
|
44
49
|
findGatewayDomain,
|
|
45
50
|
listRegisteredCapabilityDomains,
|
|
51
|
+
listCapabilityDiscoveryPrefixes,
|
|
46
52
|
resolveGatewayDomain
|
|
47
53
|
};
|
|
@@ -11,8 +11,24 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
11
11
|
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
12
12
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
13
|
});
|
|
14
|
+
var __esm = (fn, res, err) => function __init() {
|
|
15
|
+
if (err) throw err[0];
|
|
16
|
+
try {
|
|
17
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
18
|
+
} catch (e) {
|
|
19
|
+
throw err = [e], e;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
14
22
|
var __commonJS = (cb, mod) => function __require2() {
|
|
15
|
-
|
|
23
|
+
try {
|
|
24
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
25
|
+
} catch (e) {
|
|
26
|
+
throw mod = 0, e;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var __export = (target, all) => {
|
|
30
|
+
for (var name in all)
|
|
31
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
16
32
|
};
|
|
17
33
|
var __copyProps = (to, from, except, desc) => {
|
|
18
34
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
@@ -30,6 +46,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
46
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
31
47
|
mod
|
|
32
48
|
));
|
|
49
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
33
50
|
|
|
34
51
|
// src/core/logger.ts
|
|
35
52
|
import fs from "fs";
|
|
@@ -114,9 +131,80 @@ var Logger = class {
|
|
|
114
131
|
};
|
|
115
132
|
var logger = new Logger();
|
|
116
133
|
|
|
134
|
+
// src/core/errors.ts
|
|
135
|
+
var PermissionError = class extends Error {
|
|
136
|
+
constructor(message, code, hint) {
|
|
137
|
+
super(message);
|
|
138
|
+
this.code = code;
|
|
139
|
+
this.hint = hint;
|
|
140
|
+
this.name = "PermissionError";
|
|
141
|
+
}
|
|
142
|
+
code;
|
|
143
|
+
hint;
|
|
144
|
+
};
|
|
145
|
+
var CliValidationError = class extends Error {
|
|
146
|
+
code;
|
|
147
|
+
hint;
|
|
148
|
+
location;
|
|
149
|
+
constructor(message, options = {}) {
|
|
150
|
+
super(message);
|
|
151
|
+
this.name = "CliValidationError";
|
|
152
|
+
this.code = options.code;
|
|
153
|
+
this.hint = options.hint;
|
|
154
|
+
if (options.location) {
|
|
155
|
+
const location = {};
|
|
156
|
+
if (typeof options.location.segment === "number" && Number.isFinite(options.location.segment)) {
|
|
157
|
+
location.segment = options.location.segment;
|
|
158
|
+
}
|
|
159
|
+
if (typeof options.location.record === "number" && Number.isFinite(options.location.record)) {
|
|
160
|
+
location.record = options.location.record;
|
|
161
|
+
}
|
|
162
|
+
if (typeof options.location.field === "string" && options.location.field.length > 0) {
|
|
163
|
+
location.field = options.location.field;
|
|
164
|
+
}
|
|
165
|
+
if (Object.keys(location).length > 0) this.location = location;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
var CommunityReportError = class extends Error {
|
|
170
|
+
code;
|
|
171
|
+
httpStatus;
|
|
172
|
+
hint;
|
|
173
|
+
meta;
|
|
174
|
+
constructor(message, options = {}) {
|
|
175
|
+
super(message, options.cause === void 0 ? void 0 : { cause: options.cause });
|
|
176
|
+
this.name = "CommunityReportError";
|
|
177
|
+
this.code = options.code;
|
|
178
|
+
this.httpStatus = options.httpStatus;
|
|
179
|
+
this.hint = options.hint;
|
|
180
|
+
this.meta = options.meta;
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
var LocalDataUploadError = class extends Error {
|
|
184
|
+
code;
|
|
185
|
+
httpStatus;
|
|
186
|
+
hint;
|
|
187
|
+
meta;
|
|
188
|
+
constructor(message, options = {}) {
|
|
189
|
+
super(message, options.cause === void 0 ? void 0 : { cause: options.cause });
|
|
190
|
+
this.name = "LocalDataUploadError";
|
|
191
|
+
this.code = options.code;
|
|
192
|
+
this.httpStatus = options.httpStatus;
|
|
193
|
+
this.hint = options.hint;
|
|
194
|
+
this.meta = options.meta;
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
|
|
117
198
|
export {
|
|
118
199
|
__require,
|
|
200
|
+
__esm,
|
|
119
201
|
__commonJS,
|
|
202
|
+
__export,
|
|
120
203
|
__toESM,
|
|
121
|
-
|
|
204
|
+
__toCommonJS,
|
|
205
|
+
logger,
|
|
206
|
+
PermissionError,
|
|
207
|
+
CliValidationError,
|
|
208
|
+
CommunityReportError,
|
|
209
|
+
LocalDataUploadError
|
|
122
210
|
};
|