Skip to content

Converter fixes + safer Tier 2 deploy#47

Open
kirkabowman wants to merge 1 commit into
petrowsky:mainfrom
kirkabowman:converter-fixes-tier2-safety
Open

Converter fixes + safer Tier 2 deploy#47
kirkabowman wants to merge 1 commit into
petrowsky:mainfrom
kirkabowman:converter-fixes-tier2-safety

Conversation

@kirkabowman
Copy link
Copy Markdown

Summary

  • fm_xml_to_snippet.py — handle calculated Go to Layout (LayoutNameByCalc / LayoutNumberByCalc); previously dropped the formula and produced <unknown> in Script Workspace.
  • fm_xml_to_snippet.py — add a dedicated handler for Perform Find by Natural Language so all six SaXML params (Target, LLMAccountName, LLMModel, LLMMessage, Parameters, LLMAction, TemplateName) get emitted under the <LLMCreateFind> wrapper FM expects. Previously the converter only emitted Field + a malformed Action, and FM rendered every parameter blank.
  • step-catalog-en.json — correct Go to Layout enum values from LayoutNameByCalculation / LayoutNumberByCalculation to FM's actual LayoutNameByCalc / LayoutNumberByCalc (confirmed by capturing a working step from FM Pro 22's clipboard).
  • deploy.py — Tier 2 Phase 2 (paste from outside FM) now polls up to 3 s for the target script tab to appear and aborts cleanly if it never does. Without this, a failed Phase 1 (e.g. MBS couldn't open the script because folders were collapsed) led to Phase 2 blindly sending Cmd+A to whatever had focus — selecting the entire script list and prompting to delete every script.

Test plan

  • Re-convert an existing script containing Go to Layout [ <calculated value> ] via fm_xml_to_snippet.py and confirm the calc text appears in the resulting <Layout id="0" name=""><Calculation>…</Calculation></Layout> block; paste into Script Workspace and verify FM renders the formula instead of <unknown>.
  • Re-convert a script containing Perform Find by Natural Language with all six parameters set; paste into FM and verify Account Name / Model / Prompt / Get / Response Target / Prompt Template Name all render with their values populated.
  • Deploy a script via python3 agent/scripts/deploy.py --tier 2 --replace <script>.xml "<Script Name>" with the script list panel focused (not an editor tab). Confirm the deploy aborts with (Fell back from Tier 2: Script opened but paste failed: unknown) instead of selecting all scripts.

🤖 Generated with Claude Code

- fm_xml_to_snippet: handle calculated Go to Layout (LayoutNameByCalc /
  LayoutNumberByCalc) — previously dropped the calc, producing
  <unknown> in Script Workspace.
- fm_xml_to_snippet: add Perform Find by Natural Language handler
  (LLMCreateFind wrapper with AccountName, Model, PromptMessage,
  Action, PromptTemplateName) — previously emitted only Field/Action
  and FM showed all params blank.
- step-catalog: correct Go to Layout enum values from
  LayoutNameByCalculation / LayoutNumberByCalculation to FM's actual
  LayoutNameByCalc / LayoutNumberByCalc.
- deploy.py: Tier 2 Phase 2 now polls up to 3s for the target tab and
  aborts cleanly if it never appears, instead of blind-pressing Cmd+A
  on whatever has focus. Prevents catastrophic mis-paste when the
  script list (not the editor tab) is focused.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant