Skip to content
Open
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
24e8ba3
feat(cli): add moss playground command with WASM-based query UI
msranjana Jul 29, 2026
6766c80
fix(playground): remove wildcard CORS and escape doc.id in result HTML
msranjana Jul 29, 2026
6490453
fix(playground): address code review — remove CDN, proxy through serv…
msranjana Jul 29, 2026
5859df3
fix(playground): add CSRF token and Host/Origin checks to protect loc…
msranjana Jul 29, 2026
8fa0c37
fix(playground): pass token via URL fragment, capture currentIndex at…
msranjana Jul 29, 2026
c49513f
fix(playground): print tokenized URL, guard loadIndex with requestId …
msranjana Jul 29, 2026
df550c2
fix(playground): recompute all UI state on selection change, allow lo…
msranjana Jul 29, 2026
7862618
fix(playground): add HTML asset to package-data, add asset-existence …
msranjana Jul 30, 2026
26b9a46
fix(playground): propagate fetch errors to UI, preserve currentIndex …
msranjana Jul 30, 2026
a268bc9
fix: remove extraneous f-prefix on non-interpolated string (ruff F541)
msranjana Jul 30, 2026
74e71e6
fix(playground): update global indexes, clear stale results on index …
msranjana Jul 30, 2026
31a9e3c
fix(playground): use ThreadingHTTPServer for concurrent requests, val…
msranjana Jul 30, 2026
6289eaa
fix(playground): serialize all MossClient calls through a single even…
msranjana Jul 30, 2026
1811ebf
fix(playground): validate POST body and fix worker loop binding
msranjana Jul 30, 2026
405bd6c
fix(playground): correct awaitable check and prevent shutdown hang
msranjana Jul 30, 2026
8b5d972
fix(playground): SDK thread-affinity and unbounded shutdown join
msranjana Jul 30, 2026
9839dd6
fix(playground): serialize SDK results inside worker thread
msranjana Jul 30, 2026
8950ce4
fix(playground): use async def closures in worker.submit() for correc…
msranjana Jul 30, 2026
3d3c970
fix(playground): render result summary via DOM nodes not innerHTML
msranjana Jul 30, 2026
54657b2
fix(playground): serialize worker submissions under an asyncio.Lock
msranjana Jul 30, 2026
72d167c
fix(playground): create asyncio.Lock via coroutine after worker threa…
msranjana Jul 30, 2026
21246bd
docs(moss-cli): document the playground command
msranjana Jul 30, 2026
6edb5e4
fix(playground): validate query params, render metadata, abort stale …
msranjana Jul 31, 2026
7ae2a7b
test(playground): cover param validation, metadata rendering, stale q…
msranjana Jul 31, 2026
af177cb
fix(playground): harden request handling and per-session staleness
msranjana Jul 31, 2026
dabcc0c
fix(playground): persist token in sessionStorage across reloads
msranjana Jul 31, 2026
0182ecf
fix(playground): unload prior index, catch alpha overflow, bind port …
msranjana Aug 1, 2026
45b1ac5
Update packages/moss-cli/src/moss_cli/commands/playground.py
msranjana Aug 1, 2026
623a001
feat(playground): run index loading and queries in-browser via moss-w…
msranjana Aug 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions packages/moss-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Moss CLI wraps the [Moss Python SDK](https://docs.moss.dev/) so you can build an
- **Multiple output formats** — rich tables for humans, `--json` for scripts
- **Job tracking** — poll background jobs with live progress display
- **Pipe-friendly** — stdin/stdout support for composing with other tools
- **Local Playground** — browser-based UI for interactive querying without any frontend code

## Installation

Expand Down Expand Up @@ -145,6 +146,28 @@ echo "what is AI" | moss query my-index
moss query my-index "query" --json | jq '.docs[0].text'
```

### Playground

Start a local web UI for interactive semantic search — no frontend code required.

```bash
# Start the playground on the default port (8765)
moss playground

# Specify a custom port
moss playground --port 9000

# Skip opening the browser automatically
moss playground --no-open
```

The playground serves a single-page app at `http://localhost:<port>` that lets you:

- Browse and load indexes
- Run semantic search with configurable `topK` and `alpha`
- View results with scores and metadata
- All API calls are proxied through the server — your project key is never exposed to the browser

Comment thread
coderabbitai[bot] marked this conversation as resolved.
### Job Tracking

```bash
Expand Down
3 changes: 3 additions & 0 deletions packages/moss-cli/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ where = ["src"]
[tool.setuptools.package-dir]
"" = "src"

[tool.setuptools.package-data]
moss_cli = ["playground/*.html"]

[tool.black]
line-length = 88
target-version = ['py310']
Expand Down
Loading
Loading