Skip to content

[agent] Make the default Parsar Core connection zero-input and testable #11

Description

@sam2tom

Context

The normal local path already uses /v1, proxies to 127.0.0.1:8091, and reads ~/.parsar/agents-api/web-token on the Vite server. The current dialog still asks ordinary users to understand base URLs, Bearer tokens, CORS, key digests, and daemon setup before they can connect.

Observable outcome: a conventional local Parsar setup connects with no user-entered fields, while custom compatible Cores remain available behind an explicit advanced path.

Acceptance criteria

  • Present Local Parsar Core as the default connection mode with /v1 fixed by the application.
  • When server-managed proxy authentication is active, do not show or request a browser Bearer token.
  • Move direct URLs, CORS guidance, and current-tab tokens into an Other compatible Core / Advanced mode.
  • Replace the inline key-generation and daemon tutorial with a concise status summary plus links to the operator guide.
  • Add an explicit, read-only Test connection action using Agents API GET requests only; it must not create an Agent, Session, Turn, Item, or model call.
  • Distinguish unreachable/network-or-CORS, 401 invalid_api_key, beta-header/protocol mismatch, and authenticated basic API access.
  • Report execution readiness as Unknown / not verified. HTTP health, Agent CRUD, or an open SSE stream must never be presented as proof that a daemon, model, or provider is ready.
  • Invalidate a previous test result whenever the draft mode, URL, or token changes.
  • Keep a direct-mode token only in the current tab's sessionStorage; never include it in URLs, logs, error text, snapshots, or persistent storage.
  • Cover keyboard, screen-reader, narrow-layout, loading, success, and every failure state.

File ownership

  • apps/web/src/components/ConnectionModal.tsx
  • apps/web/src/components/ConnectionModal.test.tsx
  • new apps/web/src/lib/core-probe.ts and focused tests
  • a feature-local stylesheet if needed

Avoid broad edits to App.tsx, apps/web/src/style.css, client protocol types, and README files. Coordinate any unavoidable integration seam before editing a shared hotspot.

Validation

  • Run focused connection modal and probe tests.
  • Run pnpm check and git diff --check.
  • No paid model request is required.

Non-goals

  • Do not generate Core keys or daemon credentials in the browser.
  • Do not start, stop, migrate, or modify Parsar Core.
  • Do not invent a readiness or capability endpoint; upstream gaps remain tracked in [tracking] OpenAI Agents API gaps blocked on Parsar Core #8.
  • Do not broaden the current-tab token fallback into a production authentication design.

Dependencies

Use the user journey defined by the bilingual README update. Runtime/model capability discovery remains blocked on #8.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions