[EPIC] AgentProlog Workbench: desktop UI + Android + Termux runtime #33

Open
opened 2026-09-19 04:27:36 +00:00 by nsaspy · 0 comments
Owner

Mission

Build AgentProlog Workbench: a first-class graphical application around the existing AgentProlog product, with one shared frontend spanning desktop and Android and a safe Termux-backed local runtime path on Android.

This is a new product frontend, not a new agent runtime.

Architecture law

AgentProlog Workbench UI
  -> shared typed UI client/state projection
  -> canonical prolog_agent_ui_v1 snapshot/event/command contract
  -> AgentProlog product adapters
  -> prolog-rlm runtime/library

Dependency direction stays agentProlog -> prolog-rlm.

The UI must never become a second authority for conversations, modes, context, approvals, tools, effects, Spec/Plan/Verify, agents, or execution state.

Platform decision

Use Tauri 2 for the Workbench shell so desktop and Android share the same UI/client code. Keep platform-specific integration behind Tauri plugins:

  • desktop: native filesystem/window/tray/notifications where appropriate;
  • Android: Kotlin plugin for Termux bootstrap/discovery and Android lifecycle integration.

Keep headless/TUI/DeepSeek Harness frontends supported. Workbench is an additional canonical frontend over the same protocol.

Desktop UX

The desktop app should provide:

  • workspace/project switcher;
  • chat/agent session surface;
  • mode controls: direct, symbolic, symbolic-recursive, auto;
  • canonical context meter;
  • Spec / Plan / Verify inspector;
  • project tree and search;
  • diff viewer with patch/approval flow;
  • tool-call timeline and structured arguments/results;
  • approval/question queue;
  • agent/subagent graph and run status;
  • task/run history and resume;
  • test/verification evidence;
  • traces, usage, budgets and provider route;
  • plugin/tool-pack browser;
  • settings/profile/runtime connection manager;
  • optional raw Prolog/event inspector for debugging;
  • terminal/log surface that is read-only by default and does not bypass tool authority.

Android UX

Adaptive mobile version of the same Workbench:

  • chat/session first;
  • projects/workspaces;
  • run status + notifications;
  • approvals/questions;
  • diffs;
  • Spec/Plan/Verify;
  • agents;
  • context/mode controls;
  • local Termux runtime setup/status;
  • remote runtime connection;
  • tablet/foldable multi-pane layout.

Do not create a separate Android state model.

Termux runtime

Android local full-runtime path:

AgentProlog Android
  -> Android/Kotlin Termux plugin
  -> allow-listed Termux RUN_COMMAND bootstrap only
  -> agentprolog-termux daemon
  -> canonical protocol socket
  -> AgentProlog / prolog-rlm

Rules:

  • never expose arbitrary shell strings to the UI;
  • the RUN_COMMAND bridge launches/stops/inspects named AgentProlog services only;
  • argv is typed and bounded;
  • authenticated loopback/local socket after bootstrap;
  • daemon owns normal requests after startup; RUN_COMMAND is not used as per-tool execution transport;
  • explicit user setup/permission diagnostics;
  • fail closed if Termux is missing, permission is missing, protocol version mismatches, or daemon identity/auth fails.

Testing law

User-visible behavior requires:

  • component/unit tests;
  • protocol fixture/golden tests;
  • Playwright desktop E2E;
  • Android instrumentation/UI tests;
  • real sidecar/runtime E2E;
  • Termux device/emulator smoke lane where supported;
  • reconnect/resume/cancellation/approval correlation tests;
  • screenshots/traces on UI failure.

Reuse issue #18's canonical context/mode ownership work; do not duplicate frontend-owned state.

Packaging

  • Nix flake packages/checks for desktop development/builds;
  • Linux desktop artifact first;
  • Windows/macOS build lanes after the Linux shell is green;
  • Android APK/AAB build lane;
  • deterministic pinned frontend dependencies;
  • no runtime curl/install bootstrap.

Acceptance

  • Desktop Workbench can complete a real AgentProlog coding session end-to-end.
  • Android can connect to remote AgentProlog and complete the same canonical session flow.
  • Android can bootstrap a local Termux AgentProlog daemon and connect through the canonical protocol.
  • Desktop and Android reconstruct canonical state after reconnect instead of relying on UI-local truth.
  • All four reasoning modes work across shared controls.
  • Approval, diff, test evidence, verification, agents and context state are first-class UI surfaces.
  • TUI/headless/DSH behavior remains supported and protocol-compatible.
  • Full CI/E2E gates are green.
## Mission Build **AgentProlog Workbench**: a first-class graphical application around the existing AgentProlog product, with one shared frontend spanning desktop and Android and a safe Termux-backed local runtime path on Android. This is a new product frontend, **not a new agent runtime**. ## Architecture law ```text AgentProlog Workbench UI -> shared typed UI client/state projection -> canonical prolog_agent_ui_v1 snapshot/event/command contract -> AgentProlog product adapters -> prolog-rlm runtime/library ``` Dependency direction stays `agentProlog -> prolog-rlm`. The UI must never become a second authority for conversations, modes, context, approvals, tools, effects, Spec/Plan/Verify, agents, or execution state. ## Platform decision Use **Tauri 2** for the Workbench shell so desktop and Android share the same UI/client code. Keep platform-specific integration behind Tauri plugins: - desktop: native filesystem/window/tray/notifications where appropriate; - Android: Kotlin plugin for Termux bootstrap/discovery and Android lifecycle integration. Keep headless/TUI/DeepSeek Harness frontends supported. Workbench is an additional canonical frontend over the same protocol. ## Desktop UX The desktop app should provide: - workspace/project switcher; - chat/agent session surface; - mode controls: direct, symbolic, symbolic-recursive, auto; - canonical context meter; - Spec / Plan / Verify inspector; - project tree and search; - diff viewer with patch/approval flow; - tool-call timeline and structured arguments/results; - approval/question queue; - agent/subagent graph and run status; - task/run history and resume; - test/verification evidence; - traces, usage, budgets and provider route; - plugin/tool-pack browser; - settings/profile/runtime connection manager; - optional raw Prolog/event inspector for debugging; - terminal/log surface that is read-only by default and does not bypass tool authority. ## Android UX Adaptive mobile version of the same Workbench: - chat/session first; - projects/workspaces; - run status + notifications; - approvals/questions; - diffs; - Spec/Plan/Verify; - agents; - context/mode controls; - local Termux runtime setup/status; - remote runtime connection; - tablet/foldable multi-pane layout. Do not create a separate Android state model. ## Termux runtime Android local full-runtime path: ```text AgentProlog Android -> Android/Kotlin Termux plugin -> allow-listed Termux RUN_COMMAND bootstrap only -> agentprolog-termux daemon -> canonical protocol socket -> AgentProlog / prolog-rlm ``` Rules: - never expose arbitrary shell strings to the UI; - the RUN_COMMAND bridge launches/stops/inspects named AgentProlog services only; - argv is typed and bounded; - authenticated loopback/local socket after bootstrap; - daemon owns normal requests after startup; RUN_COMMAND is not used as per-tool execution transport; - explicit user setup/permission diagnostics; - fail closed if Termux is missing, permission is missing, protocol version mismatches, or daemon identity/auth fails. ## Testing law User-visible behavior requires: - component/unit tests; - protocol fixture/golden tests; - Playwright desktop E2E; - Android instrumentation/UI tests; - real sidecar/runtime E2E; - Termux device/emulator smoke lane where supported; - reconnect/resume/cancellation/approval correlation tests; - screenshots/traces on UI failure. Reuse issue #18's canonical context/mode ownership work; do not duplicate frontend-owned state. ## Packaging - Nix flake packages/checks for desktop development/builds; - Linux desktop artifact first; - Windows/macOS build lanes after the Linux shell is green; - Android APK/AAB build lane; - deterministic pinned frontend dependencies; - no runtime curl/install bootstrap. ## Acceptance - [ ] Desktop Workbench can complete a real AgentProlog coding session end-to-end. - [ ] Android can connect to remote AgentProlog and complete the same canonical session flow. - [ ] Android can bootstrap a local Termux AgentProlog daemon and connect through the canonical protocol. - [ ] Desktop and Android reconstruct canonical state after reconnect instead of relying on UI-local truth. - [ ] All four reasoning modes work across shared controls. - [ ] Approval, diff, test evidence, verification, agents and context state are first-class UI surfaces. - [ ] TUI/headless/DSH behavior remains supported and protocol-compatible. - [ ] Full CI/E2E gates are green.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/agentProlog#33
No description provided.