VBA и макросы
Инспекция проекта, планирование и запуск, статус, отмена и откат, доверие к макросам и список одобренных. Операций на странице: 12.
Операции на этой странице — 12
cancel_vba_execution
Заголовок раздела «cancel_vba_execution»Отменяет vba execution.
Request
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “cancel_vba_execution” | да | |
| subsetId | string | да | |
| sessionId | VbaExecutionSessionId | да | |
| requestedBackend | ComputeBackendKind | null | нет |
Success payload · cancel_vba_execution
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “cancel_vba_execution” | да | |
| subsetId | string | да | |
| sessionId | VbaExecutionSessionId | да | |
| outcome | VbaExecutionOutcome | да |
Минимальный JSON-шаблон
{ "operation": "cancel_vba_execution", "subsetId": "<subsetId>", "sessionId": "<VbaExecutionSessionId>", "requestedBackend": "native-desktop"}commit_vba_execution
Заголовок раздела «commit_vba_execution»Фиксирует vba execution.
Request
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “commit_vba_execution” | да | |
| subsetId | string | да | |
| sessionId | VbaExecutionSessionId | да | |
| requestedBackend | ComputeBackendKind | null | нет |
Success payload · commit_vba_execution
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “commit_vba_execution” | да | |
| subsetId | string | да | |
| sessionId | VbaExecutionSessionId | да | |
| committed | VbaMutationPreview | да |
Минимальный JSON-шаблон
{ "operation": "commit_vba_execution", "subsetId": "<subsetId>", "sessionId": "<VbaExecutionSessionId>", "requestedBackend": "native-desktop"}get_vba_execution_status
Заголовок раздела «get_vba_execution_status»Получает vba execution status.
Request
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “get_vba_execution_status” | да | |
| subsetId | string | да | |
| sessionId | VbaExecutionSessionId | да | |
| requestedBackend | ComputeBackendKind | null | нет |
Success payload · get_vba_execution_status
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “get_vba_execution_status” | да | |
| subsetId | string | да | |
| sessionId | VbaExecutionSessionId | да | |
| outcome | VbaExecutionOutcome | да |
Минимальный JSON-шаблон
{ "operation": "get_vba_execution_status", "subsetId": "<subsetId>", "sessionId": "<VbaExecutionSessionId>", "requestedBackend": "native-desktop"}inspect_vba_project
Заголовок раздела «inspect_vba_project»Инспектирует vba project.
Request
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “inspect_vba_project” | да | |
| subsetId | string | да | |
| requestedBackend | ComputeBackendKind | null | нет |
Success payload · inspect_vba_project
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “inspect_vba_project” | да | |
| subsetId | string | да | |
| inspection | VbaProjectInspection | да |
Минимальный JSON-шаблон
{ "operation": "inspect_vba_project", "subsetId": "<subsetId>", "requestedBackend": "native-desktop"}list_approved_macros
Заголовок раздела «list_approved_macros»Возвращает список approved macros.
Request
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “list_approved_macros” | да | |
| subsetId | string | да | |
| requestedBackend | ComputeBackendKind | null | нет |
Success payload · list_approved_macros
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “list_approved_macros” | да | |
| subsetId | string | да | |
| session | ContractSubsetSessionInfo | да | |
| macros | ApprovedMacroDescriptor[] | да | |
| policyNote | string | да | Why the list is what it is. THREE answers, not two. A matched lane carries its original sentence unchanged — that string reaches compatibility diagnostics. The retired demo route has no visible product surface. An empty list still distinguishes the two reasons it can be empty: a package with no readable VBA project (“there is nothing here to run”) and a package that DOES carry one but whose procedures the allowlist does not match. The second of those is why this field changed. It used to say “This build does not expose any approved workbook-local macro entrypoints” in both cases — a claim about the BUILD that nine live automation operations falsify, since the engine can enumerate, plan, run, preview and commit the very macros that workbook contains. The note now says what is true and narrower, and names list_vba_entrypoints / plan_vba_execution as the operations that answer what this one deliberately does not. |
Минимальный JSON-шаблон
{ "operation": "list_approved_macros", "subsetId": "<subsetId>", "requestedBackend": "native-desktop"}list_vba_entrypoints
Заголовок раздела «list_vba_entrypoints»Возвращает список vba entrypoints.
Request
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “list_vba_entrypoints” | да | |
| subsetId | string | да | |
| userRunnableOnly | boolean | нет | Excel’s Macros-dialog cohort only (MacroCapability::user_runnable). |
| requestedBackend | ComputeBackendKind | null | нет |
Success payload · list_vba_entrypoints
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “list_vba_entrypoints” | да | |
| subsetId | string | да | |
| entrypoints | VbaEntrypointDescriptor[] | да | The procedures SHOWN. Every classified procedure of the project, or only Excel’s Macros-dialog cohort when the request set userRunnableOnly. Its length is a property of the REQUEST and is not a count of anything about the workbook — that is what the two fields below are for. |
| userRunnable | number | да | How many macros the user could run from Excel’s Macros dialog, and how many of those route native. Read off F1_vba_capability::WorkbookSummary — properties of the WORKBOOK, never counted out of entrypoints, so narrowing the shown list can never silently narrow the denominator with it. They are the same numbers inspect_vba_project reports in inspection.summary, from the same provider call. |
| userRunnableNative | number | да |
Минимальный JSON-шаблон
{ "operation": "list_vba_entrypoints", "subsetId": "<subsetId>", "requestedBackend": "native-desktop"}macro_trust_lifecycle
Заголовок раздела «macro_trust_lifecycle»Операция macro trust lifecycle.
Request
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “macro_trust_lifecycle” | да | |
| subsetId | string | да | |
| intent | ContractMacroTrustIntent | да | |
| readOnly | boolean | нет | |
| protectedView | boolean | нет | |
| trustedLocation | boolean | нет | |
| modifiedAfterSignatureRisk | boolean | нет | |
| requestedBackend | ComputeBackendKind | null | нет |
Success payload · macro_trust_lifecycle
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “macro_trust_lifecycle” | да | |
| subsetId | string | да | |
| session | ContractSubsetSessionInfo | да | |
| result | ContractMacroTrustResult | да |
Минимальный JSON-шаблон
{ "operation": "macro_trust_lifecycle", "subsetId": "<subsetId>", "intent": "<ContractMacroTrustIntent>", "requestedBackend": "native-desktop"}plan_vba_execution
Заголовок раздела «plan_vba_execution»Планирует vba execution.
Request
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “plan_vba_execution” | да | |
| subsetId | string | да | |
| entrypoint | string | да | Module.Procedure, the only entrypoint identity the capability crate mints. |
| activeSheet | string | да | |
| instructionBudget | number | нет | ExecutionRequest::instruction_budget; omitted means the session default. |
| requestedBackend | ComputeBackendKind | null | нет |
Success payload · plan_vba_execution
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “plan_vba_execution” | да | |
| subsetId | string | да | |
| plan | VbaExecutionPlan | да |
Минимальный JSON-шаблон
{ "operation": "plan_vba_execution", "subsetId": "<subsetId>", "entrypoint": "<string>", "activeSheet": "<string>", "requestedBackend": "native-desktop"}preview_vba_mutations
Заголовок раздела «preview_vba_mutations»Формирует preview для vba mutations.
Request
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “preview_vba_mutations” | да | |
| subsetId | string | да | |
| sessionId | VbaExecutionSessionId | да | |
| requestedBackend | ComputeBackendKind | null | нет |
Success payload · preview_vba_mutations
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “preview_vba_mutations” | да | |
| subsetId | string | да | |
| sessionId | VbaExecutionSessionId | да | |
| preview | VbaMutationPreview | да |
Минимальный JSON-шаблон
{ "operation": "preview_vba_mutations", "subsetId": "<subsetId>", "sessionId": "<VbaExecutionSessionId>", "requestedBackend": "native-desktop"}rollback_vba_execution
Заголовок раздела «rollback_vba_execution»Откатывает vba execution.
Request
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “rollback_vba_execution” | да | |
| subsetId | string | да | |
| sessionId | VbaExecutionSessionId | да | |
| requestedBackend | ComputeBackendKind | null | нет |
Success payload · rollback_vba_execution
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “rollback_vba_execution” | да | |
| subsetId | string | да | |
| sessionId | VbaExecutionSessionId | да | |
| restoredCells | number | да | ReleasedSession::restored_cells — read off the session registry, never counted on this side. 0 is a real answer: a run that changed no cell is rolled back exactly as one that changed a thousand. |
Минимальный JSON-шаблон
{ "operation": "rollback_vba_execution", "subsetId": "<subsetId>", "sessionId": "<VbaExecutionSessionId>", "requestedBackend": "native-desktop"}run_approved_macro
Заголовок раздела «run_approved_macro»Запускает approved macro.
Request
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “run_approved_macro” | да | |
| subsetId | string | да | |
| macroId | string | да | |
| viewport | ViewportWindow | null | нет | |
| requestedBackend | ComputeBackendKind | null | нет |
Success payload · run_approved_macro
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “run_approved_macro” | да | |
| subsetId | string | да | |
| session | ContractSubsetSessionInfo | да | |
| macro | ApprovedMacroDescriptor | да | |
| delta | DeltaSummary | да | |
| changedKeys | string[] | да | |
| highlightCellKeys | string[] | да | |
| statusMessage | string | да | |
| activeSheet | ContractActiveSheetMeta | да | |
| geometry | ContractGeometrySubset | да | |
| recalcNeeded | boolean | да | |
| viewport | ViewportWindow | да | |
| previewCells | ContractPreviewCell[] | да |
Минимальный JSON-шаблон
{ "operation": "run_approved_macro", "subsetId": "<subsetId>", "macroId": "<string>", "requestedBackend": "native-desktop"}start_vba_execution
Заголовок раздела «start_vba_execution»Запускает vba execution.
Request
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “start_vba_execution” | да | |
| subsetId | string | да | |
| entrypoint | string | да | |
| activeSheet | string | да | |
| instructionBudget | number | нет | |
| shownPlanId | string | нет | The planId this caller was shown by plan_vba_execution, when it is starting a plan it displayed. Omitted is the whole of the behaviour that existed before that operation and is unchanged: the request is planned and that plan is run. Present adds one check before anything is projected — the plan this request describes must be the plan the caller showed — and refuses automation-plan-stale otherwise, naming the id the request really describes. This is the ONE field that makes a shown plan mean anything. Without it a host can display “this macro routes native, ceiling 2,000,000”, then send a start with a different ceiling, and nothing in the contract can tell that the approval and the run were about different things. |
| requestedBackend | ComputeBackendKind | null | нет |
Success payload · start_vba_execution
| Поле | Тип TypeScript | Обяз. | Примечание из контракта |
|---|---|---|---|
| operation | “start_vba_execution” | да | |
| subsetId | string | да | |
| sessionId | VbaExecutionSessionId | да | Present for EVERY outcome, including the runs that left no decision behind. SessionRegistry::issue mints the identity before the run, so it names the run either way; a run with nothing to decide simply never appears in the registry under it, and rollback_vba_execution then truthfully answers automation-session-unknown for it. |
| outcome | VbaExecutionOutcome | да | Initially running for a spawned native ticket. Status later returns bounded progress or the exact terminal executor outcome. |
Минимальный JSON-шаблон
{ "operation": "start_vba_execution", "subsetId": "<subsetId>", "entrypoint": "<string>", "activeSheet": "<string>", "requestedBackend": "native-desktop"}