SuperAPI AI Directory

epf-expert

General & other

View repository

Updated 10-15 17:18

About this skill

/epf-expert — External 1C data processors (EPF)

A single skill for all operations with external EPF data processors. Choose the required mode:

Mode What it does
init Create a new empty data processor (scaffold XML)
build Build an EPF from XML sources
dump Dump an EPF into XML sources
add-form Add a managed form to the data processor
bsp-init Register the data processor in the BSP subsystem
bsp-add-command Add a command to the BSP registration

Mode: init — creating a data processor

Generates a minimal set of XML sources for an external 1C data processor (EPF).

Usage

/epf-expert init <Name> [Synonym] [SrcDir]
Parameter Required Default Description
Name yes — Data processor name (Latin/Cyrillic)
Synonym no = Name Synonym (display name)
SrcDir no src Source directory relative to CWD

Command

powershell.exe -NoProfile -File .claude/skills/epf-expert/scripts/epf-init.ps1 -Name "<Name>" [-Synonym "<Synonym>"] [-SrcDir "<SrcDir>"]

What is created

<SrcDir>/
├── <Name>.xml          # Корневой файл метаданных (4 UUID)
└── <Name>/
    └── Ext/
        └── ObjectModule.bsl  # Модуль объекта с 3 регионами
  • The root XML contains MetaDataObject/ExternalDataProcessor with empty DefaultForm и ChildObjects
  • ClassId is fixed: c3831ec8-d8d5-4f93-8a22-f9bfae07327f
  • The file is created in UTF-8 with BOM

Next steps

  • Add a form: /epf-expert add-form
  • Add a template: /mxl-expert template-add
  • Add help: /help-add
  • Build the EPF: /epf-expert build

Mode: build — building an EPF

Builds an EPF file from XML sources using the 1C platform.

Usage

/epf-expert build <Name> [SrcDir] [OutDir]
Parameter Required Default Description
Name yes — Object name (name of the root XML)
SrcDir no src Source directory
OutDir no build Directory for the result

Connection parameters

Read .v8-project.json from the project root. Take v8path and resolve the database:

  1. If the user specified parameters (path, server) — use them directly
  2. If the user specified a database by name — look in .v8-project.json
  3. If not specified — match the Git branch with databases[].branches
  4. If the branch did not match — use default
  5. If .v8-project.json does not exist — create an empty infobase in ./base

If v8path is not set: Get-ChildItem "C:\Program Files\1cv8\*\bin\1cv8.exe" | Sort -Desc | Select -First 1

Command

powershell.exe -NoProfile -File .claude/skills/epf-expert/scripts/epf-build.ps1 -InfoBasePath "<путь>" -SourceFile "src\<Name>.xml" -OutputFile "build\<Name>.epf"
Parameter Required Description
-V8Path <путь> no Platform bin directory
-InfoBasePath <путь> * File infobase
-InfoBaseServer <сервер> * 1C server
-InfoBaseRef <имя> * Infobase name on the server
-UserName <имя> no User
-Password <пароль> no Password
-SourceFile <путь> yes Root XML of sources
-OutputFile <путь> yes Output EPF file

* — either -InfoBasePathis needed, or the pair -InfoBaseServer + -InfoBaseRef

Note: If the object uses configuration reference types — assembly in an empty infobase will fail with an XDTO error. Register the infobase with the target configuration via /db-list add.


Mode: dump — unpacking EPF

Unpacks an EPF file into XML sources using the 1C platform (hierarchical format).

Usage

/epf-expert dump <File> [OutDir]
Parameter Required Default Description
File yes — Path to the EPF file
OutDir no src Directory for exporting sources

Connection parameters

Similar to mode build — infobase resolution via .v8-project.json.

Command

powershell.exe -NoProfile -File .claude/skills/epf-expert/scripts/epf-dump.ps1 -InfoBasePath "<путь>" -InputFile "<файл>.epf" -OutputDir "src"
Parameter Required Description
-V8Path <путь> no Platform bin directory
-InfoBasePath <путь> * File infobase
-InfoBaseServer <сервер> * 1C server
-InfoBaseRef <имя> * Infobase name on the server
-UserName <имя> no User
-Password <пароль> no Password
-InputFile <путь> yes Path to the EPF file
-OutputDir <путь> yes Directory for export
-Format <формат> no Hierarchical (default) / Plain

Result structure (Hierarchical)

<OutDir>/
├── <Name>.xml
└── <Name>/
    ├── Ext/
    │   └── ObjectModule.bsl
    ├── Forms/
    │   ├── <FormName>.xml
    │   └── <FormName>/Ext/Form.xml
    └── Templates/
        ├── <TemplateName>.xml
        └── <TemplateName>/Ext/Template.<ext>

Mode: add-form — adding a form

Creates a managed form and registers it in the root XML of the processing.

Usage

/epf-expert add-form <ProcessorName> <FormName> [Synonym] [--main]
Parameter Required Default Description
ProcessorName yes — Processing name (must exist)
FormName yes — Form name
Synonym no = FormName Form synonym
--main no auto Set as default form
SrcDir no src Source directory

Command

powershell.exe -NoProfile -File .claude/skills/epf-expert/scripts/add-form.ps1 -ProcessorName "<ProcessorName>" -FormName "<FormName>" [-Synonym "<Synonym>"] [-Main] [-SrcDir "<SrcDir>"]

What is created

<SrcDir>/<ProcessorName>/Forms/
├── <FormName>.xml                    # Метаданные формы (1 UUID)
└── <FormName>/
    └── Ext/
        ├── Form.xml                  # Описание формы (logform namespace)
        └── Form/
            └── Module.bsl           # BSL-модуль с 5 регионами
  • <SrcDir>/<ProcessorName>.xml — added <Form> в ChildObjects, updated DefaultForm
  • FormType: Managed; UsePurposes: PlatformApplication, MobilePlatformApplication
  • AutoCommandBar with id=-1; Attribute "Object" with MainAttribute=true

Mode: bsp-init — registration in BSP

Adds to the object module of the processing the function СведенияОВнешнейОбработке() for the BSP subsystem.

Usage

/epf-expert bsp-init <ProcessorName> <Вид> [Назначение...]
Parameter Required Default Description
ProcessorName yes — Processing name
Kind yes — Processing kind (see mapping)
Purpose * — Objects for assignable kinds
SrcDir no src Source directory

* Required for: ObjectFilling, Report, PrintForm, CreatingRelatedObjects.

Processing kind mapping

User writes Kind API method
additional processing, global AdditionalProcessing ВидОбработкиДополнительнаяОбработка()
additional report, global report AdditionalReport ВидОбработкиДополнительныйОтчет()
filling ObjectFilling ВидОбработкиЗаполнениеОбъекта()
report (assignable) Report ВидОбработкиОтчет()
print form, printing PrintForm ВидОбработкиПечатнаяФорма()
creating related objects CreatingRelatedObjects ВидОбработкиСозданиеСвязанныхОбъектов()

Default command type

Kind CommandType
AdditionalProcessing ТипКомандыОткрытиеФормы()
AdditionalReport ТипКомандыОткрытиеФормы()
ObjectFilling ТипКомандыВызовСерверногоМетода()
Report ТипКомандыОткрытиеФормы()
PrintForm ТипКомандыВызовСерверногоМетода()
CreatingRelatedObjects ТипКомандыВызовСерверногоМетода()

Function template

Функция СведенияОВнешнейОбработке() Экспорт

	МетаданныеОбработки = Метаданные();

	ПараметрыРегистрации = ДополнительныеОтчетыИОбработки.СведенияОВнешнейОбработке("2.2.2.1");
	ПараметрыРегистрации.Вид    = ДополнительныеОтчетыИОбработкиКлиентСервер.{{ВидОбработки}};
	ПараметрыРегистрации.Версия = "1.0";

	{{СЕКЦИЯ_НАЗНАЧЕНИЕ}}  // только для назначаемых видов

	НоваяКоманда = ПараметрыРегистрации.Команды.Добавить();
	НоваяКоманда.Представление        = МетаданныеОбработки.Представление();
	НоваяКоманда.Идентификатор        = МетаданныеОбработки.Имя;
	НоваяКоманда.Использование        = ДополнительныеОтчетыИОбработкиКлиентСервер.{{ТипКоманды}};
	НоваяКоманда.ПоказыватьОповещение = Ложь;
	{{СЕКЦИЯ_МОДИФИКАТОР}}  // только для ПечатнаяФорма: НоваяКоманда.Модификатор = "ПечатьMXL"

	Возврат ПараметрыРегистрации;

КонецФункции

Instructions

  1. Find ObjectModule.bsl: src/{{ProcessorName}}/Ext/ObjectModule.bsl
  2. If СведенияОВнешнейОбработке already exists — report it, do not duplicate
  3. Find the region #Область ПрограммныйИнтерфейс and insert the function inside
  4. For types with a server-side handler — add the corresponding procedure after the function
  5. Use tabs for indentation

Mode: bsp-add-command — adding a BSP command

Adds a command to an existing function СведенияОВнешнейОбработке(). Must be called beforehand bsp-init.

Usage

/epf-expert bsp-add-command <ProcessorName> <Идентификатор> [ТипКоманды] [Представление]
Parameter Required Default Description
ProcessorName yes — Processing name
Identifier yes — Internal command name (Latin)
CommandType no from the view Launch type
Presentation no = Identifier Display name
SrcDir no src Source directory

Command type mapping

User writes CommandType
open form ТипКомандыОткрытиеФормы()
client method ТипКомандыВызовКлиентскогоМетода()
server method ТипКомандыВызовСерверногоМетода()
form filling ТипКомандыЗаполнениеФормы()
scenario ТипКомандыСценарийВБезопасномРежиме()

The template is inserted before Возврат ПараметрыРегистрации

	НоваяКоманда = ПараметрыРегистрации.Команды.Добавить();
	НоваяКоманда.Представление        = НСтр("ru = '{{Представление}}'");
	НоваяКоманда.Идентификатор        = "{{Идентификатор}}";
	НоваяКоманда.Использование        = ДополнительныеОтчетыИОбработкиКлиентСервер.{{ТипКоманды}};
	НоваяКоманда.ПоказыватьОповещение = Ложь;

Instructions

  1. Find and read ObjectModule.bsl
  2. Make sure that СведенияОВнешнейОбработке() exists — if not, suggest bsp-init
  3. Determine the processing type from the existing code
  4. Insert the command block before Возврат ПараметрыРегистрации
  5. Add the handler: for server-side — in ObjectModule.bsl, for client-side — in the form module
  6. If the handler already exists — add a branch ИначеЕсли, do not duplicate the procedure