|
| 1 | +# Changelog |
| 2 | + |
| 3 | +All notable changes to this project will be documented in this file. |
| 4 | + |
| 5 | +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). |
| 6 | +Versioning: date-based (`YYYY-MM-DD`) until v1.0.0 is cut, then semantic versioning. |
| 7 | +Package version in `pyproject.toml` remains `0.1.0` (alpha) until the first PyPI release is cut. |
| 8 | + |
| 9 | +Living plan (what’s next): [`docs/roadmap.md`](docs/roadmap.md). |
| 10 | + |
| 11 | +--- |
| 12 | + |
| 13 | +## [Unreleased] |
| 14 | + |
| 15 | +### Added |
| 16 | + |
| 17 | +#### Dual-repo publish |
| 18 | +- Public release repo [`DevoteamSP/streamlit-coco`](https://github.com/DevoteamSP/streamlit-coco); `make sync-release` / `scripts/sync_release.sh`; guide [`docs/deployment/publish.md`](docs/deployment/publish.md) |
| 19 | +- Apache-2.0 `LICENSE`; PyPI Trusted Publisher gate in `release.yml` (`github.repository == DevoteamSP/streamlit-coco` only) |
| 20 | + |
| 21 | +#### Phase 3 — HITL, headless, render flexibility |
| 22 | +- **Headless multi-turn** — `CocoSession.stream()` and `await session.run(prompt)`; `execute_plan()` / `set_permission_mode()`; extended `examples/headless_pipeline.py` |
| 23 | +- **Streamlit-free core imports** — lazy `__getattr__` for UI exports so headless scripts never load Streamlit; smoke test + example assert |
| 24 | +- **Plan mode Execute CTA** — native `render_plan_banner()` in `panel()`; CCv2 banner **Execute plan** trigger |
| 25 | +- **Edit/Write unified diff** — approval + transcript previews via `difflib` (`tool_extract.unified_diff`); Before/After fallback when empty |
| 26 | +- **Pluggable text renderer** — `text_renderer=` on `panel()`, `render_transcript()`, `render_output_field()` (`markdown` / `write` / `text` / … or callable); feature docs under `docs/features/text-renderer/` |
| 27 | +- **App-owned `request_input`** — form + optional multi-field `schema=` (AskUserQuestion remains the in-turn CoCo channel) |
| 28 | +- Headless checklist re-signed (2026-07-27): `query()` + `run()` + `stream()` live path; no Streamlit import |
| 29 | + |
| 30 | +#### Earlier unreleased (pre–Phase 3 on this branch) |
| 31 | +- **Clear tool “running” captions when done** — parse SDK `UserMessage` / NDJSON `user` tool results; finalize leftover `running` tools on turn `result` |
| 32 | +- **CCv2 skill hygiene** — JS cleanup via AbortController; pause `run_every` on pending approval; drop `provide_input`; `isolate_styles=True`; CSS via `--st-yellow-*` / `--st-red-*` / radius tokens |
| 33 | +- **API reference** — [`docs/api.md`](docs/api.md) |
| 34 | +- **Deployment docs (local)** — [`docs/deployment/local.md`](docs/deployment/local.md) |
| 35 | +- **Typed error hierarchy** — `streamlit_coco.errors`; `require_environment()` |
| 36 | +- **NDJSON fixture corpus** — `tests/fixtures/ndjson/` + `tests/test_ndjson_fixtures.py` |
| 37 | +- Feature docs pack + checklist sign-offs (panel, approvals, tools-display, structured-output, chat-ccv2, headless) |
| 38 | +- GitHub CI/CD (ci / security / release + optional PyPI publish on `v*` tags); `make publish`; hatch sdist excludes for agent/IDE dirs |
| 39 | +- Smoke tests: CCv2 register-once; core import does not load Streamlit |
| 40 | + |
| 41 | +### Changed |
| 42 | +- Package / README / identity URLs point at the public [`streamlit-coco`](https://github.com/DevoteamSP/streamlit-coco) repo; development continues on [`streamlit-coco-dev`](https://github.com/DevoteamSP/streamlit-coco-dev) |
| 43 | +- GitHub repository renamed to [`DevoteamSP/streamlit-coco-dev`](https://github.com/DevoteamSP/streamlit-coco-dev) (package name remains `streamlit-coco`) |
| 44 | +- Examples `structured_output.py` / `approval_gate.py`: `get_or_create_session` + eager `start()` for CCv2 transcript across reruns |
| 45 | +- Chat demo sidebar: compact status badges; Settings popover; test prompts behind a toggle |
| 46 | +- [`docs/roadmap.md`](docs/roadmap.md) — Phase 3 marked shipped; Next is tag/PyPI + Docker/SPCS docs only |
| 47 | +- CCv2 `chat()` registration cached (`@lru_cache`) so `st.components.v2.component` runs once per process |
| 48 | +- Headless example: separate event loops for `query()` vs `CocoSession` to avoid SDK cancel-scope teardown issues |
| 49 | + |
| 50 | +### Fixed |
| 51 | +- Grep / Glob completed cards: compact summary instead of dumping full result bodies |
| 52 | +- AskUserQuestion: free-form / “Other…” options always last in radio / multiselect |
| 53 | +- Security workflow: free Gitleaks CLI instead of `gitleaks-action@v2` (org license) |
| 54 | + |
| 55 | +--- |
| 56 | + |
| 57 | +## [2026-07-24] |
| 58 | + |
| 59 | +### Added |
| 60 | +- **Tools display & user interactions** — full spec + implementation ([`docs/features/tools-display/SPEC.md`](docs/features/tools-display/SPEC.md)) |
| 61 | + - Meaningful bordered tool cards (no default JSON expanders) for Glob, Grep, Read, Write, Edit, Bash, SQL / `sql_execute`, AskUserQuestion, ExitPlanMode, and generic / MCP tools |
| 62 | + - `streamlit_coco.tool_names`, `tool_extract`, `tool_cards` dispatch; CCv2 frontend parity |
| 63 | + - AskUserQuestion UI: radio / multiselect, **Other…** free-text, Submit / Cancel; always routed through `can_use_tool` |
| 64 | + - SQL card: query code block + dataframe / text results; SQL preview on approval |
| 65 | + - ExitPlanMode: Approve plan / Reject (with optional feedback); never “Always allow” |
| 66 | + - CoCo debug mode (`STREAMLIT_COCO_DEBUG` / `COCO_DEBUG` / `st.session_state["coco_debug"]`) for collapsed **Raw tool payload** |
| 67 | +- Feature checklist + `display_*` test prompt pack ([`docs/features/tools-display/test-checklist.md`](docs/features/tools-display/test-checklist.md), [`examples/testdata/prompts.json`](examples/testdata/prompts.json) v2 — 50+ prompts) |
| 68 | +- Chat demo: Plan mode toggle, debug checkbox, test-prompt runner by category |
| 69 | + |
| 70 | +### Changed |
| 71 | +- Approval button order (left → right): **Approve once** · **Always allow** · **Deny** (Deny rightmost); AskUser Submit · Cancel; plan Approve · Reject |
| 72 | +- Tool approvals show family-specific previews (path, content, Before/After, command, SQL) instead of raw JSON by default |
| 73 | + |
| 74 | +--- |
| 75 | + |
| 76 | +## [2026-07-23] |
| 77 | + |
| 78 | +### Added |
| 79 | +- `streamlit_coco.bootstrap` — `check_environment` / start gate helpers, `get_or_create_session`, `chat_input_bar`, `reset_session`, `stop_session` |
| 80 | +- `streamlit_coco.diagnostics` — `CocoEnvironment` probe (CLI, SDK, Snowflake config) without starting an agent |
| 81 | +- Session readiness lifecycle — `CONNECTING` → `READY` / `ERROR`, `ensure_ready()`, init metadata capture |
| 82 | +- Soft status chrome in `panel()` — Starting / Thinking / tool activity / Needs approval without remount flicker |
| 83 | +- DSP N1 feature test checklists under `docs/features/*/test-checklist.md` |
| 84 | +- `docs/roadmap.md` — Now / Next / Soon / Later plan aligned with `docs/PRD.md` |
| 85 | +- `Makefile` targets for install, test, lint, format, check, build, and example apps |
| 86 | +- Cursor rule pinning Cortex Code Agent SDK docs as source of truth |
| 87 | + |
| 88 | +### Changed |
| 89 | +- Preferred app pattern documented as `panel()` + `chat_input_bar` / `st.chat_input` (legacy `chat()` retained) |
| 90 | +- `docs/PRD.md` and `README.md` synced to the implemented `panel()`-first API and package layout |
| 91 | +- Example `examples/chat_app.py` simplified around bootstrap helpers |
| 92 | + |
| 93 | +### Fixed |
| 94 | +- Avoid double-display of Snowflake connections TOML path in the environment / start gate UI |
| 95 | +- `chat_input_bar` — graceful fallback when Streamlit lacks `submit_mode` (< 1.59) |
| 96 | +- Session status skeleton — fallback placeholder when `st.skeleton` is unavailable (< 1.59) |
| 97 | + |
| 98 | +--- |
| 99 | + |
| 100 | +## [2026-07-22] — Alpha baseline (shipped) |
| 101 | + |
| 102 | +Core library and preferred Streamlit UX first landed: |
| 103 | + |
| 104 | +- [x] Pip-installable package + `CocoOptions` / `CocoSession` / `query()` |
| 105 | +- [x] Native UI: `panel()` + app-owned input (`chat_input_bar` / `send_prompt`) |
| 106 | +- [x] Streaming transcript, tool cards, Stop, fragment polling |
| 107 | +- [x] Human-in-the-loop approvals (`require_approval_for`, Deny / Approve once / Always) |
| 108 | +- [x] Structured output (inline JSON or `on_structured_output`) |
| 109 | +- [x] Legacy CCv2 `chat()` (still supported) |
| 110 | +- [x] Examples: chat, approval gate, structured output, headless pipeline |
| 111 | + |
| 112 | +### Added (detail) |
| 113 | +- Initial `streamlit-coco` package (`0.1.0` alpha): Python API + Streamlit embedding for Snowflake CoCo |
| 114 | +- Normalized `CocoEvent` model and unit tests (`tests/test_core.py`) |
| 115 | +- Legacy CCv2 `chat()` component with static frontend assets under `streamlit_coco/frontend/` |
| 116 | +- `docs/PRD.md` and `README.md` |
| 117 | + |
| 118 | +--- |
| 119 | + |
| 120 | +<!-- Notes: |
| 121 | +- Link PRs/issues when available: (#42) or (DevoteamSP/streamlit-coco-dev#42) |
| 122 | +- One entry per user-visible change |
| 123 | +- Security fixes always under "Security", never under "Fixed" |
| 124 | +- Update [Unreleased] as you go; rename to a date (or semver after v1.0.0) on release |
| 125 | +--> |
0 commit comments