oci 2.151.0__py3-none-any.whl → 2.152.1__py3-none-any.whl

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.
Files changed (430) hide show
  1. oci/__init__.py +2 -2
  2. oci/access_governance_cp/access_governance_cp_client.py +8 -8
  3. oci/addons/__init__.py +20 -0
  4. oci/addons/adk/__init__.py +13 -0
  5. oci/addons/adk/agent.py +852 -0
  6. oci/addons/adk/agent_client.py +682 -0
  7. oci/addons/adk/agent_error.py +36 -0
  8. oci/addons/adk/auth/__init__.py +5 -0
  9. oci/addons/adk/auth/auth_provider.py +28 -0
  10. oci/addons/adk/auth/factory.py +78 -0
  11. oci/addons/adk/auth/oci/__init__.py +5 -0
  12. oci/addons/adk/auth/oci/instance_principal.py +53 -0
  13. oci/addons/adk/auth/oci/resource_principal.py +53 -0
  14. oci/addons/adk/auth/oci/session.py +91 -0
  15. oci/addons/adk/auth/oci/user_principal.py +64 -0
  16. oci/addons/adk/constants.py +17 -0
  17. oci/addons/adk/logger.py +163 -0
  18. oci/addons/adk/run/__init__.py +5 -0
  19. oci/addons/adk/run/response.py +56 -0
  20. oci/addons/adk/run/types.py +32 -0
  21. oci/addons/adk/tool/__init__.py +13 -0
  22. oci/addons/adk/tool/function_tool.py +334 -0
  23. oci/addons/adk/tool/prebuilt/__init__.py +8 -0
  24. oci/addons/adk/tool/prebuilt/agentic_rag_tool.py +49 -0
  25. oci/addons/adk/tool/prebuilt/calculator_toolkit.py +104 -0
  26. oci/addons/adk/tool/tool.py +37 -0
  27. oci/addons/adk/tool/toolkit.py +189 -0
  28. oci/addons/adk/tool/utils.py +120 -0
  29. oci/addons/adk/util.py +325 -0
  30. oci/adm/application_dependency_management_client.py +36 -36
  31. oci/ai_anomaly_detection/anomaly_detection_client.py +36 -36
  32. oci/ai_document/ai_service_document_client.py +26 -26
  33. oci/ai_language/ai_service_language_client.py +44 -44
  34. oci/ai_speech/ai_service_speech_client.py +19 -19
  35. oci/ai_vision/ai_service_vision_client.py +28 -28
  36. oci/analytics/analytics_client.py +24 -24
  37. oci/announcements_service/announcement_client.py +5 -5
  38. oci/announcements_service/announcement_subscription_client.py +9 -9
  39. oci/announcements_service/announcements_preferences_client.py +4 -4
  40. oci/announcements_service/service_client.py +1 -1
  41. oci/apigateway/api_gateway_client.py +21 -21
  42. oci/apigateway/deployment_client.py +6 -6
  43. oci/apigateway/gateway_client.py +6 -6
  44. oci/apigateway/subscribers_client.py +6 -6
  45. oci/apigateway/usage_plans_client.py +6 -6
  46. oci/apigateway/work_requests_client.py +5 -5
  47. oci/apm_config/config_client.py +12 -12
  48. oci/apm_control_plane/apm_domain_client.py +14 -14
  49. oci/apm_synthetics/apm_synthetic_client.py +28 -28
  50. oci/apm_traces/attributes_client.py +8 -8
  51. oci/apm_traces/query_client.py +2 -2
  52. oci/apm_traces/trace_client.py +4 -4
  53. oci/appmgmt_control/appmgmt_control_client.py +8 -8
  54. oci/artifacts/artifacts_client.py +32 -32
  55. oci/audit/audit_client.py +3 -3
  56. oci/autoscaling/auto_scaling_client.py +11 -11
  57. oci/bastion/bastion_client.py +15 -15
  58. oci/bds/bds_client.py +84 -84
  59. oci/blockchain/blockchain_platform_client.py +27 -27
  60. oci/budget/budget_client.py +10 -10
  61. oci/capacity_management/capacity_management_client.py +32 -32
  62. oci/certificates/certificates_client.py +5 -5
  63. oci/certificates_management/certificates_management_client.py +32 -32
  64. oci/cims/incident_client.py +6 -6
  65. oci/cloud_bridge/common_client.py +5 -5
  66. oci/cloud_bridge/discovery_client.py +15 -15
  67. oci/cloud_bridge/inventory_client.py +16 -16
  68. oci/cloud_bridge/ocb_agent_svc_client.py +23 -23
  69. oci/cloud_guard/cloud_guard_client.py +155 -155
  70. oci/cloud_migrations/migration_client.py +43 -43
  71. oci/cluster_placement_groups/cluster_placement_groups_cp_client.py +13 -13
  72. oci/compute_cloud_at_customer/compute_cloud_at_customer_client.py +12 -12
  73. oci/compute_instance_agent/compute_instance_agent_client.py +6 -6
  74. oci/compute_instance_agent/plugin_client.py +2 -2
  75. oci/compute_instance_agent/pluginconfig_client.py +1 -1
  76. oci/container_engine/container_engine_client.py +46 -46
  77. oci/container_instances/container_instance_client.py +18 -18
  78. oci/core/blockstorage_client.py +60 -60
  79. oci/core/compute_client.py +117 -117
  80. oci/core/compute_management_client.py +32 -32
  81. oci/core/virtual_network_client.py +258 -258
  82. oci/dashboard_service/dashboard_client.py +6 -6
  83. oci/dashboard_service/dashboard_group_client.py +6 -6
  84. oci/data_catalog/data_catalog_client.py +149 -149
  85. oci/data_flow/data_flow_client.py +45 -45
  86. oci/data_integration/data_integration_client.py +163 -163
  87. oci/data_labeling_service/data_labeling_management_client.py +17 -17
  88. oci/data_labeling_service_dataplane/data_labeling_client.py +15 -15
  89. oci/data_safe/data_safe_client.py +317 -317
  90. oci/data_science/data_science_client.py +145 -145
  91. oci/database/database_client.py +745 -469
  92. oci/database/models/__init__.py +2 -0
  93. oci/database/models/autonomous_db_version_summary.py +31 -0
  94. oci/database/models/backup.py +4 -2
  95. oci/database/models/backup_summary.py +4 -2
  96. oci/database/models/create_external_backup_job_details.py +4 -4
  97. oci/database/models/db_system.py +4 -2
  98. oci/database/models/db_system_summary.py +4 -2
  99. oci/database/models/db_system_upgrade_summary.py +152 -0
  100. oci/database/models/external_container_database.py +4 -2
  101. oci/database/models/external_container_database_summary.py +4 -2
  102. oci/database/models/external_database_base.py +4 -2
  103. oci/database/models/external_non_container_database.py +4 -2
  104. oci/database/models/external_non_container_database_summary.py +4 -2
  105. oci/database/models/external_pluggable_database.py +4 -2
  106. oci/database/models/external_pluggable_database_summary.py +4 -2
  107. oci/database_management/db_management_client.py +356 -230
  108. oci/database_management/db_management_client_composite_operations.py +44 -0
  109. oci/database_management/diagnosability_client.py +4 -4
  110. oci/database_management/managed_my_sql_databases_client.py +7 -247
  111. oci/database_management/models/__init__.py +0 -4
  112. oci/database_management/models/database_diagnostics_and_management_feature_details.py +35 -4
  113. oci/database_management/models/disable_database_management_feature_details.py +33 -2
  114. oci/database_management/models/disable_external_container_database_management_feature_details.py +33 -2
  115. oci/database_management/models/discovered_external_database.py +64 -2
  116. oci/database_management/models/exadata_infrastructure_lifecycle_state_values.py +40 -36
  117. oci/database_management/models/external_database_diagnostics_and_management_feature_details.py +64 -2
  118. oci/database_management/models/managed_database.py +2 -4
  119. oci/database_management/models/managed_database_summary.py +2 -4
  120. oci/database_management/models/modify_database_management_feature_details.py +1 -1
  121. oci/database_management/perfhub_client.py +1 -1
  122. oci/database_management/sql_tuning_client.py +17 -17
  123. oci/database_migration/database_migration_client.py +42 -42
  124. oci/database_tools/database_tools_client.py +23 -23
  125. oci/dblm/db_life_cycle_management_client.py +14 -14
  126. oci/delegate_access_control/delegate_access_control_client.py +26 -26
  127. oci/delegate_access_control/work_request_client.py +4 -4
  128. oci/demand_signal/occ_demand_signal_client.py +7 -7
  129. oci/desktops/desktop_service_client.py +21 -21
  130. oci/devops/devops_client.py +141 -141
  131. oci/disaster_recovery/disaster_recovery_client.py +31 -31
  132. oci/distributed_database/__init__.py +20 -0
  133. oci/distributed_database/distributed_autonomous_db_service_client.py +2315 -0
  134. oci/distributed_database/distributed_autonomous_db_service_client_composite_operations.py +605 -0
  135. oci/distributed_database/distributed_db_private_endpoint_service_client.py +944 -0
  136. oci/distributed_database/distributed_db_private_endpoint_service_client_composite_operations.py +238 -0
  137. oci/distributed_database/distributed_db_service_client.py +2435 -0
  138. oci/distributed_database/distributed_db_service_client_composite_operations.py +647 -0
  139. oci/distributed_database/distributed_db_work_request_service_client.py +654 -0
  140. oci/distributed_database/distributed_db_work_request_service_client_composite_operations.py +26 -0
  141. oci/distributed_database/models/__init__.py +158 -0
  142. oci/distributed_database/models/add_distributed_autonomous_database_gds_control_node_details.py +105 -0
  143. oci/distributed_database/models/add_distributed_database_gds_control_node_details.py +105 -0
  144. oci/distributed_database/models/catalog_peer_with_dedicated_infra.py +331 -0
  145. oci/distributed_database/models/catalog_peer_with_exadb_xs.py +331 -0
  146. oci/distributed_database/models/change_distributed_autonomous_database_compartment_details.py +74 -0
  147. oci/distributed_database/models/change_distributed_database_compartment_details.py +74 -0
  148. oci/distributed_database/models/change_distributed_database_private_endpoint_compartment_details.py +74 -0
  149. oci/distributed_database/models/change_distributed_db_backup_config_details.py +66 -0
  150. oci/distributed_database/models/configure_distributed_autonomous_database_gsms_details.py +103 -0
  151. oci/distributed_database/models/configure_distributed_database_gsms_details.py +103 -0
  152. oci/distributed_database/models/create_distributed_autonomous_database_catalog_details.py +101 -0
  153. oci/distributed_database/models/create_distributed_autonomous_database_catalog_with_dedicated_infra_details.py +342 -0
  154. oci/distributed_database/models/create_distributed_autonomous_database_details.py +799 -0
  155. oci/distributed_database/models/create_distributed_autonomous_database_shard_details.py +101 -0
  156. oci/distributed_database/models/create_distributed_autonomous_database_shard_with_dedicated_infra_details.py +377 -0
  157. oci/distributed_database/models/create_distributed_database_catalog_details.py +99 -0
  158. oci/distributed_database/models/create_distributed_database_catalog_with_exadb_xs_details.py +282 -0
  159. oci/distributed_database/models/create_distributed_database_details.py +810 -0
  160. oci/distributed_database/models/create_distributed_database_private_endpoint_details.py +260 -0
  161. oci/distributed_database/models/create_distributed_database_shard_details.py +99 -0
  162. oci/distributed_database/models/create_distributed_database_shard_with_exadb_xs_details.py +282 -0
  163. oci/distributed_database/models/distributed_autonomous_database.py +1143 -0
  164. oci/distributed_database/models/distributed_autonomous_database_associated_with_private_endpoint.py +105 -0
  165. oci/distributed_database/models/distributed_autonomous_database_catalog.py +194 -0
  166. oci/distributed_database/models/distributed_autonomous_database_catalog_with_dedicated_infra.py +559 -0
  167. oci/distributed_database/models/distributed_autonomous_database_collection.py +70 -0
  168. oci/distributed_database/models/distributed_autonomous_database_connection_string.py +70 -0
  169. oci/distributed_database/models/distributed_autonomous_database_gsm.py +385 -0
  170. oci/distributed_database/models/distributed_autonomous_database_gsm_image.py +105 -0
  171. oci/distributed_database/models/distributed_autonomous_database_shard.py +194 -0
  172. oci/distributed_database/models/distributed_autonomous_database_shard_with_dedicated_infra.py +592 -0
  173. oci/distributed_database/models/distributed_autonomous_database_summary.py +935 -0
  174. oci/distributed_database/models/distributed_autonomous_db_metadata.py +70 -0
  175. oci/distributed_database/models/distributed_database.py +1154 -0
  176. oci/distributed_database/models/distributed_database_associated_with_private_endpoint.py +105 -0
  177. oci/distributed_database/models/distributed_database_catalog.py +192 -0
  178. oci/distributed_database/models/distributed_database_catalog_with_exadb_xs.py +466 -0
  179. oci/distributed_database/models/distributed_database_collection.py +70 -0
  180. oci/distributed_database/models/distributed_database_gsm.py +385 -0
  181. oci/distributed_database/models/distributed_database_private_endpoint.py +639 -0
  182. oci/distributed_database/models/distributed_database_private_endpoint_collection.py +70 -0
  183. oci/distributed_database/models/distributed_database_private_endpoint_summary.py +479 -0
  184. oci/distributed_database/models/distributed_database_shard.py +192 -0
  185. oci/distributed_database/models/distributed_database_shard_with_exadb_xs.py +499 -0
  186. oci/distributed_database/models/distributed_database_summary.py +904 -0
  187. oci/distributed_database/models/distributed_db_backup_config.py +536 -0
  188. oci/distributed_database/models/distributed_db_backup_destination.py +362 -0
  189. oci/distributed_database/models/distributed_db_connection_string.py +70 -0
  190. oci/distributed_database/models/distributed_db_gsm_image.py +105 -0
  191. oci/distributed_database/models/distributed_db_metadata.py +70 -0
  192. oci/distributed_database/models/generate_distributed_autonomous_database_wallet_details.py +70 -0
  193. oci/distributed_database/models/generate_distributed_database_wallet_details.py +70 -0
  194. oci/distributed_database/models/patch_distributed_autonomous_database_details.py +73 -0
  195. oci/distributed_database/models/patch_distributed_database_details.py +73 -0
  196. oci/distributed_database/models/patch_insert_instruction.py +87 -0
  197. oci/distributed_database/models/patch_instruction.py +154 -0
  198. oci/distributed_database/models/patch_merge_instruction.py +95 -0
  199. oci/distributed_database/models/patch_remove_instruction.py +57 -0
  200. oci/distributed_database/models/shard_peer_with_dedicated_infra.py +331 -0
  201. oci/distributed_database/models/shard_peer_with_exadb_xs.py +331 -0
  202. oci/distributed_database/models/update_distributed_autonomous_database_details.py +136 -0
  203. oci/distributed_database/models/update_distributed_database_details.py +136 -0
  204. oci/distributed_database/models/update_distributed_database_private_endpoint_details.py +198 -0
  205. oci/distributed_database/models/upload_distributed_autonomous_database_signed_certificate_and_generate_wallet_details.py +71 -0
  206. oci/distributed_database/models/upload_distributed_database_signed_certificate_and_generate_wallet_details.py +71 -0
  207. oci/distributed_database/models/work_request.py +516 -0
  208. oci/distributed_database/models/work_request_error.py +134 -0
  209. oci/distributed_database/models/work_request_error_collection.py +70 -0
  210. oci/distributed_database/models/work_request_log_entry.py +101 -0
  211. oci/distributed_database/models/work_request_log_entry_collection.py +70 -0
  212. oci/distributed_database/models/work_request_resource.py +232 -0
  213. oci/distributed_database/models/work_request_summary.py +516 -0
  214. oci/distributed_database/models/work_request_summary_collection.py +70 -0
  215. oci/dns/dns_client.py +54 -54
  216. oci/dts/appliance_export_job_client.py +6 -6
  217. oci/dts/shipping_vendors_client.py +1 -1
  218. oci/dts/transfer_appliance_client.py +8 -8
  219. oci/dts/transfer_appliance_entitlement_client.py +3 -3
  220. oci/dts/transfer_device_client.py +5 -5
  221. oci/dts/transfer_job_client.py +6 -6
  222. oci/dts/transfer_package_client.py +7 -7
  223. oci/em_warehouse/em_warehouse_client.py +13 -13
  224. oci/email/email_client.py +31 -31
  225. oci/email_data_plane/email_dp_client.py +1 -1
  226. oci/events/events_client.py +6 -6
  227. oci/file_storage/file_storage_client.py +74 -74
  228. oci/fleet_apps_management/fleet_apps_management_admin_client.py +27 -27
  229. oci/fleet_apps_management/fleet_apps_management_catalog_client.py +7 -7
  230. oci/fleet_apps_management/fleet_apps_management_client.py +32 -32
  231. oci/fleet_apps_management/fleet_apps_management_maintenance_window_client.py +5 -5
  232. oci/fleet_apps_management/fleet_apps_management_operations_client.py +29 -29
  233. oci/fleet_apps_management/fleet_apps_management_provision_client.py +6 -6
  234. oci/fleet_apps_management/fleet_apps_management_runbooks_client.py +19 -19
  235. oci/fleet_apps_management/fleet_apps_management_work_request_client.py +4 -4
  236. oci/fleet_software_update/fleet_software_update_client.py +46 -46
  237. oci/functions/functions_invoke_client.py +1 -1
  238. oci/functions/functions_management_client.py +16 -16
  239. oci/fusion_apps/fusion_applications_client.py +41 -41
  240. oci/generative_ai/generative_ai_client.py +22 -22
  241. oci/generative_ai/models/create_dedicated_ai_cluster_details.py +4 -0
  242. oci/generative_ai/models/dedicated_ai_cluster.py +11 -3
  243. oci/generative_ai_agent/generative_ai_agent_client.py +38 -38
  244. oci/generative_ai_agent_runtime/generative_ai_agent_runtime_client.py +6 -6
  245. oci/generative_ai_inference/generative_ai_inference_client.py +6 -6
  246. oci/generic_artifacts_content/generic_artifacts_content_client.py +3 -3
  247. oci/globally_distributed_database/sharded_database_service_client.py +58 -58
  248. oci/golden_gate/golden_gate_client.py +89 -89
  249. oci/governance_rules_control_plane/governance_rule_client.py +15 -15
  250. oci/governance_rules_control_plane/work_request_client.py +5 -5
  251. oci/healthchecks/health_checks_client.py +17 -17
  252. oci/identity/identity_client.py +145 -145
  253. oci/identity_data_plane/dataplane_client.py +2 -2
  254. oci/identity_domains/identity_domains_client.py +311 -311
  255. oci/integration/integration_instance_client.py +19 -19
  256. oci/jms/java_management_service_client.py +79 -79
  257. oci/jms_java_downloads/java_download_client.py +25 -25
  258. oci/key_management/ekm_client.py +5 -5
  259. oci/key_management/kms_crypto_client.py +6 -6
  260. oci/key_management/kms_hsm_cluster_client.py +12 -12
  261. oci/key_management/kms_management_client.py +21 -21
  262. oci/key_management/kms_vault_client.py +14 -14
  263. oci/license_manager/license_manager_client.py +18 -18
  264. oci/limits/limits_client.py +4 -4
  265. oci/limits/quotas_client.py +7 -7
  266. oci/load_balancer/load_balancer_client.py +61 -61
  267. oci/lockbox/lockbox_client.py +24 -24
  268. oci/log_analytics/log_analytics_client.py +200 -200
  269. oci/logging/logging_management_client.py +30 -30
  270. oci/loggingingestion/logging_client.py +1 -1
  271. oci/loggingsearch/log_search_client.py +1 -1
  272. oci/lustre_file_storage/lustre_file_storage_client.py +11 -11
  273. oci/management_agent/management_agent_client.py +28 -28
  274. oci/management_dashboard/dashx_apis_client.py +14 -14
  275. oci/marketplace/account_client.py +2 -2
  276. oci/marketplace/marketplace_client.py +30 -30
  277. oci/marketplace_private_offer/attachment_client.py +5 -5
  278. oci/marketplace_private_offer/offer_client.py +6 -6
  279. oci/marketplace_publisher/attachment_client.py +5 -5
  280. oci/marketplace_publisher/marketplace_publisher_client.py +71 -71
  281. oci/marketplace_publisher/offer_client.py +6 -6
  282. oci/media_services/media_services_client.py +60 -60
  283. oci/media_services/media_stream_client.py +2 -2
  284. oci/mngdmac/mac_device_client.py +3 -3
  285. oci/mngdmac/mac_order_client.py +11 -11
  286. oci/model_deployment/__init__.py +14 -0
  287. oci/model_deployment/model_deployment_client.py +331 -0
  288. oci/model_deployment/model_deployment_client_composite_operations.py +26 -0
  289. oci/model_deployment/models/__init__.py +14 -0
  290. oci/model_deployment/models/inference_result.py +70 -0
  291. oci/monitoring/monitoring_client.py +18 -18
  292. oci/mysql/channels_client.py +7 -7
  293. oci/mysql/db_backups_client.py +7 -7
  294. oci/mysql/db_system_client.py +17 -17
  295. oci/mysql/models/create_db_system_details.py +31 -0
  296. oci/mysql/models/db_system.py +31 -0
  297. oci/mysql/models/db_system_snapshot.py +31 -0
  298. oci/mysql/models/replica.py +31 -0
  299. oci/mysql/models/replica_overrides.py +33 -2
  300. oci/mysql/models/replica_summary.py +31 -0
  301. oci/mysql/models/update_db_system_details.py +31 -0
  302. oci/mysql/mysqlaas_client.py +7 -7
  303. oci/mysql/replicas_client.py +5 -5
  304. oci/mysql/work_requests_client.py +4 -4
  305. oci/network_firewall/network_firewall_client.py +86 -86
  306. oci/network_load_balancer/network_load_balancer_client.py +35 -35
  307. oci/nosql/nosql_client.py +24 -24
  308. oci/object_storage/object_storage_client.py +55 -55
  309. oci/oce/oce_instance_client.py +10 -10
  310. oci/oci_control_center/occ_metrics_client.py +3 -3
  311. oci/ocvp/cluster_client.py +5 -5
  312. oci/ocvp/esxi_host_client.py +8 -8
  313. oci/ocvp/sddc_client.py +14 -14
  314. oci/ocvp/work_request_client.py +4 -4
  315. oci/oda/management_client.py +59 -59
  316. oci/oda/oda_client.py +17 -17
  317. oci/oda/odapackage_client.py +7 -7
  318. oci/onesubscription/billing_schedule_client.py +1 -1
  319. oci/onesubscription/commitment_client.py +2 -2
  320. oci/onesubscription/computed_usage_client.py +3 -3
  321. oci/onesubscription/invoice_summary_client.py +2 -2
  322. oci/onesubscription/organization_subscription_client.py +1 -1
  323. oci/onesubscription/ratecard_client.py +1 -1
  324. oci/onesubscription/subscribed_service_client.py +2 -2
  325. oci/onesubscription/subscription_client.py +1 -1
  326. oci/ons/notification_control_plane_client.py +6 -6
  327. oci/ons/notification_data_plane_client.py +10 -10
  328. oci/opa/opa_instance_client.py +13 -13
  329. oci/opensearch/models/__init__.py +2 -0
  330. oci/opensearch/models/create_opensearch_cluster_details.py +291 -0
  331. oci/opensearch/models/create_opensearch_cluster_pipeline_details.py +31 -0
  332. oci/opensearch/models/opensearch_cluster.py +291 -0
  333. oci/opensearch/models/opensearch_cluster_pipeline.py +31 -0
  334. oci/opensearch/models/opensearch_cluster_pipeline_summary.py +31 -0
  335. oci/opensearch/models/resize_opensearch_cluster_horizontal_details.py +31 -0
  336. oci/opensearch/models/resize_opensearch_cluster_vertical_details.py +217 -0
  337. oci/opensearch/models/shapes_details.py +70 -0
  338. oci/opensearch/models/update_cluster_specs_details.py +186 -0
  339. oci/opensearch/models/update_opensearch_cluster_pipeline_details.py +31 -0
  340. oci/opensearch/opensearch_cluster_backup_client.py +4 -4
  341. oci/opensearch/opensearch_cluster_client.py +87 -16
  342. oci/opensearch/opensearch_cluster_pipeline_client.py +5 -5
  343. oci/operator_access_control/access_requests_client.py +10 -10
  344. oci/operator_access_control/operator_actions_client.py +2 -2
  345. oci/operator_access_control/operator_control_assignment_client.py +8 -8
  346. oci/operator_access_control/operator_control_client.py +6 -6
  347. oci/opsi/operations_insights_client.py +181 -181
  348. oci/optimizer/optimizer_client.py +26 -26
  349. oci/os_management/event_client.py +8 -8
  350. oci/os_management/os_management_client.py +69 -69
  351. oci/os_management_hub/event_client.py +8 -8
  352. oci/os_management_hub/lifecycle_environment_client.py +13 -13
  353. oci/os_management_hub/managed_instance_client.py +33 -33
  354. oci/os_management_hub/managed_instance_group_client.py +26 -26
  355. oci/os_management_hub/management_station_client.py +10 -10
  356. oci/os_management_hub/onboarding_client.py +13 -13
  357. oci/os_management_hub/reporting_managed_instance_client.py +3 -3
  358. oci/os_management_hub/scheduled_job_client.py +7 -7
  359. oci/os_management_hub/software_source_client.py +33 -33
  360. oci/os_management_hub/work_request_client.py +5 -5
  361. oci/osp_gateway/address_rule_service_client.py +1 -1
  362. oci/osp_gateway/address_service_client.py +2 -2
  363. oci/osp_gateway/invoice_service_client.py +5 -5
  364. oci/osp_gateway/subscription_service_client.py +5 -5
  365. oci/osub_billing_schedule/billing_schedule_client.py +1 -1
  366. oci/osub_organization_subscription/organization_subscription_client.py +1 -1
  367. oci/osub_subscription/commitment_client.py +2 -2
  368. oci/osub_subscription/ratecard_client.py +1 -1
  369. oci/osub_subscription/subscription_client.py +1 -1
  370. oci/osub_usage/computed_usage_client.py +3 -3
  371. oci/psql/postgresql_client.py +34 -34
  372. oci/queue/queue_admin_client.py +11 -11
  373. oci/queue/queue_client.py +8 -8
  374. oci/recovery/database_recovery_client.py +26 -26
  375. oci/redis/redis_cluster_client.py +12 -12
  376. oci/resource_manager/resource_manager_client.py +52 -52
  377. oci/resource_scheduler/schedule_client.py +14 -14
  378. oci/resource_search/resource_search_client.py +3 -3
  379. oci/rover/rover_bundle_client.py +8 -8
  380. oci/rover/rover_cluster_client.py +8 -8
  381. oci/rover/rover_entitlement_client.py +6 -6
  382. oci/rover/rover_node_client.py +15 -15
  383. oci/rover/shape_client.py +1 -1
  384. oci/rover/work_requests_client.py +5 -5
  385. oci/sch/connector_plugins_client.py +2 -2
  386. oci/sch/service_connector_client.py +12 -12
  387. oci/secrets/secrets_client.py +3 -3
  388. oci/security_attribute/security_attribute_client.py +18 -18
  389. oci/service_catalog/service_catalog_client.py +26 -26
  390. oci/service_manager_proxy/service_manager_proxy_client.py +2 -2
  391. oci/service_mesh/service_mesh_client.py +48 -48
  392. oci/stack_monitoring/stack_monitoring_client.py +87 -87
  393. oci/streaming/stream_admin_client.py +18 -18
  394. oci/streaming/stream_client.py +8 -8
  395. oci/tenant_manager_control_plane/domain_client.py +5 -5
  396. oci/tenant_manager_control_plane/domain_governance_client.py +5 -5
  397. oci/tenant_manager_control_plane/governance_client.py +2 -2
  398. oci/tenant_manager_control_plane/link_client.py +3 -3
  399. oci/tenant_manager_control_plane/orders_client.py +2 -2
  400. oci/tenant_manager_control_plane/organization_client.py +10 -10
  401. oci/tenant_manager_control_plane/recipient_invitation_client.py +5 -5
  402. oci/tenant_manager_control_plane/sender_invitation_client.py +5 -5
  403. oci/tenant_manager_control_plane/subscription_client.py +11 -11
  404. oci/tenant_manager_control_plane/work_request_client.py +4 -4
  405. oci/threat_intelligence/threatintel_client.py +5 -5
  406. oci/usage/resources_client.py +2 -2
  407. oci/usage/rewards_client.py +6 -6
  408. oci/usage/usagelimits_client.py +1 -1
  409. oci/usage_api/usageapi_client.py +33 -33
  410. oci/vault/vaults_client.py +13 -13
  411. oci/vbs_inst/vbs_instance_client.py +10 -10
  412. oci/version.py +1 -1
  413. oci/visual_builder/vb_instance_client.py +14 -14
  414. oci/vn_monitoring/vn_monitoring_client.py +12 -12
  415. oci/vulnerability_scanning/vulnerability_scanning_client.py +58 -58
  416. oci/waa/waa_client.py +13 -13
  417. oci/waa/work_request_client.py +4 -4
  418. oci/waas/redirect_client.py +6 -6
  419. oci/waas/waas_client.py +66 -66
  420. oci/waf/waf_client.py +24 -24
  421. oci/work_requests/work_request_client.py +4 -4
  422. oci/zpr/zpr_client.py +15 -15
  423. {oci-2.151.0.dist-info → oci-2.152.1.dist-info}/METADATA +6 -1
  424. {oci-2.151.0.dist-info → oci-2.152.1.dist-info}/RECORD +428 -313
  425. oci/database_management/models/disable_external_mysql_associated_service_details.py +0 -144
  426. oci/database_management/models/enable_external_mysql_associated_service_details.py +0 -144
  427. {oci-2.151.0.dist-info → oci-2.152.1.dist-info}/LICENSE.txt +0 -0
  428. {oci-2.151.0.dist-info → oci-2.152.1.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
  429. {oci-2.151.0.dist-info → oci-2.152.1.dist-info}/WHEEL +0 -0
  430. {oci-2.151.0.dist-info → oci-2.152.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,5 @@
1
+ # coding: utf-8
2
+ # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3
+ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
+
5
+ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
@@ -0,0 +1,28 @@
1
+ # coding: utf-8
2
+ # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3
+ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
+
5
+ from abc import ABC, abstractmethod
6
+ from typing import Any, Dict
7
+
8
+
9
+ class AuthProvider(ABC):
10
+ """Base class for authentication providers."""
11
+
12
+ @abstractmethod
13
+ def get_config(self) -> Dict[str, Any]:
14
+ """Get service-specific configuration.
15
+
16
+ Returns:
17
+ Dict[str, Any]: Configuration dictionary
18
+ """
19
+ pass
20
+
21
+ @abstractmethod
22
+ def get_auth_credentials(self) -> Any:
23
+ """Get authentication credentials.
24
+
25
+ Returns:
26
+ Any: Authentication credentials (e.g., API key, signer)
27
+ """
28
+ pass
@@ -0,0 +1,78 @@
1
+ # coding: utf-8
2
+ # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3
+ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
+
5
+ from enum import Enum
6
+ from typing import Optional
7
+
8
+ import oci.config
9
+
10
+ from oci.addons.adk.auth.auth_provider import AuthProvider
11
+ from oci.addons.adk.auth.oci.instance_principal import OCIInstancePrincipalAuth
12
+ from oci.addons.adk.auth.oci.resource_principal import OCIResourcePrincipalAuth
13
+ from oci.addons.adk.auth.oci.session import OCISessionAuth
14
+ from oci.addons.adk.auth.oci.user_principal import OCIUserPrincipalAuth
15
+
16
+
17
+ class OCIAuthType(str, Enum):
18
+ """OCI authentication types as enumerator."""
19
+
20
+ API_KEY = "api_key"
21
+ SECURITY_TOKEN = "security_token"
22
+ INSTANCE_PRINCIPAL = "instance_principal"
23
+ RESOURCE_PRINCIPAL = "resource_principal"
24
+
25
+
26
+ class AuthFactory:
27
+ """Factory for creating authentication providers."""
28
+
29
+ @staticmethod
30
+ def create_oci_auth(
31
+ auth_type: OCIAuthType,
32
+ config_path: Optional[str] = oci.config.DEFAULT_LOCATION,
33
+ profile: Optional[str] = oci.config.DEFAULT_PROFILE,
34
+ token: Optional[str] = None,
35
+ region: Optional[str] = None,
36
+ ) -> AuthProvider:
37
+ """Create OCI authentication provider.
38
+
39
+ Args:
40
+ auth_type (str): Type of OCI auth. One of: 'user_principal',
41
+ 'instance_principal', 'security_token'
42
+
43
+ config_path (Optional[str]): Path to OCI config file. Required for
44
+ user_principal and session auth.
45
+
46
+ profile (Optional[str]): Profile name in config.
47
+ Only used with user_principal and session auth. Defaults to "DEFAULT".
48
+
49
+ token (Optional[str]): token string.
50
+ region (Optional[str]): OCI region.
51
+
52
+ Returns:
53
+ AuthProvider: OCI auth provider
54
+
55
+ Raises:
56
+ ValueError: If auth_type is invalid or required args are missing
57
+ """
58
+ # Validate auth_type first
59
+ if auth_type not in OCIAuthType:
60
+ raise ValueError(
61
+ f"Invalid auth_type: {auth_type}. Must be one of: "
62
+ f"{', '.join(repr(t) for t in OCIAuthType)}"
63
+ )
64
+
65
+ if auth_type == OCIAuthType.INSTANCE_PRINCIPAL:
66
+ return OCIInstancePrincipalAuth(security_token=token, region=region)
67
+
68
+ if auth_type == OCIAuthType.RESOURCE_PRINCIPAL:
69
+ return OCIResourcePrincipalAuth(security_token=token, region=region)
70
+
71
+ if auth_type == OCIAuthType.API_KEY:
72
+ return OCIUserPrincipalAuth(config_path=config_path, profile=profile)
73
+
74
+ if auth_type == OCIAuthType.SECURITY_TOKEN:
75
+ return OCISessionAuth(config_path=config_path, profile=profile)
76
+
77
+ # This code is unreachable since we validate auth_type at the start
78
+ raise ValueError(f"Unsupported auth_type: {auth_type}") # pragma: no cover
@@ -0,0 +1,5 @@
1
+ # coding: utf-8
2
+ # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3
+ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
+
5
+ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
@@ -0,0 +1,53 @@
1
+ # coding: utf-8
2
+ # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3
+ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
+
5
+ from typing import Any, Dict, Optional
6
+
7
+ import oci
8
+
9
+ from oci.addons.adk.auth.auth_provider import AuthProvider
10
+
11
+
12
+ class OCIInstancePrincipalAuth(AuthProvider):
13
+ """OCI Authentication Provider using instance principal."""
14
+
15
+ def __init__(
16
+ self, security_token: Optional[str] = None, region: Optional[str] = None
17
+ ):
18
+ """Initialize OCI Instance Principal Auth Provider.
19
+
20
+ Args:
21
+ security_token (Optional[str]): Security token for authentication
22
+ region (Optional[str]): OCI region
23
+ """
24
+ self._signer: oci.signer.AbstractBaseSigner | None = None
25
+ self.region = region
26
+
27
+ def get_config(self) -> Dict[str, Any]:
28
+ """Get OCI configuration.
29
+
30
+ Returns:
31
+ Dict[str, Any]: OCI configuration dictionary with region and tenancy
32
+
33
+ Raises:
34
+ Exception: If instance principal auth is not configured
35
+ """
36
+ signer = self.get_auth_credentials()
37
+ config = {"region": signer.region, "tenancy": signer.tenancy_id} # type: ignore[attr-defined]
38
+ if self.region:
39
+ config["region"] = self.region
40
+ return config
41
+
42
+ def get_auth_credentials(self) -> oci.signer.AbstractBaseSigner:
43
+ """Get OCI instance principal signer.
44
+
45
+ Returns:
46
+ oci.signer.AbstractBaseSigner: OCI instance principal signer
47
+
48
+ Raises:
49
+ Exception: If instance principal auth is not configured
50
+ """
51
+ if self._signer is None:
52
+ self._signer = oci.auth.signers.InstancePrincipalsSecurityTokenSigner()
53
+ return self._signer
@@ -0,0 +1,53 @@
1
+ # coding: utf-8
2
+ # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3
+ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
+
5
+ from typing import Any, Dict, Optional
6
+
7
+ import oci
8
+
9
+ from oci.addons.adk.auth.auth_provider import AuthProvider
10
+
11
+
12
+ class OCIResourcePrincipalAuth(AuthProvider):
13
+ """OCI Authentication Provider using resource principal."""
14
+
15
+ def __init__(
16
+ self, security_token: Optional[str] = None, region: Optional[str] = None
17
+ ):
18
+ """Initialize OCI Resource Principal Auth Provider.
19
+
20
+ Args:
21
+ security_token (Optional[str]): Security token for authentication
22
+ region (Optional[str]): OCI region
23
+ """
24
+ self._signer = None
25
+ self.region = region
26
+
27
+ def get_config(self) -> Dict[str, Any]:
28
+ """Get OCI configuration.
29
+
30
+ Returns:
31
+ Dict[str, Any]: OCI configuration dictionary with region and tenancy
32
+
33
+ Raises:
34
+ Exception: If resource principal auth is not configured
35
+ """
36
+ signer = self.get_auth_credentials()
37
+ config = {"region": signer.region, "tenancy": signer.tenancy_id} # type: ignore[attr-defined]
38
+ if self.region:
39
+ config["region"] = self.region
40
+ return config
41
+
42
+ def get_auth_credentials(self) -> oci.signer.AbstractBaseSigner:
43
+ """Get OCI resource principal signer.
44
+
45
+ Returns:
46
+ oci.signer.AbstractBaseSigner: OCI resource principal signer
47
+
48
+ Raises:
49
+ Exception: If resource principal auth is not configured
50
+ """
51
+ if self._signer is None:
52
+ self._signer = oci.auth.signers.get_resource_principals_signer()
53
+ return self._signer # type: ignore[return-value]
@@ -0,0 +1,91 @@
1
+ # coding: utf-8
2
+ # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3
+ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
+
5
+ from typing import Any, Dict, Optional
6
+
7
+ import oci
8
+
9
+ from oci.addons.adk.auth.auth_provider import AuthProvider
10
+
11
+
12
+ class OCISessionAuth(AuthProvider):
13
+ """OCI Authentication Provider using session authentication."""
14
+
15
+ def __init__(
16
+ self,
17
+ config_path: Optional[str] = oci.config.DEFAULT_LOCATION,
18
+ profile: Optional[str] = oci.config.DEFAULT_PROFILE,
19
+ ):
20
+ """Initialize OCI Session Auth Provider.
21
+
22
+ Args:
23
+ config_path (str): Path to OCI config file
24
+ profile (str): Profile name to use from config file. Defaults to "DEFAULT".
25
+ """
26
+ self.config_path = config_path
27
+ self.profile = profile
28
+ self._config: Optional[Dict[str, Any]] = None
29
+ self._signer: Optional[oci.signer.AbstractBaseSigner] = None
30
+
31
+ def get_config(self) -> Dict[str, Any]:
32
+ """Get OCI configuration from config file.
33
+
34
+ Returns:
35
+ Dict[str, Any]: OCI configuration
36
+
37
+ Raises:
38
+ oci.exceptions.InvalidConfig: If config validation fails
39
+ FileNotFoundError: If security token file not found
40
+ """
41
+ if self._config is None:
42
+ self._config = oci.config.from_file(
43
+ file_location=self.config_path, profile_name=self.profile
44
+ )
45
+
46
+ # Verify required fields for session auth
47
+ required_fields = ["key_file", "security_token_file", "region"]
48
+ missing_fields = [
49
+ field for field in required_fields if field not in (self._config or {})
50
+ ]
51
+ if missing_fields:
52
+ raise oci.exceptions.InvalidConfig(
53
+ {field: "missing" for field in missing_fields}
54
+ )
55
+ return self._config or {}
56
+
57
+ def get_auth_credentials(self) -> oci.signer.AbstractBaseSigner:
58
+ """Get OCI signer using security token authentication.
59
+
60
+ Returns:
61
+ oci.signer.AbstractBaseSigner: OCI signer for authentication
62
+
63
+ Raises:
64
+ oci.exceptions.InvalidConfig: If config validation fails
65
+ FileNotFoundError: If key file or security token file not found
66
+ """
67
+ if self._signer is None:
68
+ config = self.get_config()
69
+
70
+ key_file = config.get("key_file")
71
+ if not key_file:
72
+ raise oci.exceptions.InvalidConfig({"key_file": "missing"})
73
+
74
+ security_token_file = config.get("security_token_file")
75
+ if not security_token_file:
76
+ raise oci.exceptions.InvalidConfig({"security_token_file": "missing"})
77
+
78
+ # Load private key
79
+ private_key = oci.signer.load_private_key_from_file(
80
+ key_file,
81
+ None, # No passphrase
82
+ )
83
+
84
+ # Load security token
85
+ with open(security_token_file) as f:
86
+ security_token = f.read()
87
+
88
+ self._signer = oci.auth.signers.SecurityTokenSigner(
89
+ security_token, private_key
90
+ )
91
+ return self._signer
@@ -0,0 +1,64 @@
1
+ # coding: utf-8
2
+ # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3
+ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
+
5
+ from typing import Any, Dict, Optional
6
+
7
+ import oci
8
+
9
+ from oci.addons.adk.auth.auth_provider import AuthProvider
10
+
11
+
12
+ class OCIUserPrincipalAuth(AuthProvider):
13
+ """OCI Authentication Provider using user principal."""
14
+
15
+ def __init__(
16
+ self,
17
+ config_path: Optional[str] = oci.config.DEFAULT_LOCATION,
18
+ profile: Optional[str] = oci.config.DEFAULT_PROFILE,
19
+ ):
20
+ """Initialize OCI User Principal Auth Provider.
21
+
22
+ Args:
23
+ config_path (Optional[str]): Path to OCI config file,
24
+ and defaults to '~/.oci/config'.
25
+ profile (Optional[str]): Profile to use from config file.
26
+ Defaults to 'DEFAULT' if not specified.
27
+ """
28
+ self.config_path = config_path
29
+ self.profile = profile
30
+ self._config = None
31
+ self._signer = None
32
+
33
+ def get_config(self) -> Dict[str, Any]:
34
+ """Get OCI configuration.
35
+
36
+ Returns:
37
+ Dict[str, Any]: OCI configuration dictionary
38
+
39
+ Raises:
40
+ oci.exceptions.ConfigFileError: If config file cannot be read
41
+ oci.exceptions.InvalidConfig: If config is invalid
42
+ """
43
+ if self._config is None:
44
+ # Use the specified profile when loading config
45
+ config = oci.config.from_file(self.config_path, self.profile)
46
+ # Validate config before caching
47
+ oci.config.validate_config(config)
48
+ self._config = config
49
+ return self._config or {}
50
+
51
+ def get_auth_credentials(self) -> oci.signer.AbstractBaseSigner:
52
+ """Get OCI signer for authentication.
53
+
54
+ Returns:
55
+ oci.signer.AbstractBaseSigner: OCI signer
56
+
57
+ Raises:
58
+ oci.exceptions.ConfigFileError: If config file cannot be read
59
+ oci.exceptions.InvalidConfig: If config is invalid
60
+ """
61
+ if self._signer is None:
62
+ config = self.get_config()
63
+ self._signer = oci.signer.Signer.from_config(config)
64
+ return self._signer # type: ignore[return-value]
@@ -0,0 +1,17 @@
1
+ # coding: utf-8
2
+ # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3
+ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
+
5
+ """
6
+ Constants for the Agent Development Kit
7
+ """
8
+
9
+ FREEFORM_TAGS = {"ConfiguredByADK": "ADK-Python"}
10
+
11
+ DESC_SUFFIX = " created by ADK"
12
+
13
+ DEFAULT_TIMEOUT = (10, 240)
14
+
15
+ MAX_STATUS_CHECK = 20
16
+
17
+ DEFAULT_SESSION_NAME = "Default Session"
@@ -0,0 +1,163 @@
1
+ # coding: utf-8
2
+ # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3
+ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
+
5
+ import logging
6
+ import os
7
+ from typing import Any, Optional, Union
8
+
9
+ from rich.console import Console
10
+ from rich.logging import RichHandler
11
+ from rich.panel import Panel
12
+ from rich.traceback import install as install_rich_traceback
13
+
14
+
15
+ class ADKLogger:
16
+ """
17
+ A customized logger for the Agent Development Kit
18
+ that uses RichHandler for console output
19
+ and FileHandler for file output.
20
+ Maintains rich formatting for console output while
21
+ providing configurable logging levels and file output.
22
+ """
23
+
24
+ def __init__(
25
+ self,
26
+ name: str = "adk",
27
+ level: Union[int, str] = logging.INFO,
28
+ file_path: Optional[str] = None,
29
+ file_level: Union[int, str] = logging.DEBUG,
30
+ console: Optional[Console] = None,
31
+ ):
32
+ """
33
+ Initialize the ADK logger.
34
+
35
+ Args:
36
+ name: Logger name
37
+ level: Console logging level
38
+ (can be string like 'INFO' or int like logging.INFO)
39
+ file_path: Path to log file, if None, file logging is disabled
40
+ file_level: File logging level
41
+ console: Optional Rich console instance
42
+ """
43
+ # Convert string level to int if necessary
44
+ if isinstance(level, str):
45
+ level = getattr(logging, level.upper(), logging.INFO)
46
+
47
+ if isinstance(file_level, str):
48
+ file_level = getattr(logging, file_level.upper(), logging.DEBUG)
49
+
50
+ # Initialize Rich console or use the provided one
51
+ self.console = console or Console(log_time=False, log_path=False)
52
+
53
+ # Install rich traceback handler for better exception display
54
+ install_rich_traceback()
55
+
56
+ # Create logger
57
+ self.logger = logging.getLogger(name)
58
+ self.logger.setLevel(min(level, file_level)) # Set to lowest of the two levels
59
+ self.logger.propagate = False # Prevent double logging
60
+
61
+ # Clear existing handlers if there are any
62
+ if self.logger.handlers:
63
+ self.logger.handlers.clear()
64
+
65
+ # Configure Rich handler for console output
66
+ self.shell_handler = RichHandler(
67
+ console=self.console,
68
+ rich_tracebacks=True,
69
+ markup=True,
70
+ show_time=True,
71
+ show_level=True,
72
+ show_path=False,
73
+ log_time_format="[%x %X] ",
74
+ )
75
+ self.shell_handler.setLevel(level)
76
+ self.logger.addHandler(self.shell_handler)
77
+
78
+ # Configure file handler if requested
79
+ self.file_handler = None
80
+ if file_path:
81
+ os.makedirs(os.path.dirname(file_path), exist_ok=True)
82
+ self.file_handler = logging.FileHandler(file_path)
83
+ self.file_handler.setLevel(file_level)
84
+ file_formatter = logging.Formatter(
85
+ "%(levelname)s %(asctime)s [%(name)s:%(filename)s:%(funcName)s:%(lineno)d] %(message)s" # noqa: E501
86
+ )
87
+ self.file_handler.setFormatter(file_formatter)
88
+ self.logger.addHandler(self.file_handler)
89
+
90
+ # Forward standard logging methods to the underlying logger
91
+ def __getattr__(self, name: str) -> Any:
92
+ """
93
+ Forward any undefined attributes to the underlying logger.
94
+ This allows direct access to all standard logging methods like
95
+ debug(), info(), warning(), error(), etc.
96
+ """
97
+ return getattr(self.logger, name)
98
+
99
+ def print(
100
+ self,
101
+ message: Any,
102
+ title: Optional[str] = None,
103
+ border_style: str = "blue",
104
+ expand: bool = False,
105
+ ) -> None:
106
+ """
107
+ Print a message in a panel with rich formatting,
108
+ mirroring console.print(Panel()).
109
+
110
+ Args:
111
+ message: The message to print
112
+ title: Optional title for the panel
113
+ border_style: Style for the panel border
114
+ expand: Whether to expand the panel to fill the terminal width
115
+ """
116
+ panel = Panel(message, title=title, border_style=border_style, expand=expand)
117
+ self.console.print(panel)
118
+ # Also log to file if file handler is configured, but without rich formatting
119
+ if self.file_handler:
120
+ plain_message = f"[{title}] {str(message)}" if title else str(message)
121
+ self.logger.info(plain_message)
122
+
123
+ def print_exception(self, show_locals: bool = False) -> None:
124
+ """
125
+ Print an exception with rich formatting, mirroring console.print_exception().
126
+
127
+ Args:
128
+ show_locals: Whether to show local variables
129
+ """
130
+ self.console.print_exception(show_locals=show_locals)
131
+ self.logger.exception("Exception occurred")
132
+
133
+
134
+ # Create a default logger instance
135
+ default_logger = ADKLogger(
136
+ name="adk",
137
+ level=os.environ.get("ADK_LOG_LEVEL", "INFO"),
138
+ file_path=os.environ.get("ADK_LOG_FILE", None),
139
+ )
140
+
141
+
142
+ # Get a configured logger
143
+ def get_logger(
144
+ name: str = "adk",
145
+ level: Union[int, str] = logging.INFO,
146
+ file_path: Optional[str] = None,
147
+ ) -> ADKLogger:
148
+ """
149
+ Create and return a configured ADKLogger instance.
150
+
151
+ Args:
152
+ name: Logger name
153
+ level: Logging level for console output
154
+ file_path: Path to log file, if None uses the default path
155
+
156
+ Returns:
157
+ ADKLogger instance
158
+ """
159
+ return ADKLogger(
160
+ name=name,
161
+ level=level,
162
+ file_path=file_path or os.environ.get("ADK_LOG_FILE", None),
163
+ )
@@ -0,0 +1,5 @@
1
+ # coding: utf-8
2
+ # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3
+ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
+
5
+ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
@@ -0,0 +1,56 @@
1
+ # coding: utf-8
2
+ # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3
+ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
+
5
+ """
6
+ ADK run response
7
+ """
8
+
9
+ import json
10
+ from typing import Any, Dict
11
+
12
+ from pydantic import BaseModel, Field, computed_field
13
+
14
+ from oci.addons.adk.logger import default_logger as logger
15
+
16
+
17
+ class RunResponse(BaseModel):
18
+ """Response from the agent run containing the final output."""
19
+
20
+ data: Dict[str, Any] = Field(..., description="Raw response from the agent")
21
+ session_id: str = Field(..., description="Session ID used for the response")
22
+
23
+ @computed_field # type: ignore[prop-decorator]
24
+ @property
25
+ def final_output(self) -> str | None:
26
+ """Direct access to the agent message text as output"""
27
+ return self._get_nested_text()
28
+
29
+ @computed_field(deprecated="Use 'final_output' instead") # type: ignore[prop-decorator]
30
+ @property
31
+ def output(self) -> str | None:
32
+ """Direct access to the agent message text as output"""
33
+ return self.final_output
34
+
35
+ def _get_nested_text(self) -> str | None:
36
+ """Safely extract text from nested data structure."""
37
+ try:
38
+ return self.data["message"]["content"]["text"]
39
+ except (KeyError, TypeError):
40
+ return None
41
+
42
+ def pretty_print(self, print_data: bool = False) -> None:
43
+ """Pretty print this run response."""
44
+ if self.final_output is None:
45
+ logger.warning("NO TEXT AVAILABLE IN RESPONSE")
46
+
47
+ message_text = f"agent text message:\n[bold green]{self.final_output}[/bold green]"
48
+
49
+ if print_data:
50
+ message_text += f"\n\ndata:\n[bold magenta]{json.dumps(self.data, indent=4)}[/bold magenta]" # noqa: E501
51
+
52
+ logger.print(
53
+ message_text,
54
+ title="Agent run response",
55
+ border_style="blue",
56
+ )
@@ -0,0 +1,32 @@
1
+ # coding: utf-8
2
+ # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3
+ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
+
5
+ """
6
+ ADK Run action models
7
+ """
8
+
9
+ from pydantic import BaseModel, Field
10
+
11
+
12
+ class FunctionCall(BaseModel):
13
+ """Represents a function call that is required from the client."""
14
+
15
+ name: str = Field(..., alias="name")
16
+ arguments: str | dict = Field(..., alias="arguments")
17
+
18
+
19
+ class PerformedAction(BaseModel):
20
+ """Represents an action that was performed by the agent."""
21
+
22
+ action_id: str = Field(..., alias="action_id")
23
+ performed_action_type: str = Field(..., alias="performed_action_type")
24
+ function_call_output: str = Field(..., alias="function_call_output")
25
+
26
+
27
+ class RequiredAction(BaseModel):
28
+ """Represents an action that is required from the client."""
29
+
30
+ action_id: str = Field(..., alias="action_id")
31
+ required_action_type: str = Field(..., alias="required_action_type")
32
+ function_call: FunctionCall = Field(..., alias="function_call")
@@ -0,0 +1,13 @@
1
+ # coding: utf-8
2
+ # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3
+ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
+
5
+ """
6
+ Default import behavior for oci.addons.adk.tool
7
+ """
8
+
9
+ from oci.addons.adk.tool.function_tool import FunctionTool
10
+ from oci.addons.adk.tool.tool import tool
11
+ from oci.addons.adk.tool.toolkit import Toolkit
12
+
13
+ __all__ = ["FunctionTool", "Toolkit", "tool"]