Skip to content

Commit 32673b2

Browse files
committed
Release 0.1.6
1 parent c172864 commit 32673b2

91 files changed

Lines changed: 53002 additions & 89 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@ client_*.yaml
2121

2222
# Local demo workspaces (uploaded files)
2323
examples/workspaces/
24+
25+
# tableau_to_semantic generated artifacts
26+
examples/tableau_to_semantic/out/
27+
examples/tableau_to_semantic/uv.lock

AGENTS.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ Guidance for coding agents working in this repository.
44

55
## Product
66

7-
Streamlit library + optional CCv2 component for Snowflake CoCo (Cortex Code Agent SDK). Preferred UX: `panel()` + app-owned `chat_input_bar` / `st.chat_input`.
7+
Streamlit library + optional CCv2 component for Snowflake CoCo (Cortex Code Agent SDK). Preferred UX: `panel()` + app-owned `chat_input_bar` / `st.chat_input`. Multipage / exec demos wrap that in `copilot_rail()`.
88

99
Canonical SDK docs: https://docs.snowflake.com/en/user-guide/cortex-code-agent-sdk/cortex-code-agent-sdk
1010
Pinned rule: `.cursor/rules/coco-sdk-docs.mdc`
1111

1212
## Layout
1313

14-
- `streamlit_coco/` — library (`ui`, `session`, `permissions`, `tool_*`, `bootstrap`, …)
15-
- `examples/` — chat, approval, structured, headless demos
14+
- `streamlit_coco/` — library (`ui`, `rail`, `session`, `permissions`, `tool_*`, `bootstrap`, …)
15+
- `examples/` — chat, approval, structured, headless, backlog desk, Tableau → Semantic
16+
- `apps/`**dev-only** full applications (never synced to public `streamlit-coco`)
1617
- `doc/prd.md`, `doc/api.md`, `doc/roadmap.md`, `doc/features/` — product + API + DSP N1 feature docs/checklists
1718
- `doc/releases/X.Y.Z/` — public release kit (checklist, screenshots)
1819
- `doc-dev/`**dev-only** docs (never synced to public `streamlit-coco`); includes `doc-dev/releases/X.Y.Z/` outreach (LinkedIn, Medium, community)
@@ -30,8 +31,12 @@ make e2e # Playwright UX vs examples/e2e_ux_harness.py
3031
make audit # pip-audit
3132
make test-all # check + e2e + audit
3233
make chat # Streamlit demo
34+
make tableau-semantic # Tableau → Semantic example (copilot rail)
35+
make adoption-stats # daily PyPI + GitHub traffic → doc-dev/metrics/
3336
```
3437

38+
Adoption KPIs: [`doc-dev/metrics/README.md`](doc-dev/metrics/README.md). Refresh `doc/roadmap.md` Currents only when asked (`make adoption-stats UPDATE_ROADMAP=1`).
39+
3540
Full test process: [`doc/testing.md`](doc/testing.md).
3641

3742
## Conventions

CHANGELOG.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,23 @@ Living plan (what’s next): [`doc/roadmap.md`](doc/roadmap.md).
1212

1313
## [Unreleased]
1414

15+
## [0.1.6] — 2026-08-13
16+
17+
Alpha follow-up: a reusable Copilot rail, consultant training pack, and a Tableau → Semantic example that uses the rail as a product copilot (not a chat window).
18+
19+
### Added
20+
- **Copilot rail** (`copilot_rail()`, `transcript_view_pills()`) — generic right-rail Copilot (connection, queued jobs, transcript pills: last messages / first 200 characters). `panel()` / `render_transcript()` gain `preview_chars=`. Feature: [`doc/features/copilot-rail/`](doc/features/copilot-rail/)
21+
- **Example: Tableau → Semantic** — multipage demo (`examples/tableau_to_semantic`, `make tableau-semantic`) that extracts estate/KPI/access drift from MIT Tableau Server workbooks, arbitrates with `request_input`, Writes a semantic view + row access policy, and generates a Streamlit consumer (**Build with python** or **Build with CoCo** with **Save Brief** → generate; brief reloads from `BRIEF.md`) with **disconnected** (no warehouse) and live `SEMANTIC_VIEW(...)` modes. **Preview** shares the Copilot right-rail slot (inline studio or run-on-the-fly at `:8511`); the split uses `streamlit_extras.resizable_columns`. Screens 2–5 restore `out/*.json` when the session reopens.
22+
- **Training pack** — consultant enablement under [`doc/training/`](doc/training/) (overview, setup, hands-on lab, demo script, quiz, enablement deck) plus workshop [`W01`](doc/methodology/workshops/w01-setup-architecture-first-app.md)
23+
1524
### Changed
16-
- README: document `make cwd-upload`, `make e2e-install` / `make e2e`, and `make test-all`
25+
- README: document `make cwd-upload`, `make e2e-install` / `make e2e`, `make test-all`, and `make tableau-semantic`
26+
- **Copilot rail** — transcript pills sit beside Connection (no **Transcript** label / “Showing …” caption); changing them fragment-reruns Copilot only. Long cwd paths in the status caption use `...` in the middle (100-character cap). **Working · thinking…** is a badge on that same row instead of a tall status card. **Cancel job** sits on the title row beside Close and hides when the CoCo turn finishes (`on_job_finished`).
27+
28+
### Fixed
29+
- **Structured output** — strip `$schema` / `$id` before passing JSON Schema to the CoCo SDK (avoids `no schema with key or ref "https://json-schema.org/draft/2020-12/schema"` when contract files include a draft URI)
30+
- Replace deprecated `use_container_width` with `width="stretch"` (Streamlit ≥1.57)
31+
- **Example: Tableau → Semantic** — Generate selectors (step, how-to-build, dashboards, preview mode) keep their values when Copilot opens; a saved `BRIEF.md` is loaded into the CoCo editor from disk; multiple `.md` files are switched with pills.
1732

1833
## [0.1.5] — 2026-08-09
1934

ID.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
| **Asset Owner** | Laurent Letourmy |
1010
| **Contributors** | DevoteamSP / streamlit-coco contributors |
1111
| **Created** | 2026-07 |
12-
| **Last updated** | 2026-07 |
12+
| **Last updated** | 2026-08-13 |
1313
| **Confidentiality** | Public |
1414

1515
---
@@ -32,17 +32,18 @@
3232

3333
- Clients where used: 0 (alpha)
3434
- Consultants trained: —
35-
- Demo available: yes (`make chat`, examples/)
35+
- Demo available: yes (`make chat`, `make backlog`, `make tableau-semantic`, `doc/training/`)
3636
- Snowflake Alliance pre-alignment: —
3737

3838
**Next milestone**: N1 — conditions needed:
3939

4040
- [x] Feature golden-path checklists under `doc/features/`
4141
- [x] CI + PR template
42+
- [x] Consultant enablement pack (`doc/training/`) + workshop W01 (`0.1.6`)
4243
- [ ] Fill owner / KPIs on this sheet
4344
- [ ] Run and sign off UI checklists on a live CoCo + Snowflake connection
4445
- [ ] Security threat model + audit pack (`doc/security/`)
45-
- [ ] Marketing one-pager (`doc-dev/marketing/`)
46+
- [x] Marketing one-pager (`doc/marketing/one-pager.md`) — refreshed for `0.1.6`
4647

4748
---
4849

@@ -60,5 +61,5 @@ Publish procedure: [`doc/deployment/publish.md`](doc/deployment/publish.md)
6061
## Security
6162

6263
- IP review done: no
63-
- Threat model: not yet (`doc/security/` TBD)
64+
- Threat model: started (`doc/security/threat-model.md`)
6465
- Last security scan: GitHub Actions Security workflow (Gitleaks CLI, CodeQL, pip-audit)

Makefile

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ EXAMPLE ?= examples/chat_app.py
1010

1111
.PHONY: help install sync test lint format check audit e2e-install e2e test-all \
1212
run chat approval structured headless backlog cwd-upload e2e-harness \
13-
build publish sync-release clean
13+
build publish sync-release clean adoption-stats
1414

1515
# Public release clone (override: make sync-release RELEASE_REPO=/path/to/streamlit-coco)
1616
# Temporary: personal repo until DevoteamSP is validated on PyPI (see doc/deployment/publish.md).
@@ -71,9 +71,24 @@ backlog: ## Run Product Backlog Desk demo (examples/backlog_desk)
7171
cwd-upload: ## Run examples/cwd_upload_chat.py (upload into cwd)
7272
$(STREAMLIT) examples/cwd_upload_chat.py
7373

74+
tableau-semantic: ## Run Tableau → Semantic (repo streamlit-coco, not PyPI)
75+
cd examples/tableau_to_semantic && $(UV) run --project ../.. --extra dev --with 'streamlit-extras>=1.3.0' python -m streamlit run app.py
76+
7477
e2e-harness: ## Run CoCo-free UX harness used by Playwright
7578
$(STREAMLIT) examples/e2e_ux_harness.py
7679

80+
# Adoption metrics (PyPI + GitHub traffic). FORCE=1 overwrites today; UPDATE_ROADMAP=1 refreshes Current KPIs.
81+
ADOPTION_STATS_FLAGS =
82+
ifneq ($(FORCE),)
83+
ADOPTION_STATS_FLAGS += --force
84+
endif
85+
ifneq ($(UPDATE_ROADMAP),)
86+
ADOPTION_STATS_FLAGS += --update-roadmap
87+
endif
88+
89+
adoption-stats: ## Collect PyPI + GitHub traffic into doc-dev/metrics/
90+
$(PYTHON) python scripts/collect_adoption_stats.py $(ADOPTION_STATS_FLAGS)
91+
7792
build: ## Build sdist + wheel into dist/
7893
$(UV) build
7994

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# streamlit-coco
22

3-
**Bring Snowflake CoCo into Streamlit** — streaming agent UI, tool cards you can actually read, and approval gates that fit governed data apps.
3+
**Built (with love) by Devoteam Snowflake Partner, brings Snowflake CoCo into Streamlit** — streaming agent UI, tool cards you can actually read, and approval gates that fit governed data apps.
44

55
[![CI](https://github.com/lletourmy/streamlit-coco/actions/workflows/ci.yml/badge.svg)](https://github.com/lletourmy/streamlit-coco/actions/workflows/ci.yml)
66
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
77

8-
You own the page. CoCo owns the session. `panel()` streams the transcript; your app keeps `st.chat_input`, metrics, and forms. Approvals pause Write / Edit / Bash / SQL until someone clicks **Approve once**, **Always allow**, or **Deny**.
8+
You own the page. CoCo owns the session. `panel()` streams the transcript; `copilot_rail()` wraps that panel as a right-rail Copilot for multipage apps. Your app keeps `st.chat_input`, metrics, and forms. Approvals pause Write / Edit / Bash / SQL until someone clicks **Approve once**, **Always allow**, or **Deny**.
99

1010
![CoCo for Streamlit — streaming transcript with a Glob tool card](doc/screenshot.png)
1111

12-
> Alpha `0.1.5` — API may still move. Star / watch the repo if you plan to ship on it.
12+
> Alpha `0.1.6` — API may still move. Star / watch the repo if you plan to ship on it.
1313
1414
**Repo:** [github.com/lletourmy/streamlit-coco](https://github.com/lletourmy/streamlit-coco) *(temporary PyPI source)* · **Dev:** [streamlit-coco-dev](https://github.com/DevoteamSP/streamlit-coco-dev)
1515
**SDK docs:** [Cortex Code Agent SDK](https://docs.snowflake.com/en/user-guide/cortex-code-agent-sdk/cortex-code-agent-sdk)
@@ -98,10 +98,12 @@ make approval # legacy CCv2 chat
9898
make structured # custom structured-output panel
9999
make headless # asyncio query() pipeline
100100
make backlog # Product Backlog Desk (multipage business demo)
101+
make tableau-semantic # Tableau workbooks → semantic view + RAP (screens 1–6)
101102
```
102103

103104
Exploratory prompts: [`examples/testdata/prompts.json`](examples/testdata/prompts.json).
104105
Backlog desk: [`examples/backlog_desk/README.md`](examples/backlog_desk/README.md).
106+
Tableau → Semantic: [`examples/tableau_to_semantic/README.md`](examples/tableau_to_semantic/README.md).
105107
File upload: [`doc/features/file-upload/file-upload.md`](doc/features/file-upload/file-upload.md).
106108

107109
---
@@ -141,6 +143,7 @@ asyncio.run(run())
141143
| Capability | Entry points |
142144
| --- | --- |
143145
| Native panel + approvals | `panel()`, `chat_input_bar()`, `render_approvals()` |
146+
| Copilot rail (right-column Copilot) | `copilot_rail()`, `transcript_view_pills()`[`doc/features/copilot-rail/`](doc/features/copilot-rail/) |
144147
| Tool cards & AskUser / plan UI | see [`doc/features/tools-display/`](doc/features/tools-display/) |
145148
| Session & options | `CocoSession`, `CocoOptions`, `get_or_create_session` |
146149
| Headless events | `query()` |
@@ -176,7 +179,7 @@ make help # all targets
176179
CI runs lint, tests, and pip-audit on every PR to `main`. Full local gate: `make test-all` ([`doc/testing.md`](doc/testing.md)).
177180
**Releases:** develop here (`streamlit-coco-dev`), sync + tag on [`lletourmy/streamlit-coco`](https://github.com/lletourmy/streamlit-coco) → PyPI ([guide](doc/deployment/publish.md)).
178181

179-
**Docs:** [PRD](doc/prd.md) · [API](doc/api.md) · [Roadmap](doc/roadmap.md) · [Deployment](doc/deployment/) · [Changelog](CHANGELOG.md) · [AGENTS.md](AGENTS.md)
182+
**Docs:** [PRD](doc/prd.md) · [API](doc/api.md) · [Roadmap](doc/roadmap.md) · [Training](doc/training/training-overview.md) · [Deployment](doc/deployment/) · [Changelog](CHANGELOG.md) · [AGENTS.md](AGENTS.md)
180183

181184
---
182185

doc/api.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# API reference — streamlit-coco
22

33
Public surface exported from `import streamlit_coco as st_coco`.
4-
Alpha `0.1.0` — signatures may still move; prefer this page over the PRD sketch.
4+
Alpha `0.1.6` — signatures may still move; prefer this page over the PRD sketch.
55

66
**Related:** [README quickstart](../README.md) · [Local deployment](deployment/local.md) · [Feature docs](features/README.md) · [SDK docs](https://docs.snowflake.com/en/user-guide/cortex-code-agent-sdk/cortex-code-agent-sdk)
77

@@ -158,11 +158,38 @@ Native transcript / field output + approvals + Stop. App owns input.
158158
| `text_renderer` | `None` | `"markdown"` (default) / `"write"` / `"text"` / … or callable. Default markdown highlights fenced code blocks via `st.code` |
159159
| `show_copy` | `True` | Clipboard controls on assistant messages and tool cards |
160160
| `max_messages` | `None` | Transcript window size; **Load earlier** reveals older items |
161+
| `preview_chars` | `None` | Cap user/assistant text to the first N characters |
161162
| `on_structured_output` | `None` | `Callable[[dict, CocoChatResult], None]` |
162163
| `structured_output_container` | `None` | Container for structured render |
163164

164165
Feature doc: [`features/panel/panel.md`](features/panel/panel.md).
165166

167+
### `copilot_rail(session, *, title="Copilot", …) -> None`
168+
169+
Right-rail Copilot: connection popover with transcript pills beside it, queued job,
170+
`panel()`, chat input. App-agnostic — callers own session lifecycle and job dicts.
171+
While CoCo is busy, **Working · thinking…** is a badge on the pills row (not a
172+
tall status card).
173+
174+
| Param | Default | Notes |
175+
| --- | --- | --- |
176+
| `session` || `CocoSession` or `None` until connected |
177+
| `connected` | `True` | Whether Connect has been confirmed |
178+
| `connections` | `None` | Snowflake connection names for the popover |
179+
| `on_connect` / `on_disconnect` | `None` | Callbacks; omit to hide the popover |
180+
| `job` | `None` | `{prompt, label, status, expect_structured, …}` |
181+
| `on_job_sent` | `None` | Called after a queued prompt is `session.send`'d |
182+
| `on_job_finished` | `None` | Called when that turn ends (`COMPLETED` / `ERROR` / `CANCELLED`, or `READY` after a run) so the app can drop the job |
183+
| `show_copy` | `False` | Clipboard controls off for demo rails |
184+
| `show_transcript_filters` | `True` | Pills: **Last messages** · **First 200 characters** |
185+
186+
### `transcript_view_pills(*, key=…, last_n=8, preview_chars=200) -> tuple[int \| None, int \| None]`
187+
188+
Standalone pills for apps that call `panel()` directly. Returns `(max_messages, preview_chars)`.
189+
Label is collapsed by default (no **Transcript** heading).
190+
191+
Feature doc: [`features/copilot-rail/copilot-rail.md`](features/copilot-rail/copilot-rail.md).
192+
166193
### `chat_input_bar(session, *, placeholder=…, connecting_placeholder=…, key=None, accept_file=False, …) -> str | None`
167194

168195
`st.chat_input` wired to connect/run state; sends via `send_prompt` on submit. Disabled only after a failed boot (`ERROR` and not ready).
@@ -340,7 +367,7 @@ Tool card UX: [`features/tools-display/SPEC.md`](features/tools-display/SPEC.md)
340367
## Package metadata
341368

342369
```python
343-
st_coco.__version__ # e.g. "0.1.0"
370+
st_coco.__version__ # e.g. "0.1.6"
344371
```
345372

346373
Private modules (`bridge`, `tool_cards`, `tool_extract`, …) are implementation details and are not part of the stable public surface.

doc/deployment/publish.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ cp -R doc-dev/releases/_template/. "doc-dev/releases/${VER}/"
5050
```
5151

5252
- Public checklist: [`doc/releases/`](../releases/README.md)`doc/releases/X.Y.Z/CHECKLIST.md`
53-
(current: [`doc/releases/0.1.5/`](../releases/0.1.5/))
53+
(current: [`doc/releases/0.1.6/`](../releases/0.1.6/))
5454
- Outreach (LinkedIn / Medium / community): [`doc-dev/releases/`](../../doc-dev/releases/README.md)
55-
(current: [`doc-dev/releases/0.1.5/`](../../doc-dev/releases/0.1.5/)) — **never synced** to the public repo
55+
(current: [`doc-dev/releases/0.1.6/`](../../doc-dev/releases/0.1.6/)) — **never synced** to the public repo
5656

5757
```bash
5858
make test-all
@@ -88,7 +88,7 @@ Default target clone: `../streamlit-coco` (override with `RELEASE_REPO=`).
8888
Default remote: `https://github.com/lletourmy/streamlit-coco.git` (override with `RELEASE_REMOTE=`).
8989

9090
Excluded from the public tree: `.cursor/`, `.agents/`, `.claude/`, `doc-dev/`,
91-
local caches, `dist/`, and this sync script.
91+
`apps/`, local caches, `dist/`, and this sync script.
9292

9393
### 3. Tag on **lletourmy/streamlit-coco** (PyPI publisher; not `-dev`)
9494

doc/features/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Package API (all public exports): [`../api.md`](../api.md).
1111
| Feature | Narrative | Checklist | Preferred prompts / app |
1212
| --- | --- | --- | --- |
1313
| Panel + chat input | [panel/panel.md](panel/panel.md) | [panel/test-checklist.md](panel/test-checklist.md) | `make chat`; `tools_auto`, `streaming` |
14+
| Copilot rail | [copilot-rail/copilot-rail.md](copilot-rail/copilot-rail.md) | [copilot-rail/test-checklist.md](copilot-rail/test-checklist.md) | `make tableau-semantic`; `copilot_rail()` |
1415
| Tool approvals | [approvals/approvals.md](approvals/approvals.md) | [approvals/test-checklist.md](approvals/test-checklist.md) | category `approval` |
1516
| Tools display + HITL | [tools-display/tools-display.md](tools-display/tools-display.md) ([SPEC](tools-display/SPEC.md)) | [tools-display/test-checklist.md](tools-display/test-checklist.md) | categories `display_*` |
1617
| Structured output | [structured-output/structured-output.md](structured-output/structured-output.md) | [structured-output/test-checklist.md](structured-output/test-checklist.md) | `make structured`; `structured-json` |
@@ -21,7 +22,7 @@ Package API (all public exports): [`../api.md`](../api.md).
2122

2223
## Suggested run order (release)
2324

24-
1. **panel** → 2. **approvals** → 3. **tools-display**4. **structured-output**5. **headless**6. **text-renderer**7. **chat-ccv2**
25+
1. **panel** → 2. **copilot-rail** → 3. **approvals** → 4. **tools-display**5. **structured-output**6. **headless**7. **text-renderer**8. **chat-ccv2**
2526

2627
Approval / plan button order (left → right): **Approve once** · **Always allow** · **Deny** (Deny rightmost). AskUser: **Submit** · **Cancel**. Plan: **Approve plan** · **Reject**.
2728

@@ -39,4 +40,5 @@ Exploratory prompts: [`examples/testdata/`](../../examples/testdata/).
3940
| UI golden path — tools-display | **Pass (core)** (2026-07-27) | [`tools-display/test-checklist.md`](tools-display/test-checklist.md) — Glob/Grep/Read/Write/Edit live; SQL/AskUser/plan/debug deferred |
4041
| UI golden path — structured-output | **Pass (core)** (2026-07-27) | [`structured-output/test-checklist.md`](structured-output/test-checklist.md)`make structured` + `output_schema` live |
4142
| UI golden path — chat-ccv2 | **Pass** (2026-07-27) | [`chat-ccv2/test-checklist.md`](chat-ccv2/test-checklist.md)`make approval` live |
43+
| UI golden path — copilot-rail | **Pending** (`0.1.6`) | [`copilot-rail/test-checklist.md`](copilot-rail/test-checklist.md)`make tableau-semantic` |
4244

0 commit comments

Comments
 (0)