iac-code 0.7.0__tar.gz → 0.9.0__tar.gz
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.
- {iac_code-0.7.0 → iac_code-0.9.0}/PKG-INFO +1 -1
- {iac_code-0.7.0 → iac_code-0.9.0}/pyproject.toml +1 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/setup.py +48 -4
- iac_code-0.9.0/src/iac_code/__init__.py +2 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/artifacts.py +134 -38
- iac_code-0.9.0/src/iac_code/a2a/backup.py +91 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/client.py +36 -1
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/events.py +203 -14
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/executor.py +433 -86
- iac_code-0.9.0/src/iac_code/a2a/metadata_redaction.py +85 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/metrics.py +21 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/parts.py +7 -7
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/pipeline_events.py +142 -25
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/pipeline_executor.py +1925 -220
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/pipeline_journal.py +152 -34
- iac_code-0.9.0/src/iac_code/a2a/pipeline_paths.py +69 -0
- iac_code-0.9.0/src/iac_code/a2a/pipeline_performance.py +14 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/pipeline_snapshot.py +204 -12
- iac_code-0.9.0/src/iac_code/a2a/pipeline_stream.py +1051 -0
- iac_code-0.9.0/src/iac_code/a2a/runtime_overrides.py +128 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/task_store.py +331 -55
- iac_code-0.9.0/src/iac_code/a2a/thinking_metadata.py +59 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/transports/dispatcher.py +47 -2
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/acp/convert.py +76 -9
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/acp/server.py +112 -9
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/acp/session.py +279 -38
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/agent/agent_loop.py +292 -13
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/agent/agent_tool.py +7 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/agent/message.py +1 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/agent/system_prompt.py +35 -8
- iac_code-0.9.0/src/iac_code/cli/headless.py +351 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/cli/main.py +51 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/cli/output_formats.py +99 -17
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/commands/__init__.py +10 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/commands/auth.py +7 -1
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/commands/effort.py +12 -6
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/commands/memory.py +14 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/commands/registry.py +9 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/commands/resume.py +6 -1
- iac_code-0.9.0/src/iac_code/commands/thinking_enabled.py +117 -0
- iac_code-0.9.0/src/iac_code/i18n/locales/de/LC_MESSAGES/messages.mo +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/i18n/locales/de/LC_MESSAGES/messages.po +1905 -262
- iac_code-0.9.0/src/iac_code/i18n/locales/es/LC_MESSAGES/messages.mo +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/i18n/locales/es/LC_MESSAGES/messages.po +1906 -274
- iac_code-0.9.0/src/iac_code/i18n/locales/fr/LC_MESSAGES/messages.mo +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/i18n/locales/fr/LC_MESSAGES/messages.po +1917 -268
- iac_code-0.9.0/src/iac_code/i18n/locales/ja/LC_MESSAGES/messages.mo +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/i18n/locales/ja/LC_MESSAGES/messages.po +1833 -293
- iac_code-0.9.0/src/iac_code/i18n/locales/pt/LC_MESSAGES/messages.mo +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/i18n/locales/pt/LC_MESSAGES/messages.po +1886 -270
- iac_code-0.9.0/src/iac_code/i18n/locales/zh/LC_MESSAGES/messages.mo +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/i18n/locales/zh/LC_MESSAGES/messages.po +1761 -245
- iac_code-0.9.0/src/iac_code/mcp/__init__.py +1 -0
- iac_code-0.9.0/src/iac_code/mcp/cli.py +345 -0
- iac_code-0.9.0/src/iac_code/mcp/client.py +459 -0
- iac_code-0.9.0/src/iac_code/mcp/config.py +520 -0
- iac_code-0.9.0/src/iac_code/mcp/env_expansion.py +66 -0
- iac_code-0.9.0/src/iac_code/mcp/errors.py +17 -0
- iac_code-0.9.0/src/iac_code/mcp/manager.py +498 -0
- iac_code-0.9.0/src/iac_code/mcp/oauth.py +705 -0
- iac_code-0.9.0/src/iac_code/mcp/output.py +232 -0
- iac_code-0.9.0/src/iac_code/mcp/prompts.py +211 -0
- iac_code-0.9.0/src/iac_code/mcp/skills.py +132 -0
- iac_code-0.9.0/src/iac_code/mcp/storage.py +169 -0
- iac_code-0.9.0/src/iac_code/mcp/tools.py +253 -0
- iac_code-0.9.0/src/iac_code/mcp/types.py +403 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/__init__.py +23 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/display_names.py +6 -0
- iac_code-0.9.0/src/iac_code/pipeline/engine/architecture_graph.py +4241 -0
- iac_code-0.9.0/src/iac_code/pipeline/engine/architecture_meta.py +213 -0
- iac_code-0.9.0/src/iac_code/pipeline/engine/architecture_metas/Categories.json +659 -0
- iac_code-0.9.0/src/iac_code/pipeline/engine/architecture_metas/config.json +107776 -0
- iac_code-0.9.0/src/iac_code/pipeline/engine/architecture_metas/products.json +1432 -0
- iac_code-0.9.0/src/iac_code/pipeline/engine/architecture_resource_inventory.py +299 -0
- iac_code-0.9.0/src/iac_code/pipeline/engine/architecture_rule_candidates.py +690 -0
- iac_code-0.9.0/src/iac_code/pipeline/engine/architecture_rule_drafts.py +579 -0
- iac_code-0.9.0/src/iac_code/pipeline/engine/architecture_rule_facts.py +241 -0
- iac_code-0.9.0/src/iac_code/pipeline/engine/architecture_rules.json +2606 -0
- iac_code-0.9.0/src/iac_code/pipeline/engine/architecture_rules.py +465 -0
- iac_code-0.9.0/src/iac_code/pipeline/engine/architecture_semantic_planning.py +5193 -0
- iac_code-0.9.0/src/iac_code/pipeline/engine/complete_step_tool.py +1124 -0
- iac_code-0.9.0/src/iac_code/pipeline/engine/completion_guard_state.py +129 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/display_replay.py +44 -1
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/events.py +18 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/loader.py +81 -2
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/observability.py +52 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/pipeline_runner.py +645 -71
- iac_code-0.9.0/src/iac_code/pipeline/engine/prerequisites.py +1801 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/recovery.py +18 -1
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/session.py +102 -4
- iac_code-0.9.0/src/iac_code/pipeline/engine/show_diagram_tool.py +290 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/step_executor.py +113 -4
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/step_spec.py +48 -14
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/sub_pipeline_executor.py +128 -19
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/transcript_storage.py +78 -31
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/selling/hooks/deploying.py +53 -0
- iac_code-0.9.0/src/iac_code/pipeline/selling/pipeline.yaml +513 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/selling/prompts/confirm_and_select.md +14 -6
- iac_code-0.9.0/src/iac_code/pipeline/selling/prompts/cost_estimating.md +28 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/selling/prompts/deploying.md +10 -4
- iac_code-0.9.0/src/iac_code/pipeline/selling/prompts/reviewing.md +63 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/selling/prompts/template_generating.md +5 -3
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-deploying → iac_code-0.9.0/src/iac_code/pipeline/selling}/references/template-parameter-recommendation.md +24 -31
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/selling/skills/iac-aliyun-cost/SKILL.md +60 -32
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/selling/skills/iac-aliyun-cost/evals.json +26 -23
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-template-generating → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-cost}/references/template-parameter-recommendation.md +24 -31
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/selling/skills/iac-aliyun-deploying/SKILL.md +32 -21
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/selling/skills/iac-aliyun-deploying/evals.json +57 -20
- {iac_code-0.7.0/src/iac_code/skills/bundled/iac_aliyun → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-deploying}/references/template-parameter-recommendation.md +24 -31
- iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-review/SKILL.md +140 -0
- iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-review/evals.json +284 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/selling/skills/iac-aliyun-template-generating/SKILL.md +2 -2
- iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-template-generating/references/template-parameter-recommendation.md +158 -0
- iac_code-0.9.0/src/iac_code/pipeline/selling/tools/__init__.py +3 -0
- iac_code-0.9.0/src/iac_code/pipeline/selling/tools/infraguard_scan_tool.py +810 -0
- iac_code-0.9.0/src/iac_code/pipeline/selling/tools/ros_deploy_tool.py +617 -0
- iac_code-0.9.0/src/iac_code/pipeline/selling/tools/ros_template_tools.py +17 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/providers/anthropic_provider.py +43 -10
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/providers/azure_openai_provider.py +7 -1
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/providers/dashscope_provider.py +82 -20
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/providers/deepseek_provider.py +6 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/providers/gemini_provider.py +11 -3
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/providers/kimi_provider.py +8 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/providers/lmstudio_provider.py +7 -1
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/providers/manager.py +177 -19
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/providers/minimax_provider.py +6 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/providers/modelscope_provider.py +7 -1
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/providers/ollama_provider.py +7 -1
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/providers/openai_provider.py +95 -4
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/providers/openrouter_provider.py +6 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/providers/registry.py +8 -2
- iac_code-0.9.0/src/iac_code/providers/request_logging.py +97 -0
- iac_code-0.9.0/src/iac_code/providers/request_policy.py +63 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/providers/siliconflow_provider.py +7 -1
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/providers/thinking.py +33 -1
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/providers/volcengine_provider.py +7 -1
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/providers/zhipu_provider.py +8 -0
- iac_code-0.9.0/src/iac_code/services/agent_factory.py +726 -0
- iac_code-0.9.0/src/iac_code/services/permissions/audit.py +1115 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/permissions/loader.py +87 -2
- iac_code-0.9.0/src/iac_code/services/permissions/pipeline.py +230 -0
- iac_code-0.9.0/src/iac_code/services/permissions/rule_scope.py +13 -0
- iac_code-0.9.0/src/iac_code/services/permissions/trusted_roots.py +39 -0
- iac_code-0.9.0/src/iac_code/services/session_backup.py +1183 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/session_index.py +128 -22
- iac_code-0.9.0/src/iac_code/services/session_layout.py +200 -0
- iac_code-0.9.0/src/iac_code/services/session_metadata.py +139 -0
- iac_code-0.9.0/src/iac_code/services/session_storage.py +995 -0
- iac_code-0.9.0/src/iac_code/services/session_usage.py +320 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/telemetry/content_serializer.py +16 -4
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/telemetry/metrics.py +3 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/telemetry/names.py +9 -1
- iac_code-0.9.0/src/iac_code/skills/bundled/iac_aliyun/references/cloud-products/ecs.md +167 -0
- iac_code-0.9.0/src/iac_code/skills/bundled/iac_aliyun/references/cloud-products/oss.md +69 -0
- iac_code-0.9.0/src/iac_code/skills/bundled/iac_aliyun/references/cloud-products/rds.md +95 -0
- iac_code-0.9.0/src/iac_code/skills/bundled/iac_aliyun/references/cloud-products/redis.md +100 -0
- iac_code-0.9.0/src/iac_code/skills/bundled/iac_aliyun/references/cloud-products/slb.md +60 -0
- iac_code-0.9.0/src/iac_code/skills/bundled/iac_aliyun/references/cloud-products/vpc.md +54 -0
- iac_code-0.9.0/src/iac_code/skills/bundled/iac_aliyun/references/ros-template.md +155 -0
- iac_code-0.9.0/src/iac_code/skills/bundled/iac_aliyun/references/template-parameters.md +206 -0
- iac_code-0.9.0/src/iac_code/skills/bundled/iac_aliyun/references/terraform-template.md +101 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/skills/bundled/pac_aliyun/SKILL.md +9 -1
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/skills/bundled/pac_aliyun/references/infraguard-policy-generation.md +42 -8
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/skills/processor.py +11 -1
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/state/app_state.py +1 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/base.py +13 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/bash/mode_validation.py +20 -2
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/bash/permissions.py +71 -7
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/cloud/aliyun/aliyun_api.py +322 -19
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/cloud/aliyun/hooks/ros_validate.py +61 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/cloud/aliyun/ros_stack.py +33 -8
- iac_code-0.9.0/src/iac_code/tools/cloud/aliyun/ros_template_tools.py +356 -0
- iac_code-0.9.0/src/iac_code/tools/cloud/aliyun/template_source.py +94 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/cloud/base_api.py +2 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/cloud/base_stack.py +44 -2
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/cloud/registry.py +4 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/glob.py +135 -9
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/grep.py +48 -8
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/list_files.py +8 -5
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/path_safety.py +57 -1
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/read_file.py +8 -10
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/result_storage.py +19 -4
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/tool_executor.py +25 -8
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/types/__init__.py +2 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/types/permissions.py +33 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/types/stream_events.py +26 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/components/candidate_selection.py +150 -21
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/components/select.py +4 -6
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/core/in_place_render.py +3 -1
- iac_code-0.9.0/src/iac_code/ui/diagram_rendering.py +57 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/dialogs/model_picker.py +12 -8
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/pipeline_display_replay.py +4 -1
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/renderer.py +212 -38
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/repl.py +1061 -42
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/stream_accumulator.py +54 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/transcript_view.py +26 -2
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/utils/image/store.py +72 -32
- iac_code-0.9.0/src/iac_code/utils/path_components.py +26 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/utils/project_paths.py +29 -1
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/utils/public_errors.py +28 -11
- iac_code-0.9.0/src/iac_code/utils/public_paths.py +234 -0
- iac_code-0.9.0/src/iac_code/utils/state_io.py +461 -0
- iac_code-0.9.0/src/iac_code/utils/tool_result_redaction.py +93 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code.egg-info/PKG-INFO +1 -1
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code.egg-info/SOURCES.txt +58 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code.egg-info/requires.txt +1 -0
- iac_code-0.7.0/src/iac_code/__init__.py +0 -2
- iac_code-0.7.0/src/iac_code/a2a/pipeline_paths.py +0 -29
- iac_code-0.7.0/src/iac_code/a2a/pipeline_stream.py +0 -583
- iac_code-0.7.0/src/iac_code/cli/headless.py +0 -211
- iac_code-0.7.0/src/iac_code/i18n/locales/de/LC_MESSAGES/messages.mo +0 -0
- iac_code-0.7.0/src/iac_code/i18n/locales/es/LC_MESSAGES/messages.mo +0 -0
- iac_code-0.7.0/src/iac_code/i18n/locales/fr/LC_MESSAGES/messages.mo +0 -0
- iac_code-0.7.0/src/iac_code/i18n/locales/ja/LC_MESSAGES/messages.mo +0 -0
- iac_code-0.7.0/src/iac_code/i18n/locales/pt/LC_MESSAGES/messages.mo +0 -0
- iac_code-0.7.0/src/iac_code/i18n/locales/zh/LC_MESSAGES/messages.mo +0 -0
- iac_code-0.7.0/src/iac_code/pipeline/engine/complete_step_tool.py +0 -566
- iac_code-0.7.0/src/iac_code/pipeline/engine/completion_guard_state.py +0 -83
- iac_code-0.7.0/src/iac_code/pipeline/engine/show_diagram_tool.py +0 -354
- iac_code-0.7.0/src/iac_code/pipeline/selling/pipeline.yaml +0 -268
- iac_code-0.7.0/src/iac_code/pipeline/selling/prompts/cost_estimating.md +0 -18
- iac_code-0.7.0/src/iac_code/pipeline/selling/prompts/reviewing.md +0 -19
- iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-review/SKILL.md +0 -76
- iac_code-0.7.0/src/iac_code/services/agent_factory.py +0 -213
- iac_code-0.7.0/src/iac_code/services/permissions/pipeline.py +0 -91
- iac_code-0.7.0/src/iac_code/services/permissions/trusted_roots.py +0 -21
- iac_code-0.7.0/src/iac_code/services/session_metadata.py +0 -78
- iac_code-0.7.0/src/iac_code/services/session_storage.py +0 -406
- iac_code-0.7.0/src/iac_code/services/session_usage.py +0 -176
- iac_code-0.7.0/src/iac_code/tools/cloud/aliyun/template_source.py +0 -17
- iac_code-0.7.0/src/iac_code/utils/image/__init__.py +0 -0
- iac_code-0.7.0/src/iac_code/utils/state_io.py +0 -200
- {iac_code-0.7.0 → iac_code-0.9.0}/LICENSE +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/MANIFEST.in +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/README.md +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/setup.cfg +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/agent_card.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/app.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/exposure.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/jsonrpc_passthrough.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/persistence.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/pipeline_recovery.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/push.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/push_queue.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/push_secrets.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/push_worker.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/router.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/signing.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/transport.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/transports/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/transports/base.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/transports/grpc.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/transports/grpc_jsonrpc.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/transports/http.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/transports/redis_streams.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/transports/stdio.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/transports/unix.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/transports/websocket.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/a2a/types.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/acp/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/acp/http_sse.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/acp/mcp.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/acp/metrics.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/acp/slash_registry.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/acp/state.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/acp/tools.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/acp/types.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/acp/version.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/agent/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/agent/agent_types.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/cli/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/cli/install_git_bash.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/cli/update.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/commands/clear.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/commands/compact.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/commands/debug.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/commands/exit.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/commands/help.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/commands/model.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/commands/prompt.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/commands/rename.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/commands/skills.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/commands/status.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/commands/tasks.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/config.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/i18n/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/memory/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/memory/memory_manager.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/memory/memory_tools.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/memory/project_memory.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/memory/recall.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/config.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/constants.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/ask_user_question_tool.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/cleanup.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/context.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/handoff.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/interrupt.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/prompts/interrupt_judge.md +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/public_errors.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/resume_recovery.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/state_machine.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/types.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/ui_contract.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/engine/user_input.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/selling/prompts/architecture_planning.md +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/selling/prompts/confirm_and_select.a2a.md +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/selling/prompts/evaluate_candidates.md +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/selling/prompts/intent_parsing.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-cost → iac_code-0.9.0/src/iac_code/pipeline/selling}/references/cloud-products/ecs.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-cost → iac_code-0.9.0/src/iac_code/pipeline/selling}/references/cloud-products/oss.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-cost → iac_code-0.9.0/src/iac_code/pipeline/selling}/references/cloud-products/rds.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-cost → iac_code-0.9.0/src/iac_code/pipeline/selling}/references/cloud-products/redis.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-cost → iac_code-0.9.0/src/iac_code/pipeline/selling}/references/cloud-products/slb.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-cost → iac_code-0.9.0/src/iac_code/pipeline/selling}/references/cloud-products/vpc.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-cost → iac_code-0.9.0/src/iac_code/pipeline/selling}/references/ros-template.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-cost → iac_code-0.9.0/src/iac_code/pipeline/selling}/references/template-parameters.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-cost → iac_code-0.9.0/src/iac_code/pipeline/selling}/references/terraform-template.md +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/selling/skills/iac-aliyun-architecture/SKILL.md +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/selling/skills/iac-aliyun-architecture/evals.json +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-deploying → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-cost}/references/cloud-products/ecs.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-deploying → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-cost}/references/cloud-products/oss.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-deploying → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-cost}/references/cloud-products/rds.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-deploying → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-cost}/references/cloud-products/redis.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-deploying → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-cost}/references/cloud-products/slb.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-deploying → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-cost}/references/cloud-products/vpc.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-deploying → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-cost}/references/ros-template.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-deploying → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-cost}/references/template-parameters.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-deploying → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-cost}/references/terraform-template.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-template-generating → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-deploying}/references/cloud-products/ecs.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-template-generating → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-deploying}/references/cloud-products/oss.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-template-generating → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-deploying}/references/cloud-products/rds.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-template-generating → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-deploying}/references/cloud-products/redis.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-template-generating → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-deploying}/references/cloud-products/slb.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-template-generating → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-deploying}/references/cloud-products/vpc.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-template-generating → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-deploying}/references/ros-template.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-template-generating → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-deploying}/references/template-parameters.md +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-template-generating → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-deploying}/references/terraform-template.md +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/selling/skills/iac-aliyun-intent/SKILL.md +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/selling/skills/iac-aliyun-intent/evals.json +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/selling/skills/iac-aliyun-template-generating/evals.json +0 -0
- {iac_code-0.7.0/src/iac_code/skills/bundled/iac_aliyun → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-template-generating}/references/cloud-products/ecs.md +0 -0
- {iac_code-0.7.0/src/iac_code/skills/bundled/iac_aliyun → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-template-generating}/references/cloud-products/oss.md +0 -0
- {iac_code-0.7.0/src/iac_code/skills/bundled/iac_aliyun → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-template-generating}/references/cloud-products/rds.md +0 -0
- {iac_code-0.7.0/src/iac_code/skills/bundled/iac_aliyun → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-template-generating}/references/cloud-products/redis.md +0 -0
- {iac_code-0.7.0/src/iac_code/skills/bundled/iac_aliyun → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-template-generating}/references/cloud-products/slb.md +0 -0
- {iac_code-0.7.0/src/iac_code/skills/bundled/iac_aliyun → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-template-generating}/references/cloud-products/vpc.md +0 -0
- {iac_code-0.7.0/src/iac_code/skills/bundled/iac_aliyun → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-template-generating}/references/ros-template.md +0 -0
- {iac_code-0.7.0/src/iac_code/skills/bundled/iac_aliyun → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-template-generating}/references/template-parameters.md +0 -0
- {iac_code-0.7.0/src/iac_code/skills/bundled/iac_aliyun → iac_code-0.9.0/src/iac_code/pipeline/selling/skills/iac-aliyun-template-generating}/references/terraform-template.md +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/pipeline/selling/tools/show_candidate_detail_tool.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/providers/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/providers/base.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/providers/retry.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/providers/stream_watchdog.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/capabilities/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/capabilities/auto_detect.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/capabilities/multimodal.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/cloud_credentials.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/context_manager.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/permissions/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/permissions/storage.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/providers/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/providers/aliyun.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/providers/aliyun_oauth.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/qwenpaw_source.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/session_resolver.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/telemetry/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/telemetry/attributes.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/telemetry/client.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/telemetry/config.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/telemetry/constants.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/telemetry/events.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/telemetry/fallback.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/telemetry/identity.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/telemetry/sanitize.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/telemetry/sink.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/telemetry/tracing.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/telemetry/types.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/token_budget.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/token_counter.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/services/update_checker.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/skills/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/skills/auto_trigger.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/skills/bundled/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/skills/bundled/iac_aliyun/SKILL.md +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/skills/bundled/iac_aliyun/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/skills/bundled/iac_aliyun/auto_trigger.py +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/skills/iac-aliyun-cost → iac_code-0.9.0/src/iac_code/skills/bundled/iac_aliyun}/references/template-parameter-recommendation.md +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/skills/bundled/iac_aliyun/scripts/tf2ros.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/skills/bundled/pac_aliyun/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/skills/bundled/pac_aliyun/auto_trigger.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/skills/bundled/simplify.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/skills/discovery.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/skills/frontmatter.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/skills/listing.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/skills/loader.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/skills/management.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/skills/renderer.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/skills/settings.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/skills/skill_definition.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/skills/skill_tool.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/state/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tasks/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tasks/notification_queue.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tasks/task_state.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tasks/task_tools.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/bash/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/bash/argv_safety.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/bash/bash_tool.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/bash/command_parser.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/bash/path_validation.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/bash/readonly_commands.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/bash/rule_matching.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/bash/safety_checks.py +0 -0
- {iac_code-0.7.0/src/iac_code/pipeline/selling/tools → iac_code-0.9.0/src/iac_code/tools/cloud}/__init__.py +0 -0
- {iac_code-0.7.0/src/iac_code/tools/cloud → iac_code-0.9.0/src/iac_code/tools/cloud/aliyun}/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/cloud/aliyun/aliyun_doc_search.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/cloud/aliyun/api_hooks.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/cloud/aliyun/endpoints.yml +0 -0
- {iac_code-0.7.0/src/iac_code/tools/cloud/aliyun → iac_code-0.9.0/src/iac_code/tools/cloud/aliyun/hooks}/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/cloud/aliyun/hooks/ros_parameters.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/cloud/aliyun/ros_client.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/cloud/aliyun/ros_stack_instances.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/cloud/aliyun/ros_yaml.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/cloud/aliyun/user_agent.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/cloud/types.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/edit_file.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/web_fetch.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/tools/write_file.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/types/skill_source.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/banner.py +0 -0
- {iac_code-0.7.0/src/iac_code/tools/cloud/aliyun/hooks → iac_code-0.9.0/src/iac_code/ui/components}/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/components/dialog.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/components/divider.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/components/fuzzy_picker.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/components/parallel_tabs.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/components/progress_bar.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/components/search_box.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/components/status_icon.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/components/tabs.py +0 -0
- {iac_code-0.7.0/src/iac_code/ui/components → iac_code-0.9.0/src/iac_code/ui/core}/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/core/input_history.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/core/key_event.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/core/prompt_input.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/core/raw_input.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/core/raw_input_win.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/core/screen.py +0 -0
- {iac_code-0.7.0/src/iac_code/ui/core → iac_code-0.9.0/src/iac_code/ui/dialogs}/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/dialogs/global_search.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/dialogs/history_search.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/dialogs/memory.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/dialogs/memory_editor.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/dialogs/quick_open.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/dialogs/resume_picker.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/dialogs/skills_picker.py +0 -0
- {iac_code-0.7.0/src/iac_code/ui/dialogs → iac_code-0.9.0/src/iac_code/ui/keybindings}/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/keybindings/manager.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/pipeline_styles.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/spinner.py +0 -0
- {iac_code-0.7.0/src/iac_code/ui/keybindings → iac_code-0.9.0/src/iac_code/ui/suggestions}/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/suggestions/aggregator.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/suggestions/command_provider.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/suggestions/directory_provider.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/suggestions/file_provider.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/suggestions/shell_history_provider.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/suggestions/skill_provider.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/suggestions/token_extractor.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/ui/suggestions/types.py +0 -0
- {iac_code-0.7.0/src/iac_code/ui/suggestions → iac_code-0.9.0/src/iac_code/utils}/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/utils/background_housekeeping.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/utils/cleanup.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/utils/console.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/utils/file_security.py +0 -0
- {iac_code-0.7.0/src/iac_code/utils → iac_code-0.9.0/src/iac_code/utils/image}/__init__.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/utils/image/clipboard.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/utils/image/format_detect.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/utils/image/pasted_content.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/utils/image/processor.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/utils/image/resizer.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/utils/json_utils.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/utils/log.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/utils/path_locks.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/utils/platform.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/utils/signals.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/utils/tool_input_parser.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code/utils/windows_paths.py +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code.egg-info/dependency_links.txt +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code.egg-info/entry_points.txt +0 -0
- {iac_code-0.7.0 → iac_code-0.9.0}/src/iac_code.egg-info/top_level.txt +0 -0
|
@@ -15,7 +15,7 @@ from setuptools.command.sdist import sdist
|
|
|
15
15
|
INIT_PATH = Path("src/iac_code/__init__.py")
|
|
16
16
|
LOCALES_DIR = Path("src/iac_code/i18n/locales")
|
|
17
17
|
PROJECT_ROOT = Path(__file__).resolve().parent
|
|
18
|
-
|
|
18
|
+
SELLING_REFERENCES_DIR = PROJECT_ROOT / "src/iac_code/pipeline/selling/references"
|
|
19
19
|
SELLING_IAC_ALIYUN_SKILLS = (
|
|
20
20
|
"iac-aliyun-template-generating",
|
|
21
21
|
"iac-aliyun-cost",
|
|
@@ -207,10 +207,54 @@ def _replace_release_date():
|
|
|
207
207
|
INIT_PATH.write_text(content, encoding="utf-8")
|
|
208
208
|
|
|
209
209
|
|
|
210
|
+
def _git_symlink_placeholder_target(path: Path) -> Path | None:
|
|
211
|
+
"""Return the target for a Windows core.symlinks=false placeholder file."""
|
|
212
|
+
if path.is_symlink() or not path.is_file():
|
|
213
|
+
return None
|
|
214
|
+
try:
|
|
215
|
+
if path.stat().st_size > 4096:
|
|
216
|
+
return None
|
|
217
|
+
raw_target = path.read_text(encoding="utf-8")
|
|
218
|
+
except (OSError, UnicodeDecodeError):
|
|
219
|
+
return None
|
|
220
|
+
if not raw_target or "\n" in raw_target or "\r" in raw_target:
|
|
221
|
+
return None
|
|
222
|
+
target = Path(raw_target)
|
|
223
|
+
if not target.is_absolute():
|
|
224
|
+
target = path.parent / target
|
|
225
|
+
try:
|
|
226
|
+
return target.resolve(strict=True)
|
|
227
|
+
except OSError:
|
|
228
|
+
return None
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
def _copy_reference_entry(source: Path, target: Path) -> None:
|
|
232
|
+
placeholder_target = _git_symlink_placeholder_target(source)
|
|
233
|
+
if placeholder_target is not None:
|
|
234
|
+
source = placeholder_target
|
|
235
|
+
elif source.is_symlink():
|
|
236
|
+
source = source.resolve(strict=True)
|
|
237
|
+
|
|
238
|
+
if source.is_dir():
|
|
239
|
+
target.mkdir(parents=True, exist_ok=True)
|
|
240
|
+
for child in source.iterdir():
|
|
241
|
+
_copy_reference_entry(child, target / child.name)
|
|
242
|
+
return
|
|
243
|
+
|
|
244
|
+
target.parent.mkdir(parents=True, exist_ok=True)
|
|
245
|
+
shutil.copy2(source, target)
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
def _copy_reference_tree(source: Path, target: Path) -> None:
|
|
249
|
+
target.mkdir(parents=True, exist_ok=True)
|
|
250
|
+
for child in source.iterdir():
|
|
251
|
+
_copy_reference_entry(child, target / child.name)
|
|
252
|
+
|
|
253
|
+
|
|
210
254
|
def _copy_selling_skill_references_to_package_root(package_root) -> None:
|
|
211
255
|
"""Expand selling-skill reference symlinks into real dirs under an iac_code package root."""
|
|
212
|
-
if not
|
|
213
|
-
raise RuntimeError("references directory not found: %s" %
|
|
256
|
+
if not SELLING_REFERENCES_DIR.is_dir():
|
|
257
|
+
raise RuntimeError("references directory not found: %s" % SELLING_REFERENCES_DIR)
|
|
214
258
|
|
|
215
259
|
package_root = Path(package_root)
|
|
216
260
|
for skill_name in SELLING_IAC_ALIYUN_SKILLS:
|
|
@@ -220,7 +264,7 @@ def _copy_selling_skill_references_to_package_root(package_root) -> None:
|
|
|
220
264
|
elif target.exists():
|
|
221
265
|
shutil.rmtree(target)
|
|
222
266
|
target.parent.mkdir(parents=True, exist_ok=True)
|
|
223
|
-
|
|
267
|
+
_copy_reference_tree(SELLING_REFERENCES_DIR, target)
|
|
224
268
|
|
|
225
269
|
|
|
226
270
|
def _copy_selling_skill_references(build_lib: str) -> None:
|
|
@@ -6,13 +6,28 @@ import ntpath
|
|
|
6
6
|
import os
|
|
7
7
|
import re
|
|
8
8
|
import uuid
|
|
9
|
+
from collections.abc import Iterable, Mapping
|
|
9
10
|
from dataclasses import asdict, dataclass
|
|
10
11
|
from pathlib import Path
|
|
11
12
|
from typing import Any
|
|
12
13
|
from urllib.parse import quote, unquote, urlsplit
|
|
13
14
|
|
|
14
15
|
from iac_code.i18n import _
|
|
16
|
+
from iac_code.services.session_layout import (
|
|
17
|
+
SESSION_LAYOUT_VERSION_V2,
|
|
18
|
+
SessionPaths,
|
|
19
|
+
UnsupportedSessionLayoutError,
|
|
20
|
+
ensure_session_owned_dir,
|
|
21
|
+
require_supported_session_layout,
|
|
22
|
+
)
|
|
15
23
|
from iac_code.utils.public_errors import sanitize_public_text
|
|
24
|
+
from iac_code.utils.public_paths import relativize_public_file_uri
|
|
25
|
+
from iac_code.utils.state_io import atomic_write_bytes
|
|
26
|
+
from iac_code.utils.tool_result_redaction import (
|
|
27
|
+
REDACTED_TOOL_RESULT_VALUE,
|
|
28
|
+
is_file_content_key,
|
|
29
|
+
redact_file_content_from_json_string,
|
|
30
|
+
)
|
|
16
31
|
|
|
17
32
|
PUBLIC_ARTIFACT_URI_PREFIX = "iac-code-artifact://"
|
|
18
33
|
_PUBLIC_ARTIFACT_URI_SCHEME = "iac-code-artifact"
|
|
@@ -104,64 +119,107 @@ def _windows_safe_filename(filename: str) -> str:
|
|
|
104
119
|
return sanitized
|
|
105
120
|
|
|
106
121
|
|
|
107
|
-
def sanitize_public_artifact_data(
|
|
122
|
+
def sanitize_public_artifact_data(
|
|
123
|
+
value: Any,
|
|
124
|
+
*,
|
|
125
|
+
public_path_roots: Iterable[Mapping[str, str]] | None = None,
|
|
126
|
+
) -> Any:
|
|
108
127
|
if isinstance(value, list):
|
|
109
|
-
return [sanitize_public_artifact_data(item) for item in value]
|
|
128
|
+
return [sanitize_public_artifact_data(item, public_path_roots=public_path_roots) for item in value]
|
|
110
129
|
if isinstance(value, tuple):
|
|
111
|
-
return [sanitize_public_artifact_data(item) for item in value]
|
|
130
|
+
return [sanitize_public_artifact_data(item, public_path_roots=public_path_roots) for item in value]
|
|
112
131
|
if isinstance(value, str):
|
|
113
|
-
return _sanitize_artifact_scalar_string(value)
|
|
132
|
+
return _sanitize_artifact_scalar_string(value, public_path_roots=public_path_roots)
|
|
114
133
|
if not isinstance(value, dict):
|
|
115
134
|
return value
|
|
116
135
|
|
|
117
136
|
sanitized: dict[Any, Any] = {}
|
|
118
137
|
for key, raw_value in value.items():
|
|
119
138
|
key_name = str(key)
|
|
139
|
+
output_key, key_is_public_path = _sanitize_public_mapping_key(key, public_path_roots=public_path_roots)
|
|
120
140
|
if key_name.lower() in _ARTIFACT_PAYLOAD_KEYS:
|
|
121
141
|
continue
|
|
122
|
-
if _is_sensitive_output_key(key_name):
|
|
123
|
-
sanitized[
|
|
142
|
+
if not key_is_public_path and _is_sensitive_output_key(key_name):
|
|
143
|
+
sanitized[output_key] = "[REDACTED]"
|
|
144
|
+
continue
|
|
145
|
+
if not key_is_public_path and is_file_content_key(key_name):
|
|
146
|
+
sanitized[output_key] = REDACTED_TOOL_RESULT_VALUE
|
|
124
147
|
continue
|
|
125
148
|
if _is_artifact_uri_key(key_name):
|
|
126
149
|
if isinstance(raw_value, str):
|
|
127
|
-
sanitized_value = _sanitize_artifact_string(key_name, raw_value)
|
|
150
|
+
sanitized_value = _sanitize_artifact_string(key_name, raw_value, public_path_roots=public_path_roots)
|
|
128
151
|
if sanitized_value is not None:
|
|
129
|
-
sanitized[
|
|
152
|
+
sanitized[output_key] = sanitized_value
|
|
130
153
|
continue
|
|
131
154
|
if isinstance(raw_value, str):
|
|
132
|
-
sanitized_value = _sanitize_artifact_string(key_name, raw_value)
|
|
155
|
+
sanitized_value = _sanitize_artifact_string(key_name, raw_value, public_path_roots=public_path_roots)
|
|
133
156
|
if sanitized_value is None:
|
|
134
157
|
continue
|
|
135
|
-
sanitized[
|
|
158
|
+
sanitized[output_key] = sanitized_value
|
|
136
159
|
continue
|
|
137
|
-
sanitized[
|
|
160
|
+
sanitized[output_key] = sanitize_public_artifact_data(raw_value, public_path_roots=public_path_roots)
|
|
138
161
|
return sanitized
|
|
139
162
|
|
|
140
163
|
|
|
141
|
-
def sanitize_public_tool_output_data(
|
|
164
|
+
def sanitize_public_tool_output_data(
|
|
165
|
+
value: Any,
|
|
166
|
+
*,
|
|
167
|
+
public_path_roots: Iterable[Mapping[str, str]] | None = None,
|
|
168
|
+
) -> Any:
|
|
142
169
|
if isinstance(value, str):
|
|
143
|
-
|
|
170
|
+
value = redact_file_content_from_json_string(value)
|
|
171
|
+
return sanitize_public_artifact_text(value, fallback_summary="", public_path_roots=public_path_roots)
|
|
144
172
|
if isinstance(value, list):
|
|
145
|
-
return [sanitize_public_tool_output_data(item) for item in value]
|
|
173
|
+
return [sanitize_public_tool_output_data(item, public_path_roots=public_path_roots) for item in value]
|
|
146
174
|
if isinstance(value, tuple):
|
|
147
|
-
return [sanitize_public_tool_output_data(item) for item in value]
|
|
175
|
+
return [sanitize_public_tool_output_data(item, public_path_roots=public_path_roots) for item in value]
|
|
148
176
|
if not isinstance(value, dict):
|
|
149
177
|
return value
|
|
150
178
|
if _looks_like_artifact_payload_dict(value):
|
|
151
|
-
return sanitize_public_artifact_data(value)
|
|
179
|
+
return sanitize_public_artifact_data(value, public_path_roots=public_path_roots)
|
|
152
180
|
|
|
153
181
|
sanitized: dict[Any, Any] = {}
|
|
154
182
|
for key, raw_value in value.items():
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
sanitized[
|
|
183
|
+
key_name = str(key)
|
|
184
|
+
output_key, key_is_public_path = _sanitize_public_mapping_key(key, public_path_roots=public_path_roots)
|
|
185
|
+
if key_name.lower() in _ARTIFACT_CONTAINER_KEYS:
|
|
186
|
+
sanitized[output_key] = sanitize_public_artifact_data(raw_value, public_path_roots=public_path_roots)
|
|
187
|
+
elif not key_is_public_path and _is_sensitive_output_key(key_name):
|
|
188
|
+
sanitized[output_key] = "[REDACTED]"
|
|
189
|
+
elif not key_is_public_path and is_file_content_key(key_name):
|
|
190
|
+
sanitized[output_key] = REDACTED_TOOL_RESULT_VALUE
|
|
159
191
|
else:
|
|
160
|
-
sanitized[
|
|
192
|
+
sanitized[output_key] = sanitize_public_tool_output_data(raw_value, public_path_roots=public_path_roots)
|
|
161
193
|
return sanitized
|
|
162
194
|
|
|
163
195
|
|
|
164
|
-
def
|
|
196
|
+
def _sanitize_public_mapping_key(
|
|
197
|
+
key: Any,
|
|
198
|
+
*,
|
|
199
|
+
public_path_roots: Iterable[Mapping[str, str]] | None = None,
|
|
200
|
+
) -> tuple[Any, bool]:
|
|
201
|
+
if not isinstance(key, str):
|
|
202
|
+
return key, False
|
|
203
|
+
sanitized_key = _sanitize_artifact_scalar_string(key, public_path_roots=public_path_roots)
|
|
204
|
+
return sanitized_key, sanitized_key != key and _is_path_like_mapping_key(key)
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
def _is_path_like_mapping_key(key: str) -> bool:
|
|
208
|
+
stripped = key.strip()
|
|
209
|
+
if not stripped or re.search(r"\s", stripped):
|
|
210
|
+
return False
|
|
211
|
+
if stripped.lower().startswith("file://"):
|
|
212
|
+
parsed = urlsplit(stripped)
|
|
213
|
+
return parsed.scheme.lower() == "file" and bool(parsed.path or parsed.netloc)
|
|
214
|
+
return bool(stripped.startswith("/") or stripped.startswith("\\\\") or ntpath.splitdrive(stripped)[0])
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
def _sanitize_artifact_string(
|
|
218
|
+
key: str,
|
|
219
|
+
value: str,
|
|
220
|
+
*,
|
|
221
|
+
public_path_roots: Iterable[Mapping[str, str]] | None = None,
|
|
222
|
+
) -> str | None:
|
|
165
223
|
if _is_artifact_uri_key(key):
|
|
166
224
|
return value if is_valid_public_artifact_uri(value) else None
|
|
167
225
|
if key.lower() in {"filename", "name"}:
|
|
@@ -171,34 +229,51 @@ def _sanitize_artifact_string(key: str, value: str) -> str | None:
|
|
|
171
229
|
except UnsafeArtifactNameError:
|
|
172
230
|
pass
|
|
173
231
|
if value.lower().startswith("file://"):
|
|
174
|
-
return "[PATH]"
|
|
175
|
-
return _sanitize_artifact_scalar_string(value)
|
|
232
|
+
return relativize_public_file_uri(value, public_path_roots) or "[PATH]"
|
|
233
|
+
return _sanitize_artifact_scalar_string(value, public_path_roots=public_path_roots)
|
|
176
234
|
|
|
177
235
|
|
|
178
|
-
def _sanitize_artifact_scalar_string(
|
|
236
|
+
def _sanitize_artifact_scalar_string(
|
|
237
|
+
value: str,
|
|
238
|
+
*,
|
|
239
|
+
public_path_roots: Iterable[Mapping[str, str]] | None = None,
|
|
240
|
+
) -> str:
|
|
179
241
|
if value.lower().startswith("file://"):
|
|
180
|
-
return "[PATH]"
|
|
242
|
+
return relativize_public_file_uri(value, public_path_roots) or "[PATH]"
|
|
181
243
|
decoded = unquote(value)
|
|
182
244
|
if decoded != value:
|
|
183
245
|
if decoded.lower().startswith("file://"):
|
|
184
|
-
return "[PATH]"
|
|
185
|
-
decoded_sanitized = sanitize_public_artifact_text(
|
|
246
|
+
return relativize_public_file_uri(decoded, public_path_roots) or "[PATH]"
|
|
247
|
+
decoded_sanitized = sanitize_public_artifact_text(
|
|
248
|
+
decoded,
|
|
249
|
+
fallback_summary="",
|
|
250
|
+
public_path_roots=public_path_roots,
|
|
251
|
+
)
|
|
186
252
|
if decoded_sanitized != decoded:
|
|
187
253
|
return decoded_sanitized
|
|
188
|
-
return sanitize_public_artifact_text(value, fallback_summary="")
|
|
254
|
+
return sanitize_public_artifact_text(value, fallback_summary="", public_path_roots=public_path_roots)
|
|
189
255
|
|
|
190
256
|
|
|
191
|
-
def sanitize_public_artifact_text(
|
|
257
|
+
def sanitize_public_artifact_text(
|
|
258
|
+
value: str,
|
|
259
|
+
*,
|
|
260
|
+
fallback_summary: str | None = None,
|
|
261
|
+
public_path_roots: Iterable[Mapping[str, str]] | None = None,
|
|
262
|
+
) -> str:
|
|
192
263
|
if fallback_summary is None:
|
|
193
264
|
fallback_summary = _("Unknown error")
|
|
194
265
|
protected, placeholders = _replace_public_artifact_uri_tokens(value)
|
|
195
|
-
protected = _replace_file_uri_tokens(protected)
|
|
196
|
-
sanitized = sanitize_public_text(
|
|
266
|
+
protected = _replace_file_uri_tokens(protected, public_path_roots=public_path_roots)
|
|
267
|
+
sanitized = sanitize_public_text(
|
|
268
|
+
protected,
|
|
269
|
+
fallback_summary=fallback_summary,
|
|
270
|
+
public_path_roots=public_path_roots,
|
|
271
|
+
)
|
|
197
272
|
decoded_raw = unquote(protected)
|
|
198
273
|
decoded, decoded_placeholders = _replace_public_artifact_uri_tokens(decoded_raw, prefix="__IAC_CODE_DECODED_URI_")
|
|
199
|
-
decoded = _replace_file_uri_tokens(decoded)
|
|
274
|
+
decoded = _replace_file_uri_tokens(decoded, public_path_roots=public_path_roots)
|
|
200
275
|
if decoded_raw != protected:
|
|
201
|
-
decoded_sanitized = sanitize_public_text(decoded, fallback_summary="")
|
|
276
|
+
decoded_sanitized = sanitize_public_text(decoded, fallback_summary="", public_path_roots=public_path_roots)
|
|
202
277
|
if decoded != decoded_raw or decoded_sanitized != decoded:
|
|
203
278
|
sanitized = decoded_sanitized
|
|
204
279
|
placeholders.update(decoded_placeholders)
|
|
@@ -207,13 +282,20 @@ def sanitize_public_artifact_text(value: str, *, fallback_summary: str | None =
|
|
|
207
282
|
return sanitized
|
|
208
283
|
|
|
209
284
|
|
|
210
|
-
def _replace_file_uri_tokens(
|
|
285
|
+
def _replace_file_uri_tokens(
|
|
286
|
+
value: str,
|
|
287
|
+
*,
|
|
288
|
+
public_path_roots: Iterable[Mapping[str, str]] | None = None,
|
|
289
|
+
) -> str:
|
|
211
290
|
def replace_file_uri(match: re.Match[str]) -> str:
|
|
212
291
|
uri = match.group(0)
|
|
213
292
|
trailing = ""
|
|
214
293
|
while uri and uri[-1] in ".,:!?":
|
|
215
294
|
trailing = uri[-1] + trailing
|
|
216
295
|
uri = uri[:-1]
|
|
296
|
+
public_path = relativize_public_file_uri(uri, public_path_roots)
|
|
297
|
+
if public_path is not None:
|
|
298
|
+
return f"{public_path}{trailing}"
|
|
217
299
|
return f"[PATH]{trailing}"
|
|
218
300
|
|
|
219
301
|
return _FILE_URI_TEXT_PATTERN.sub(replace_file_uri, value)
|
|
@@ -333,8 +415,9 @@ class A2AArtifactMetadata:
|
|
|
333
415
|
|
|
334
416
|
|
|
335
417
|
class A2AArtifactStore:
|
|
336
|
-
def __init__(self, root: str | Path) -> None:
|
|
418
|
+
def __init__(self, root: str | Path, *, session_dir: str | Path | None = None) -> None:
|
|
337
419
|
self.root = Path(root)
|
|
420
|
+
self._session_dir = Path(session_dir) if session_dir is not None else None
|
|
338
421
|
|
|
339
422
|
def save_text(self, *, filename: str, content: str, media_type: str) -> A2AArtifactMetadata:
|
|
340
423
|
encoded = content.encode("utf-8")
|
|
@@ -348,9 +431,12 @@ class A2AArtifactStore:
|
|
|
348
431
|
safe_name = self._safe_filename(filename)
|
|
349
432
|
artifact_id = str(uuid.uuid4())
|
|
350
433
|
artifact_dir = self.root / artifact_id
|
|
351
|
-
|
|
434
|
+
if self._session_dir is not None:
|
|
435
|
+
ensure_session_owned_dir(self._session_dir, artifact_dir)
|
|
436
|
+
else:
|
|
437
|
+
artifact_dir.mkdir(parents=True, exist_ok=False)
|
|
352
438
|
path = artifact_dir / safe_name
|
|
353
|
-
path
|
|
439
|
+
atomic_write_bytes(path, content)
|
|
354
440
|
return A2AArtifactMetadata(
|
|
355
441
|
artifact_id=artifact_id,
|
|
356
442
|
filename=safe_name,
|
|
@@ -373,3 +459,13 @@ class A2AArtifactStore:
|
|
|
373
459
|
@staticmethod
|
|
374
460
|
def _safe_filename(filename: str) -> str:
|
|
375
461
|
return safe_artifact_filename(filename)
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
def artifact_store_for_session(session_dir: str | Path) -> A2AArtifactStore:
|
|
465
|
+
session_path = Path(session_dir)
|
|
466
|
+
version = require_supported_session_layout(session_path)
|
|
467
|
+
if version != SESSION_LAYOUT_VERSION_V2:
|
|
468
|
+
raise UnsupportedSessionLayoutError(_("Unsupported session layout version: {version}").format(version="legacy"))
|
|
469
|
+
session_paths = SessionPaths.from_session_dir(session_path)
|
|
470
|
+
root = ensure_session_owned_dir(session_path, session_paths.a2a_artifacts_dir)
|
|
471
|
+
return A2AArtifactStore(root, session_dir=session_path)
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import asyncio
|
|
4
|
+
import logging
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from iac_code.i18n import _
|
|
8
|
+
from iac_code.services.session_backup import BackupReason, SessionBackupBlocked
|
|
9
|
+
|
|
10
|
+
logger = logging.getLogger(__name__)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
async def backup_session_async(
|
|
14
|
+
backup_service: Any,
|
|
15
|
+
cwd: str,
|
|
16
|
+
session_id: str,
|
|
17
|
+
*,
|
|
18
|
+
reason: BackupReason,
|
|
19
|
+
critical: bool,
|
|
20
|
+
metrics: Any | None = None,
|
|
21
|
+
) -> Any | None:
|
|
22
|
+
failed_recorded = False
|
|
23
|
+
try:
|
|
24
|
+
result = await asyncio.to_thread(
|
|
25
|
+
backup_service.backup_session,
|
|
26
|
+
cwd,
|
|
27
|
+
session_id,
|
|
28
|
+
reason=reason,
|
|
29
|
+
critical=critical,
|
|
30
|
+
)
|
|
31
|
+
retry_count = _retry_count(result)
|
|
32
|
+
if getattr(result, "enabled", False) and not getattr(result, "succeeded", True):
|
|
33
|
+
message = str(
|
|
34
|
+
getattr(result, "error", None) or _("Session backup failed. Retry after the backup path is available.")
|
|
35
|
+
)
|
|
36
|
+
_record_backup_failed(metrics, reason=reason, critical=critical, retry_count=retry_count)
|
|
37
|
+
failed_recorded = True
|
|
38
|
+
if critical:
|
|
39
|
+
raise SessionBackupBlocked(message, retry_count=retry_count, result=result)
|
|
40
|
+
logger.warning(
|
|
41
|
+
"A2A session backup failed reason=%s critical=%s retry_count=%s: %s",
|
|
42
|
+
reason.value,
|
|
43
|
+
critical,
|
|
44
|
+
retry_count,
|
|
45
|
+
message,
|
|
46
|
+
)
|
|
47
|
+
elif getattr(result, "enabled", False):
|
|
48
|
+
_record_backup_succeeded(metrics, reason=reason, critical=critical, retry_count=retry_count)
|
|
49
|
+
return result
|
|
50
|
+
except Exception as exc:
|
|
51
|
+
retry_count = _retry_count_from_exception(exc)
|
|
52
|
+
if not failed_recorded:
|
|
53
|
+
_record_backup_failed(metrics, reason=reason, critical=critical, retry_count=retry_count)
|
|
54
|
+
if critical:
|
|
55
|
+
raise
|
|
56
|
+
logger.warning(
|
|
57
|
+
"A2A session backup failed reason=%s critical=%s retry_count=%s error_type=%s",
|
|
58
|
+
reason.value,
|
|
59
|
+
critical,
|
|
60
|
+
retry_count,
|
|
61
|
+
type(exc).__name__,
|
|
62
|
+
)
|
|
63
|
+
return None
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def _retry_count(result: Any) -> int:
|
|
67
|
+
value = getattr(result, "retry_count", 0)
|
|
68
|
+
return value if isinstance(value, int) and value >= 0 else 0
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def _retry_count_from_exception(exc: BaseException) -> int:
|
|
72
|
+
value = getattr(exc, "retry_count", 0)
|
|
73
|
+
return value if isinstance(value, int) and value >= 0 else 0
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def _record_backup_succeeded(metrics: Any | None, *, reason: BackupReason, critical: bool, retry_count: int) -> None:
|
|
77
|
+
record = getattr(metrics, "record_backup_succeeded", None)
|
|
78
|
+
if callable(record):
|
|
79
|
+
try:
|
|
80
|
+
record(reason=reason.value, critical=critical, retry_count=retry_count)
|
|
81
|
+
except Exception as exc:
|
|
82
|
+
logger.debug("Failed to record A2A backup_succeeded metric: %s", type(exc).__name__)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def _record_backup_failed(metrics: Any | None, *, reason: BackupReason, critical: bool, retry_count: int) -> None:
|
|
86
|
+
record = getattr(metrics, "record_backup_failed", None)
|
|
87
|
+
if callable(record):
|
|
88
|
+
try:
|
|
89
|
+
record(reason=reason.value, critical=critical, retry_count=retry_count)
|
|
90
|
+
except Exception as exc:
|
|
91
|
+
logger.debug("Failed to record A2A backup_failed metric: %s", type(exc).__name__)
|
|
@@ -132,6 +132,10 @@ class A2AClient:
|
|
|
132
132
|
cwd: str,
|
|
133
133
|
context_id: str | None = None,
|
|
134
134
|
model: str | None = None,
|
|
135
|
+
iac_code_api_key: str | None = None,
|
|
136
|
+
thinking_enabled: bool | None = None,
|
|
137
|
+
thinking_effort: str | None = None,
|
|
138
|
+
thinking_budget: int | None = None,
|
|
135
139
|
) -> A2AClientResponse:
|
|
136
140
|
payload = self._message_payload(
|
|
137
141
|
method="SendMessage",
|
|
@@ -139,6 +143,10 @@ class A2AClient:
|
|
|
139
143
|
cwd=cwd,
|
|
140
144
|
context_id=context_id,
|
|
141
145
|
model=model,
|
|
146
|
+
iac_code_api_key=iac_code_api_key,
|
|
147
|
+
thinking_enabled=thinking_enabled,
|
|
148
|
+
thinking_effort=thinking_effort,
|
|
149
|
+
thinking_budget=thinking_budget,
|
|
142
150
|
)
|
|
143
151
|
transport = self._make_transport_client(url)
|
|
144
152
|
response = await transport.send(payload)
|
|
@@ -152,6 +160,10 @@ class A2AClient:
|
|
|
152
160
|
cwd: str,
|
|
153
161
|
context_id: str | None = None,
|
|
154
162
|
model: str | None = None,
|
|
163
|
+
iac_code_api_key: str | None = None,
|
|
164
|
+
thinking_enabled: bool | None = None,
|
|
165
|
+
thinking_effort: str | None = None,
|
|
166
|
+
thinking_budget: int | None = None,
|
|
155
167
|
) -> AsyncIterator[dict[str, Any]]:
|
|
156
168
|
payload = self._message_payload(
|
|
157
169
|
method="SendStreamingMessage",
|
|
@@ -159,6 +171,10 @@ class A2AClient:
|
|
|
159
171
|
cwd=cwd,
|
|
160
172
|
context_id=context_id,
|
|
161
173
|
model=model,
|
|
174
|
+
iac_code_api_key=iac_code_api_key,
|
|
175
|
+
thinking_enabled=thinking_enabled,
|
|
176
|
+
thinking_effort=thinking_effort,
|
|
177
|
+
thinking_budget=thinking_budget,
|
|
162
178
|
)
|
|
163
179
|
transport = self._make_transport_client(url)
|
|
164
180
|
async for event in transport.stream(payload):
|
|
@@ -354,12 +370,31 @@ class A2AClient:
|
|
|
354
370
|
cwd: str,
|
|
355
371
|
context_id: str | None,
|
|
356
372
|
model: str | None,
|
|
373
|
+
iac_code_api_key: str | None,
|
|
374
|
+
thinking_enabled: bool | None,
|
|
375
|
+
thinking_effort: str | None,
|
|
376
|
+
thinking_budget: int | None,
|
|
357
377
|
) -> dict[str, Any]:
|
|
358
|
-
iac_code_metadata = {"cwd": cwd}
|
|
378
|
+
iac_code_metadata: dict[str, Any] = {"cwd": cwd}
|
|
359
379
|
if model:
|
|
360
380
|
stripped_model = model.strip()
|
|
361
381
|
if stripped_model:
|
|
362
382
|
iac_code_metadata["iac_code_model"] = stripped_model
|
|
383
|
+
if iac_code_api_key:
|
|
384
|
+
stripped_api_key = iac_code_api_key.strip()
|
|
385
|
+
if stripped_api_key:
|
|
386
|
+
iac_code_metadata["iac_code_api_key"] = stripped_api_key
|
|
387
|
+
thinking: dict[str, Any] = {}
|
|
388
|
+
if thinking_enabled is not None:
|
|
389
|
+
thinking["enabled"] = thinking_enabled
|
|
390
|
+
if thinking_effort:
|
|
391
|
+
stripped_effort = thinking_effort.strip()
|
|
392
|
+
if stripped_effort:
|
|
393
|
+
thinking["effort"] = stripped_effort
|
|
394
|
+
if isinstance(thinking_budget, int) and not isinstance(thinking_budget, bool) and thinking_budget > 0:
|
|
395
|
+
thinking["budget"] = thinking_budget
|
|
396
|
+
if thinking:
|
|
397
|
+
iac_code_metadata["thinking"] = thinking
|
|
363
398
|
message: dict[str, Any] = {
|
|
364
399
|
"messageId": str(uuid.uuid4()),
|
|
365
400
|
"role": "ROLE_USER",
|