Skip to content

release: v7.18.0 — live agent simulation and methods implemented by a neural network - #201

Merged
ArmenSl merged 53 commits into
mainfrom
develop
Sep 24, 2026
Merged

ArmenSl merged 53 commits into
mainfrom
develop

Conversation

@ArmenSl

@ArmenSl ArmenSl commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Sync develop → main for BESSER v7.18.0 (BESSER-PEARL/BESSER#616).

Summary

  • Agent simulation page: run the agent you designed, chat with it, see its current state on a read-only diagram, browse its session files and terminal output (Feature/agent live testing #184, by @mgv99).
  • Agent Components and Agent Runtime pages: intents, LLMs, RAG/SQL databases, tools, skills, workspaces and GUIs are managed off the canvas; old agent diagrams are migrated on load.
  • New reply options and GUI replies in the state editor, with a New action picker.
  • Per-end navigability (Simplify association type to "Association" + per-end navigability toggle #200, by @ivan-alfonso): the association type is just Association, each end has a Navigable checkbox, the arrow follows navigability, and old diagrams and templates are migrated on load.
  • Methods implemented by a neural network: a Neural Network option in the method popup with a picker of the project's NN diagrams (feat: let a method be implemented by a neural network #199).
  • Assistant fixes: agent transitions and training phrases are applied; SVG/PNG export of agent diagrams no longer crashes.
  • i18n: every new string in all six locales (ca/de/es/fr/lb need native-speaker review).

Test plan

  • Unit tests pass (446 vitest)
  • Production build
  • Visual smoke: open an agent project saved before this release → its intents/LLMs appear under Agent → Components; Simulate Agent → chat → Stop
  • Method popup → type Neural Network → pick an NN diagram → generate the Backend and check neural_networks/

mgv99 and others added 30 commits June 4, 2026 14:47
…rove canvas UX

  Introduce a dedicated Components page (AgentComponentsPanel) where all
  agent-level elements — intents, skills, tools, workspaces, RAG DBs, and
  a new SQL Database type — are defined and managed. These elements are
  now stored in `diagram.agentComponents` instead of
  `diagram.model.elements`,
  so they no longer appear as canvas objects and no longer pollute the
  element tree.

  Palette changes: drag items for intent/skill/tool/workspace/RAG are
  removed; the palette now contains only AgentState, the black-circle
  StateInitialNode, and a Comment element. Canvas components (AgentIntent,
  AgentTool, AgentSkill, AgentWorkspace, AgentRagElement) are replaced with
  a shared no-op renderer since they carry no SVG presence.

  Transition labels on canvas are now meaningful per type: intent name /
  "No intent", `var op val` / "File" / "Auto" for predefined types, and
  a compact event + condition count for custom transitions. Incomplete or
  invalid transitions render with red arrow and text.

  AgentConfigurationPanel is reorganised with a sticky header/sidebar and
  tab-scoped scroll areas; runtime settings are extracted into a new
  AgentRuntimePanel component. UI fixes to the transition config panel:
  dropdown closes on outside click, field spacing improved, condition
  button colours corrected, operator placeholder added, file-type free-text
  enabled. Palette z-index lowered so it no longer overlays modal dialogs
  and header menus. Intent visualisation simplified.
…t model generation flow

- add new `AgentGUIEditor` and `registerAllComponents` modules for reusable GUI component registration
- extend `AgentComponentsPanel` to support agent-specific GUI editing and related storage/state handling
- refactor `GraphicalUIEditor` by moving component registration/setup logic out to shared registration helpers
- enhance agent state diagram internals (`agent-state`, `agent-state-transition`, typings) to support richer transition/action metadata and update behavior
- add diagram bridge service/index updates to expose additional model/association data for integrations
- update generation/deploy/export hooks (`useGenerateCode`, `useDeployLocally`, `useGeneratorExecution`, `projectExportUtils`) to align payload/build flow with new agent GUI and backend handling
- refresh `package-lock.json` with dependency metadata cleanup
…w loading banner

- AgentStateDragBox now returns null when the editor is readonly, removing the drag-and-drop palette from the read-only simulator view
- Add a "The agent is loading, please wait." banner between the chat and terminal that shows until the first stdout line arrives
  agent editor

  - Add AgentLLMInfo/AgentRAGInfo interfaces and set/get methods to
  DiagramBridgeService
  - Fix agent-state-update.tsx: read LLMs and RAGs from diagramBridge
  instead of
    Redux elements (broken after LLMs/RAGs were moved off-canvas to
  agentComponents)
  - Add "Set as default LLM" checkbox to AgentComponentsPanel LLM form, with
   a
    "default" badge on the row header and auto-clear on LLM deletion
  - Add bridge sync effects for LLMs and RAGs in AgentComponentsPanel
  - Add eager bridge initialization in ApollonEditorComponent so LLMs, GUIs,
   RAGs
    and intents are available in editor panels on first load, not only after
    navigating to the Components tab
- refactor agent state transition update handling
- enhance agent state update logic and edit behavior
- adjust agent config YAML editor integration
# Conflicts:
#	packages/editor/src/main/packages/agent-state-diagram/agent-state-transition/agent-state-transition-update.tsx
#	packages/editor/src/main/packages/agent-state-diagram/agent-state/agent-state-update.tsx
#	packages/webapp/src/main/app/shell/workspace-navigation.tsx
#	packages/webapp/src/main/features/agent-config/AgentConfigurationPanel.tsx
#	packages/webapp/src/main/features/editors/gui/GraphicalUIEditor.tsx
#	packages/webapp/src/main/shared/services/validation/validateDiagram.ts
Runtime tab is already handled by AgentRuntimePanel component; drop
develop's stale inline duplicate that was left as an unresolved conflict.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…onfig files

The develop merge renamed chart/table/metricCard/map config exports from
static constants to getter functions. Update the callers accordingly so
AgentGUIEditor (and the /agent-components page) loads again.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace every hardcoded English string in the agent diagram canvas,
Components panel, and Configuration panel with proper i18n calls
(editor translate() / webapp useTranslation t()), and add the matching
keys to all 6 supported locales (en, es, fr, de, ca, lb).

- agent-state-transition-update: 8 strings (select operator, file type
  placeholder, no-GUI messages, any-submission/interaction labels)
- agent-tool-update, agent-skill-update, agent-workspace-update: field
  placeholders (LLM description, markdown content, filesystem path)
- AgentComponentsPanel: full i18n pass — LLMs, Intents (with plural
  sentence count), Tools, Skills, Workspaces, RAG Databases, GUIs, and
  SQL Databases sections; sidebar title, nav labels, empty states
- AgentConfigurationPanel: "No active agent diagram" runtime tab message

i18n check passes at 100 % coverage across all locales (2050 webapp
keys + 480 editor keys each).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…strings

Replace remaining hardcoded English in the agent simulation panel/page,
the agent runtime config tab, and the canvas state/transition menus with
i18n keys. Add all new keys to en editor/webapp resources and translate
into es, fr, de, ca, lb (100% coverage for both resources).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wrap the agent drag-and-drop palette in the localized HOC and replace the
hardcoded title and item labels with packages.AgentDiagram.palette.* keys,
translated into es, fr, de, ca, lb.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
mgv99 and others added 23 commits September 1, 2026 16:03
… auth headers

Blocker 7: resetAgentSimulationThunk and restartAgentSimulationThunk (the
fire-and-forget cleanup DELETE) both called the stale /test/ prefix that
no longer exists, causing 404s.  The reset endpoint also omitted the
X-GitHub-Session header, so it would get a 401 under enforced auth and
silently leak the session.
Fix: update both URLs to /simulation/sessions/…, add auth headers to the
reset POST.

Blocker 8: fetchLimitsThunk called GET /simulation/limits which had no
backend route, killing quota/api-key mode on arrival.  The backend /limits
endpoint has now been added (see companion backend commit), so no frontend
change is needed beyond keeping the thunk as-is.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The method popup's implementation type gains a "Neural Network" option.
Picking it shows a dropdown of the project's NN diagrams; the choice is
stored as neuralNetworkId on the method, like stateMachineId and
quantumCircuitId.

Refs BESSER-PEARL/BESSER#570
…ation

feat: let a method be implemented by a neural network
… SVG export

Review follow-up for #184.

- normalizeAgentComponents moves agent components (intents, RAG, tools,
  skills, workspaces, LLMs, GUIs) from `elements` and a legacy
  `agentComponents` field into `components`. The editor runs it on load,
  so projects saved before this change show their components again.
- SVG/PNG export skips elements that render nothing; exporting an agent
  diagram with an intent crashed.
- IDiagramBridgeService declares every agent getter and setter;
  UMLModel.components is typed; AgentComponentType lists the component
  types.
- agent-state-update.tsx (2344 lines) and the transition editor are split
  into one file per action editor plus shared styles and constants.
- One agent palette: the sidebar is kept (the floating drag box hid it and
  left the association popup's palette empty), the dead preview code is
  replaced.
- A new transition starts as 'auto'; stored transitions without a
  condition still load as 'when_intent_matched'.
…ns alive on agent errors

Review follow-up for #184.

- The reset call is removed: the backend never had that endpoint and
  nothing dispatched it. Restart now deletes the previous session (its id
  was cleared before the thunk read it).
- Every simulation request goes through shared/api/agentSimulation.ts on
  apiClient, so users see the backend's detail message and requests time
  out. The websocket URL comes from BACKEND_URL, with no localhost
  fallback.
- The websocket lives in useAgentSimulationSocket, keyed on the session
  id only. It authenticates with a first frame instead of a query-string
  token, and an agent error no longer closes the socket and ends the
  session; 44xx closes are reported as rejections.
- LLM API keys stay out of Redux, in a module store cleared on stop.
- Hardcoded strings translated, dead state removed, typed thunks.
- WorkspaceShell: simulation launch uses the shared API; its legacy
  agentComponents block is replaced by prepareAgentModelForBackend.
- Slice, socket and credentials-dialog tests.
…it panels

Review follow-up for #184.

- The six copies of the legacy agentComponents block are replaced by
  prepareAgentModelForBackend, which attaches the saved components and runs
  normalizeAgentComponents before validation, generation, deploy and
  export.
- The diagram bridge is populated only in ApollonEditorComponent.
- AgentComponentsPanel (1341 lines) and AgentRuntimePanel (680) are split
  into one file per section with shared hooks and fields.
- AgentComponentType replaces the local ELEMENT_TYPES copy and raw
  'AgentGUI' strings; components are typed, no `as any`.
- The assistant's add_state builds reply bodies with the converter's
  buildAgentStateBody, so db, ws, prompt-mode, store-in-session and
  send-reply fields are no longer dropped.
- The first LLM added becomes the default, as the docs say; renaming the
  default LLM keeps it the default. The SQL docs list the real fields.
- registerAllComponents runs once in the GUI editor.
- Tests for the backend payload, the assistant actions, the components
  round trip and the default-LLM rule.
Review follow-up for #184.

- Every string added by the review fixes is in all six locales; the keys
  the removed palette and summaries used are deleted. hybridRag and
  bm25Weight were missing outside English, and the intents placeholder was
  untranslated.
- package-lock.json now records besser-agentic-framework-ui, dompurify and
  plotly.js-dist-min. dompurify stays: it is a required peer dependency of
  besser-agentic-framework-ui. The redundant @types/dompurify is removed.

The ca, de, es, fr and lb strings need a native speaker's review.
… modifier

The modeling assistant has offered add_intent_training_phrase for a while,
but the editor's modifier never listed or handled it, so the action was
rejected. It now appends changes.trainingPhrase to the target intent and
fails clearly on an unknown intent or a missing phrase.
- The agent components and simulation pages are in the navigation (the
  root index lists user-guide pages; user-guide/index.rst is excluded),
  plus a new Agent Runtime page for the Agent Customization panel.
- Components: the real RAG, GUI and SQL fields, how the page is opened,
  and that SQL passwords and runtime keys are stored in the project.
- Simulation: requirements and limits (simulator service and token,
  GitHub sign-in, custom code refused by default, one session per user,
  session lifetime), where the entry is, the Source tab, and the real
  status indicators. The button reads Restart, which is what it does.
- Agent diagram: the New action picker and its tabs, the nine WebSocket
  replies, SQL Query with its operation, and the transition labels the UI
  shows.
- Fixed the five title-underline warnings in two other pages.
The modeling assistant names transition endpoints as
target.sourceStateName / target.targetStateName, but the agent modifier
read changes.source / target.stateName / target.targetClass, which the
assistant never sets, so every add_transition failed with "Transition
requires both source and target" and remove_transition silently did
nothing. Both now read the assistant's fields ("initial" is the entry
node) and remove_transition fails clearly when nothing matches.
… in one update

Review follow-up for #200.

- Legacy associations are normalized on load in the compat step: a
  ClassUnidirectional without `navigable` becomes a ClassBidirectional with
  its source end non-navigable, so old diagrams keep their arrow and the
  dropdown shows Association. Before, they loaded with both ends navigable
  and were saved that way. The user-modeling metamodels are migrated too.
- The navigability rules (at least one navigable end, a composition's part
  end navigable) are applied inside the same update as the type change or
  checkbox toggle, so each action is one undo step; the popup self-heal is
  gone.
- Navigable checkboxes only appear for Association, Composition and
  Aggregation, and aggregation arrows follow navigability; the text bounds
  use the same markers the component draws.
- The rules live in uml-association-navigability.ts, exported from
  @besser/wme; UMLAssociation ends type `navigable`; a shared Checkbox
  control replaces the raw input.
- i18n: corrected Luxembourgish hint, removed the unused
  ClassUnidirectional label; snapshot, popup, marker and migration tests.
…ditor and templates

Review follow-up for #200.

- The assistant emits every association as ClassBidirectional with
  explicit per-end navigable (one shared relationship mapper for the
  modifier and converter); Realization maps to ClassRealization.
- The GUI editor and object scaffolding decide navigability from the
  per-end flags through the @besser/wme helpers instead of the type.
- The shipped templates store explicit navigable flags; a guard test
  checks each one matches what the legacy type meant.
…bility

The class diagram guide and the first-project tutorial told users to pick
Unidirectional or Bidirectional; they now describe the Association type,
the Navigable checkbox on each end, the at-least-one-end rule and the
composition part-end lock.
…d duplicate page

The relationship screenshot still showed the old type dropdown
("Association (bidirectional)") and no Navigable checkboxes. It now
shows the association panel with a one-way association: the source end
unticked, the arrow at the target end, and the last navigable end locked.
The duplicate user-guide/diagram types/class_diagram.rst was excluded from
the build and pointed at an image path that does not exist.
Simplify association type to "Association" + per-end navigability toggle
@ArmenSl
ArmenSl merged commit 4f1a1ea into main Sep 24, 2026
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.

3 participants