# 1C Adapter Tools This directory contains the current agent-facing 1C adapter tools. The adapter must expose 1C metadata in configurator terms first: object kind, object name, forms, modules, attributes, tabular sections, commands, events, and 1C type names. SQL table names, DBNames roles, GUIDs, CAS files, and XML paths are internal evidence and diagnostics. ## Current Entry Points Use these commands for normal agent work: ```powershell python scripts/resolve_1c_object.py --index --kind --name --output python scripts/get_1c_object_brief_context.py --index --kind --name --view effective --output python scripts/get_1c_object_metadata.py --index --kind --name --view effective --output python scripts/search_1c_object_context.py --index --kind --name --text --view effective --search-code --output python scripts/get_1c_object_artifacts.py --index --kind --name --output python scripts/get_1c_object_code_context.py --index --kind --name --view effective --output python scripts/get_1c_module.py --index --kind --name --module --view effective --max-chars --output python scripts/get_1c_form_context.py --index --kind --name --form --view effective --max-items --output powershell -NoProfile -ExecutionPolicy Bypass -File scripts/compare_1c_saved_state_objects.ps1 -Server -Database -User -Password -Output python scripts/analyze_1c_saved_state_object_details.py --comparison --config-save-dir --config-dir --config-cas-save-dir --config-cas-dir --extension-manifest-summary --config-cas-all-dir --output powershell -NoProfile -ExecutionPolicy Bypass -File scripts/build_1c_saved_state_object_report.ps1 -Server -Database -User -Password -OutputDir [-SkipMarkdown] powershell -NoProfile -ExecutionPolicy Bypass -File scripts/watch_1c_saved_state_once.ps1 -Server -Database -User -Password -OutputRoot python scripts/list_1c_saved_state_watch_runs.py --root [--limit ] [--only-with-delta] [--only-changed] --output [--skip-markdown] [--skip-check] python scripts/check_1c_saved_state_watch_run_list.py --list --output python scripts/get_1c_saved_state_latest_watch_run.py --root [--require-delta] [--require-changed] --output [--skip-markdown] [--skip-check] python scripts/check_1c_saved_state_latest_watch_run.py --latest --output python scripts/render_1c_saved_state_latest_watch_run_markdown.py --latest --output python scripts/render_1c_saved_state_watch_run_list_markdown.py --list --output python scripts/check_1c_saved_state_object_report.py --report --output python scripts/check_1c_saved_state_watch_once.py --manifest --output python scripts/render_1c_saved_state_watch_once_markdown.py --manifest --output python scripts/compare_1c_saved_state_object_reports.py --before --after --output [--skip-markdown] [--skip-check] python scripts/check_1c_saved_state_object_report_delta.py --delta --output python scripts/render_1c_saved_state_object_report_delta_markdown.py --delta --output python scripts/list_1c_saved_state_object_changes.py --report [--layer base|extension] [--kind ] [--payload-role ] [--active-missing true|false] --output python scripts/get_1c_saved_state_object_change.py --report --name --output python scripts/render_1c_saved_state_object_report_markdown.py --report --output ``` Use these commands for task-level investigation and extension patch workflow: ```powershell python scripts/plan_1c_task_context.py --index --text --view effective --output python scripts/build_1c_task_evidence.py --index --text --view effective --output python scripts/propose_1c_task_changes.py --evidence --output python scripts/render_1c_task_proposal_markdown.py --proposal --output python scripts/check_1c_change_proposal_safety.py --proposal --output python scripts/create_1c_patch_workspace.py --proposal --slug --output python scripts/check_1c_patch_workspace_integrity.py --workspace --output python scripts/check_1c_patch_source_freshness.py --workspace --output python scripts/validate_1c_patch_workspace_semantics.py --workspace --output python scripts/edit_1c_bsl_routine.py --workspace --relative-path --operation append|replace|upsert --routine-text-b64 --output python scripts/edit_1c_form_command.py --workspace --relative-path --operation append|replace|upsert --name --title --action --output python scripts/edit_1c_form_button.py --workspace --relative-path --operation append|replace|upsert --parent-name --name --title --command-name --output python scripts/add_1c_form_button_workflow.py --workspace --form-relative-path --bsl-relative-path --operation append|replace|upsert --routine-text-b64 --command-name --command-title --command-action --button-parent-name --button-name --button-title --output python scripts/diff_1c_patch_workspace.py --workspace --output python scripts/create_1c_patch_bundle.py --workspace --slug --output python scripts/check_1c_patch_bundle.py --bundle-dir --output python scripts/create_1c_extension_staging_from_bundle.py --bundle-dir --slug --output python scripts/check_1c_extension_staging.py --staging-dir --output python scripts/check_1c_extension_runner_config.py --config --output python scripts/create_1c_extension_validation_plan.py --staging-dir --output --markdown-output python scripts/create_1c_extension_validation_evidence.py --plan --output python scripts/check_1c_extension_validation_evidence.py --plan --output python scripts/check_1c_extension_validation_release.py --plan --output python scripts/render_1c_extension_validation_release_markdown.py --release-check --output python scripts/check_1c_patch_preflight.py --workspace --output python scripts/render_1c_patch_preflight_markdown.py --preflight --output ``` Use this read orchestrator when object data rows are needed from SQL: ```powershell python scripts/read_1c_object_view.py --kind --name --view effective --summary --validation --route-index --output-dir ``` Use `--name-b64` and `--kind-b64` when a shell cannot pass Unicode safely. Saved-state object change lookup also supports `--name-b64`. ## Rebuild And Maintenance These tools rebuild the evidence used by the current adapter: ```powershell python scripts/extract_1c_dbnames.py --help python scripts/build_1c_xml_guid_index.py --help python scripts/compare_1c_sql_xml_guids.py --help python scripts/build_1c_unified_object_route_index.py --help python scripts/build_1c_metadata_from_resolved_object.py --help python plugins/1c/tools/enrich_structured_metadata_with_dbnames.py --help python scripts/build_1c_enum_presentation_map.py --help python scripts/build_1c_sql_read_view.py --help python scripts/smoke_1c_read_view_kinds.py --help python plugins/1c/tools/build_sql_read_projection.py --help ./scripts/validate_1c_predicted_columns.ps1 -? ./scripts/execute_1c_sql_read_projection.ps1 -? ./scripts/resolve_1c_sql_read_references.ps1 -? ./scripts/resolve_1c_sql_composite_references.ps1 -? ``` ## Current Contract The current public contract is documented in: ```text docs/1c-adapter-api-contract.md docs/1c-write-path-safety.md docs/1c-sql-format-spec.md ``` Default view is `effective`: base configuration plus active extension overlays. Use `base` only for main-configuration diagnostics and `extension` only when a specific extension layer is requested. Direct SQL writes to `Config`, `ConfigSave`, `ConfigCAS`, `ConfigCASSave`, and data tables are not part of the safe adapter workflow.