python-hwpx-automation 6.0.3__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.
- hwpx_automation/__init__.py +61 -0
- hwpx_automation/__init__.pyi +27 -0
- hwpx_automation/__main__.py +8 -0
- hwpx_automation/agent_document.py +392 -0
- hwpx_automation/api.py +136 -0
- hwpx_automation/blind_eval.py +407 -0
- hwpx_automation/capabilities.py +110 -0
- hwpx_automation/compat.py +48 -0
- hwpx_automation/configuration.py +60 -0
- hwpx_automation/core/__init__.py +2 -0
- hwpx_automation/core/content.py +762 -0
- hwpx_automation/core/context.py +111 -0
- hwpx_automation/core/diff.py +53 -0
- hwpx_automation/core/document.py +37 -0
- hwpx_automation/core/formatting.py +513 -0
- hwpx_automation/core/handles.py +24 -0
- hwpx_automation/core/locations.py +205 -0
- hwpx_automation/core/locator.py +162 -0
- hwpx_automation/core/plan.py +680 -0
- hwpx_automation/core/resources.py +42 -0
- hwpx_automation/core/search.py +296 -0
- hwpx_automation/core/transactions.py +434 -0
- hwpx_automation/core/txn.py +48 -0
- hwpx_automation/document_state.py +95 -0
- hwpx_automation/errors.py +174 -0
- hwpx_automation/execution_lock.py +15 -0
- hwpx_automation/fastmcp_adapter.py +672 -0
- hwpx_automation/form_fill.py +1177 -0
- hwpx_automation/form_output_models.py +223 -0
- hwpx_automation/handlers/__init__.py +2 -0
- hwpx_automation/handlers/_shared.py +377 -0
- hwpx_automation/handlers/agent_document.py +257 -0
- hwpx_automation/handlers/authoring.py +750 -0
- hwpx_automation/handlers/content_edit.py +1078 -0
- hwpx_automation/handlers/form_fill.py +607 -0
- hwpx_automation/handlers/layout_style.py +660 -0
- hwpx_automation/handlers/quality_render.py +566 -0
- hwpx_automation/handlers/read_export.py +1295 -0
- hwpx_automation/handlers/specialized.py +624 -0
- hwpx_automation/handlers/tracked_changes.py +589 -0
- hwpx_automation/handlers/workflow.py +105 -0
- hwpx_automation/hwp_converter.py +227 -0
- hwpx_automation/hwp_support.py +94 -0
- hwpx_automation/hwpx_ops.py +1439 -0
- hwpx_automation/identity.json +263 -0
- hwpx_automation/identity.py +18 -0
- hwpx_automation/ingest_adapters.py +85 -0
- hwpx_automation/markdown_plan.py +216 -0
- hwpx_automation/mcp_cli.py +29 -0
- hwpx_automation/metadata/tools_meta.py +40 -0
- hwpx_automation/mixed_form.py +3007 -0
- hwpx_automation/mutation_models.py +401 -0
- hwpx_automation/network_policy.py +232 -0
- hwpx_automation/office/__init__.py +14 -0
- hwpx_automation/office/agent/__init__.py +125 -0
- hwpx_automation/office/agent/_batch_verification.py +383 -0
- hwpx_automation/office/agent/blueprint/__init__.py +58 -0
- hwpx_automation/office/agent/blueprint/bundle.py +282 -0
- hwpx_automation/office/agent/blueprint/catalog.py +136 -0
- hwpx_automation/office/agent/blueprint/dump.py +520 -0
- hwpx_automation/office/agent/blueprint/mapping.py +312 -0
- hwpx_automation/office/agent/blueprint/model.py +722 -0
- hwpx_automation/office/agent/blueprint/native.py +621 -0
- hwpx_automation/office/agent/blueprint/replay.py +622 -0
- hwpx_automation/office/agent/catalog.py +252 -0
- hwpx_automation/office/agent/cli.py +647 -0
- hwpx_automation/office/agent/commands.py +1383 -0
- hwpx_automation/office/agent/document.py +801 -0
- hwpx_automation/office/agent/form_plan.py +1760 -0
- hwpx_automation/office/agent/model.py +808 -0
- hwpx_automation/office/agent/path.py +155 -0
- hwpx_automation/office/agent/query.py +230 -0
- hwpx_automation/office/agent/story.py +207 -0
- hwpx_automation/office/authoring/__init__.py +3542 -0
- hwpx_automation/office/authoring/advanced_generators.py +154 -0
- hwpx_automation/office/authoring/builder/__init__.py +52 -0
- hwpx_automation/office/authoring/builder/core.py +996 -0
- hwpx_automation/office/authoring/builder/report.py +195 -0
- hwpx_automation/office/authoring/design/__init__.py +30 -0
- hwpx_automation/office/authoring/design/_support.py +144 -0
- hwpx_automation/office/authoring/design/composer.py +282 -0
- hwpx_automation/office/authoring/design/harvest.py +305 -0
- hwpx_automation/office/authoring/design/plan.py +69 -0
- hwpx_automation/office/authoring/design/profile.py +88 -0
- hwpx_automation/office/authoring/design/profiles/application_form/fragments/body.xml +1 -0
- hwpx_automation/office/authoring/design/profiles/application_form/fragments/heading.xml +1 -0
- hwpx_automation/office/authoring/design/profiles/application_form/fragments/info_table.xml +1 -0
- hwpx_automation/office/authoring/design/profiles/application_form/fragments/title.xml +1 -0
- hwpx_automation/office/authoring/design/profiles/application_form/profile.json +25 -0
- hwpx_automation/office/authoring/design/profiles/application_form/template.hwpx +0 -0
- hwpx_automation/office/authoring/design/profiles/home_notice/fragments/body.xml +1 -0
- hwpx_automation/office/authoring/design/profiles/home_notice/fragments/heading.xml +1 -0
- hwpx_automation/office/authoring/design/profiles/home_notice/fragments/title.xml +1 -0
- hwpx_automation/office/authoring/design/profiles/home_notice/profile.json +24 -0
- hwpx_automation/office/authoring/design/profiles/home_notice/template.hwpx +0 -0
- hwpx_automation/office/authoring/design/profiles/official_notice/fragments/body.xml +1 -0
- hwpx_automation/office/authoring/design/profiles/official_notice/fragments/heading.xml +1 -0
- hwpx_automation/office/authoring/design/profiles/official_notice/fragments/info_table.xml +1 -0
- hwpx_automation/office/authoring/design/profiles/official_notice/fragments/title.xml +1 -0
- hwpx_automation/office/authoring/design/profiles/official_notice/profile.json +25 -0
- hwpx_automation/office/authoring/design/profiles/official_notice/template.hwpx +0 -0
- hwpx_automation/office/authoring/design/profiles/report/fragments/body.xml +1 -0
- hwpx_automation/office/authoring/design/profiles/report/fragments/heading.xml +1 -0
- hwpx_automation/office/authoring/design/profiles/report/fragments/info_table.xml +1 -0
- hwpx_automation/office/authoring/design/profiles/report/fragments/title.xml +1 -0
- hwpx_automation/office/authoring/design/profiles/report/profile.json +25 -0
- hwpx_automation/office/authoring/design/profiles/report/template.hwpx +0 -0
- hwpx_automation/office/authoring/design/validator.py +107 -0
- hwpx_automation/office/authoring/presets/__init__.py +22 -0
- hwpx_automation/office/authoring/presets/proposal.py +538 -0
- hwpx_automation/office/authoring/report_parser.py +141 -0
- hwpx_automation/office/authoring/style_profile.py +437 -0
- hwpx_automation/office/authoring/template_analyzer.py +657 -0
- hwpx_automation/office/compliance/__init__.py +38 -0
- hwpx_automation/office/compliance/official_lint.py +478 -0
- hwpx_automation/office/compliance/pii.py +388 -0
- hwpx_automation/office/document_ops/__init__.py +13 -0
- hwpx_automation/office/document_ops/comparison.py +62 -0
- hwpx_automation/office/document_ops/mail_merge.py +73 -0
- hwpx_automation/office/document_ops/redline.py +35 -0
- hwpx_automation/office/evalplan/__init__.py +36 -0
- hwpx_automation/office/evalplan/runtime.py +2762 -0
- hwpx_automation/office/exam/__init__.py +44 -0
- hwpx_automation/office/exam/compose.py +282 -0
- hwpx_automation/office/exam/ir.py +44 -0
- hwpx_automation/office/exam/measure.py +163 -0
- hwpx_automation/office/exam/parser.py +150 -0
- hwpx_automation/office/exam/profile.py +123 -0
- hwpx_automation/office/form_fill/__init__.py +66 -0
- hwpx_automation/office/form_fill/classification.py +108 -0
- hwpx_automation/office/form_fill/fill_residue.py +242 -0
- hwpx_automation/office/form_fill/fit/__init__.py +36 -0
- hwpx_automation/office/form_fill/fit/apply.py +24 -0
- hwpx_automation/office/form_fill/fit/engine.py +24 -0
- hwpx_automation/office/form_fill/fit/measure.py +50 -0
- hwpx_automation/office/form_fill/fit/policy.py +28 -0
- hwpx_automation/office/form_fill/fit/report.py +28 -0
- hwpx_automation/office/form_fill/fit/seal.py +457 -0
- hwpx_automation/office/form_fill/fit/wordbox.py +1343 -0
- hwpx_automation/office/form_fill/guidance.py +704 -0
- hwpx_automation/office/form_fill/quality.py +961 -0
- hwpx_automation/office/form_fill/split_run.py +333 -0
- hwpx_automation/office/form_fill/template_formfit.py +656 -0
- hwpx_automation/office/house_style/__init__.py +196 -0
- hwpx_automation/office/house_style/composition.py +68 -0
- hwpx_automation/office/house_style/data/bank.json +625 -0
- hwpx_automation/office/house_style/data/genres.json +43 -0
- hwpx_automation/office/quality/__init__.py +14 -0
- hwpx_automation/office/quality/page_guard.py +277 -0
- hwpx_automation/office/rendering/__init__.py +145 -0
- hwpx_automation/office/rendering/_hancom_open_rate.ps1 +374 -0
- hwpx_automation/office/rendering/_refresh_hwpx_mac.applescript +162 -0
- hwpx_automation/office/rendering/_render_hwpx.ps1 +72 -0
- hwpx_automation/office/rendering/_render_hwpx_mac.applescript +249 -0
- hwpx_automation/office/rendering/block_splits.py +76 -0
- hwpx_automation/office/rendering/detectors.py +151 -0
- hwpx_automation/office/rendering/diff.py +153 -0
- hwpx_automation/office/rendering/fixture_corpus.py +215 -0
- hwpx_automation/office/rendering/oracle.py +909 -0
- hwpx_automation/office/rendering/page_qa.py +245 -0
- hwpx_automation/office/rendering/qa_contracts.py +293 -0
- hwpx_automation/office/rendering/qa_metrics.py +241 -0
- hwpx_automation/office/rendering/worker.py +290 -0
- hwpx_automation/office/utilities/__init__.py +12 -0
- hwpx_automation/office/utilities/table_compute.py +477 -0
- hwpx_automation/ops_services/__init__.py +1 -0
- hwpx_automation/ops_services/_border_fill.py +283 -0
- hwpx_automation/ops_services/composition.py +55 -0
- hwpx_automation/ops_services/content_layout.py +322 -0
- hwpx_automation/ops_services/context.py +213 -0
- hwpx_automation/ops_services/form_fields.py +557 -0
- hwpx_automation/ops_services/media.py +178 -0
- hwpx_automation/ops_services/memo_style.py +477 -0
- hwpx_automation/ops_services/package_validation.py +166 -0
- hwpx_automation/ops_services/planning.py +201 -0
- hwpx_automation/ops_services/preview_export.py +585 -0
- hwpx_automation/ops_services/read_query.py +601 -0
- hwpx_automation/ops_services/save_policy.py +604 -0
- hwpx_automation/ops_services/tables.py +539 -0
- hwpx_automation/ops_services/transactions.py +616 -0
- hwpx_automation/preview_output_models.py +69 -0
- hwpx_automation/public-modules.json +206 -0
- hwpx_automation/py.typed +1 -0
- hwpx_automation/quality.py +351 -0
- hwpx_automation/quality_generation.py +725 -0
- hwpx_automation/runtime.py +321 -0
- hwpx_automation/runtime_services.py +100 -0
- hwpx_automation/server.py +259 -0
- hwpx_automation/storage.py +747 -0
- hwpx_automation/tool_bindings.py +170 -0
- hwpx_automation/tool_contract.py +982 -0
- hwpx_automation/upstream.py +755 -0
- hwpx_automation/utils/__init__.py +2 -0
- hwpx_automation/utils/helpers.py +29 -0
- hwpx_automation/visual_qa.py +667 -0
- hwpx_automation/workflow/__init__.py +55 -0
- hwpx_automation/workflow/adapters.py +482 -0
- hwpx_automation/workflow/dispatcher.py +213 -0
- hwpx_automation/workflow/models.py +243 -0
- hwpx_automation/workflow/policy.py +198 -0
- hwpx_automation/workflow/render_contracts.py +173 -0
- hwpx_automation/workflow/render_metrics.py +196 -0
- hwpx_automation/workflow/render_queue.py +482 -0
- hwpx_automation/workflow/render_security.py +172 -0
- hwpx_automation/workflow/render_transport.py +369 -0
- hwpx_automation/workflow/rendering.py +206 -0
- hwpx_automation/workflow/service.py +758 -0
- hwpx_automation/workflow/state_machine.py +65 -0
- hwpx_automation/workflow/store.py +747 -0
- hwpx_automation/workspace.py +1694 -0
- python_hwpx_automation-6.0.3.dist-info/METADATA +279 -0
- python_hwpx_automation-6.0.3.dist-info/RECORD +217 -0
- python_hwpx_automation-6.0.3.dist-info/WHEEL +5 -0
- python_hwpx_automation-6.0.3.dist-info/entry_points.txt +3 -0
- python_hwpx_automation-6.0.3.dist-info/licenses/LICENSE +178 -0
- python_hwpx_automation-6.0.3.dist-info/licenses/NOTICE +14 -0
- python_hwpx_automation-6.0.3.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
"""Explicit immutable binding of every installed ToolSpec to one handler."""
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
from types import MappingProxyType
|
|
7
|
+
from typing import Any, Callable, Mapping
|
|
8
|
+
|
|
9
|
+
from .handlers import agent_document
|
|
10
|
+
from .handlers import read_export
|
|
11
|
+
from .handlers import authoring
|
|
12
|
+
from .handlers import content_edit
|
|
13
|
+
from .handlers import layout_style
|
|
14
|
+
from .handlers import form_fill
|
|
15
|
+
from .handlers import tracked_changes
|
|
16
|
+
from .handlers import specialized
|
|
17
|
+
from .handlers import quality_render
|
|
18
|
+
from .handlers import workflow
|
|
19
|
+
from .tool_contract import TOOL_SPECS
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _build_tool_bindings() -> Mapping[str, Callable[..., Any]]:
|
|
23
|
+
candidates: dict[str, Callable[..., Any]] = {
|
|
24
|
+
"get_document_node": agent_document.get_document_node,
|
|
25
|
+
"query_document_nodes": agent_document.query_document_nodes,
|
|
26
|
+
"apply_document_commands": agent_document.apply_document_commands,
|
|
27
|
+
"dump_document_blueprint": agent_document.dump_document_blueprint,
|
|
28
|
+
"replay_document_blueprint": agent_document.replay_document_blueprint,
|
|
29
|
+
"get_document_text": read_export.get_document_text,
|
|
30
|
+
"get_document_info": read_export.get_document_info,
|
|
31
|
+
"get_document_outline": read_export.get_document_outline,
|
|
32
|
+
"get_document_map": read_export.get_document_map,
|
|
33
|
+
"get_paragraph_text": read_export.get_paragraph_text,
|
|
34
|
+
"get_paragraphs_text": read_export.get_paragraphs_text,
|
|
35
|
+
"get_location_text": read_export.get_location_text,
|
|
36
|
+
"get_table_text": read_export.get_table_text,
|
|
37
|
+
"get_table_map": read_export.get_table_map,
|
|
38
|
+
"find_text": read_export.find_text,
|
|
39
|
+
"list_available_documents": read_export.list_available_documents,
|
|
40
|
+
"hwpx_to_markdown": read_export.hwpx_to_markdown,
|
|
41
|
+
"document_to_markdown": read_export.document_to_markdown,
|
|
42
|
+
"hwpx_to_html": read_export.hwpx_to_html,
|
|
43
|
+
"hwpx_extract_json": read_export.hwpx_extract_json,
|
|
44
|
+
"document_extract_json": read_export.document_extract_json,
|
|
45
|
+
"package_parts": read_export.package_parts,
|
|
46
|
+
"package_get_text": read_export.package_get_text,
|
|
47
|
+
"package_get_xml": read_export.package_get_xml,
|
|
48
|
+
"object_find_by_attr": read_export.object_find_by_attr,
|
|
49
|
+
"object_find_by_tag": read_export.object_find_by_tag,
|
|
50
|
+
"create_document": authoring.create_document,
|
|
51
|
+
"create_document_from_plan": authoring.create_document_from_plan,
|
|
52
|
+
"copy_document": authoring.copy_document,
|
|
53
|
+
"create_government_report_document": authoring.create_government_report_document,
|
|
54
|
+
"create_proposal_document": authoring.create_proposal_document,
|
|
55
|
+
"create_comparison_table_document": authoring.create_comparison_table_document,
|
|
56
|
+
"get_document_plan_schema": authoring.get_document_plan_schema,
|
|
57
|
+
"validate_document_plan": authoring.validate_document_plan,
|
|
58
|
+
"analyze_document_plan": authoring.analyze_document_plan,
|
|
59
|
+
"markdown_to_document_plan": authoring.markdown_to_document_plan,
|
|
60
|
+
"parse_government_report_text": authoring.parse_government_report_text,
|
|
61
|
+
"compute_report_value": authoring.compute_report_value,
|
|
62
|
+
"register_template": authoring.register_template,
|
|
63
|
+
"list_templates": authoring.list_templates,
|
|
64
|
+
"describe_template": authoring.describe_template,
|
|
65
|
+
"add_heading": content_edit.add_heading,
|
|
66
|
+
"add_paragraph": content_edit.add_paragraph,
|
|
67
|
+
"insert_paragraph": content_edit.insert_paragraph,
|
|
68
|
+
"delete_paragraph": content_edit.delete_paragraph,
|
|
69
|
+
"add_page_break": content_edit.add_page_break,
|
|
70
|
+
"apply_edits": content_edit.apply_edits,
|
|
71
|
+
"undo_last_edit": content_edit.undo_last_edit,
|
|
72
|
+
"replace_by_anchor": content_edit.replace_by_anchor,
|
|
73
|
+
"replace_in_paragraph": content_edit.replace_in_paragraph,
|
|
74
|
+
"search_and_replace": content_edit.search_and_replace,
|
|
75
|
+
"batch_replace": content_edit.batch_replace,
|
|
76
|
+
"byte_preserving_patch": content_edit.byte_preserving_patch,
|
|
77
|
+
"insert_picture": content_edit.insert_picture,
|
|
78
|
+
"replace_picture": content_edit.replace_picture,
|
|
79
|
+
"add_table": content_edit.add_table,
|
|
80
|
+
"set_table_cell_text": content_edit.set_table_cell_text,
|
|
81
|
+
"merge_table_cells": content_edit.merge_table_cells,
|
|
82
|
+
"split_table_cell": content_edit.split_table_cell,
|
|
83
|
+
"format_table": content_edit.format_table,
|
|
84
|
+
"table_compute": content_edit.table_compute,
|
|
85
|
+
"list_styles": layout_style.list_styles,
|
|
86
|
+
"create_custom_style": layout_style.create_custom_style,
|
|
87
|
+
"set_paragraph_format": layout_style.set_paragraph_format,
|
|
88
|
+
"set_list_format": layout_style.set_list_format,
|
|
89
|
+
"format_text": layout_style.format_text,
|
|
90
|
+
"extract_style_profile": layout_style.extract_style_profile,
|
|
91
|
+
"apply_style_profile_to_plan": layout_style.apply_style_profile_to_plan,
|
|
92
|
+
"compare_style_profiles": layout_style.compare_style_profiles,
|
|
93
|
+
"set_page_setup": layout_style.set_page_setup,
|
|
94
|
+
"set_header_footer": layout_style.set_header_footer,
|
|
95
|
+
"set_page_number": layout_style.set_page_number,
|
|
96
|
+
"add_toc": layout_style.add_toc,
|
|
97
|
+
"add_cross_reference": layout_style.add_cross_reference,
|
|
98
|
+
"verify_toc": layout_style.verify_toc,
|
|
99
|
+
"add_memo": layout_style.add_memo,
|
|
100
|
+
"add_memo_by_anchor": layout_style.add_memo_by_anchor,
|
|
101
|
+
"remove_memo": layout_style.remove_memo,
|
|
102
|
+
"scan_form_guidance": form_fill.scan_form_guidance,
|
|
103
|
+
"apply_table_ops": form_fill.apply_table_ops,
|
|
104
|
+
"apply_body_ops": form_fill.apply_body_ops,
|
|
105
|
+
"inspect_fill_residue": form_fill.inspect_fill_residue,
|
|
106
|
+
"verify_form_fill": form_fill.verify_form_fill,
|
|
107
|
+
"list_form_fields": form_fill.list_form_fields,
|
|
108
|
+
"fill_form_field": form_fill.fill_form_field,
|
|
109
|
+
"find_cell_by_label": form_fill.find_cell_by_label,
|
|
110
|
+
"fill_by_path": form_fill.fill_by_path,
|
|
111
|
+
"analyze_form_fill": form_fill.analyze_form_fill,
|
|
112
|
+
"apply_form_fill": form_fill.apply_form_fill,
|
|
113
|
+
"analyze_template_formfit": form_fill.analyze_template_formfit,
|
|
114
|
+
"apply_template_formfit": form_fill.apply_template_formfit,
|
|
115
|
+
"apply_evalplan_fill": form_fill.apply_evalplan_fill,
|
|
116
|
+
"score_form_fill": form_fill.score_form_fill,
|
|
117
|
+
"add_tracked_edit": tracked_changes.add_tracked_edit,
|
|
118
|
+
"scan_personal_info": specialized.scan_personal_info,
|
|
119
|
+
"compose_exam": specialized.compose_exam,
|
|
120
|
+
"verify_question_splits": specialized.verify_question_splits,
|
|
121
|
+
"place_seal": specialized.place_seal,
|
|
122
|
+
"check_seal_compliance": specialized.check_seal_compliance,
|
|
123
|
+
"mail_merge": specialized.mail_merge,
|
|
124
|
+
"inspect_mail_merge_placeholders": specialized.inspect_mail_merge_placeholders,
|
|
125
|
+
"build_image_grid": specialized.build_image_grid,
|
|
126
|
+
"build_meeting_nameplates": specialized.build_meeting_nameplates,
|
|
127
|
+
"build_organization_chart": specialized.build_organization_chart,
|
|
128
|
+
"render_submit": quality_render.render_submit,
|
|
129
|
+
"render_status": quality_render.render_status,
|
|
130
|
+
"render_cancel": quality_render.render_cancel,
|
|
131
|
+
"render_health": quality_render.render_health,
|
|
132
|
+
"render_preview": quality_render.render_preview,
|
|
133
|
+
"repair_hwpx": quality_render.repair_hwpx,
|
|
134
|
+
"mcp_server_health": quality_render.mcp_server_health,
|
|
135
|
+
"describe_capabilities": quality_render.describe_capabilities,
|
|
136
|
+
"doc_diff": quality_render.doc_diff,
|
|
137
|
+
"validate_structure": quality_render.validate_structure,
|
|
138
|
+
"lint_text_conventions": quality_render.lint_text_conventions,
|
|
139
|
+
"inspect_document_quality": quality_render.inspect_document_quality,
|
|
140
|
+
"inspect_document_authoring_quality": quality_render.inspect_document_authoring_quality,
|
|
141
|
+
"inspect_operating_plan_quality": quality_render.inspect_operating_plan_quality,
|
|
142
|
+
"inspect_official_document_style": quality_render.inspect_official_document_style,
|
|
143
|
+
"inspect_reference_consistency": quality_render.inspect_reference_consistency,
|
|
144
|
+
"start_workflow": workflow.start_workflow,
|
|
145
|
+
"get_workflow": workflow.get_workflow,
|
|
146
|
+
"get_workflow_result": workflow.get_workflow_result,
|
|
147
|
+
"continue_workflow": workflow.continue_workflow,
|
|
148
|
+
"approve_workflow_decision": workflow.approve_workflow_decision,
|
|
149
|
+
"cancel_workflow": workflow.cancel_workflow,
|
|
150
|
+
"resume_workflow": workflow.resume_workflow,
|
|
151
|
+
}
|
|
152
|
+
expected = tuple(spec.callable_name for spec in TOOL_SPECS)
|
|
153
|
+
expected_names = tuple(name for name in expected if name is not None)
|
|
154
|
+
missing = [name for name in expected_names if name not in candidates]
|
|
155
|
+
unexpected = sorted(set(candidates) - set(expected_names))
|
|
156
|
+
noncallable = sorted(
|
|
157
|
+
name for name, value in candidates.items() if not callable(value)
|
|
158
|
+
)
|
|
159
|
+
if missing or unexpected or noncallable:
|
|
160
|
+
raise RuntimeError(
|
|
161
|
+
"explicit ToolSpec binding mismatch: "
|
|
162
|
+
f"missing={missing}, unexpected={unexpected}, noncallable={noncallable}"
|
|
163
|
+
)
|
|
164
|
+
return MappingProxyType({name: candidates[name] for name in expected_names})
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
TOOL_BINDINGS = _build_tool_bindings()
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
__all__ = ["TOOL_BINDINGS"]
|