toolframe-streamlit-dashboard 0.4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. toolframe_streamlit_dashboard-0.4.2/.github/workflows/ci.yml +71 -0
  2. toolframe_streamlit_dashboard-0.4.2/.github/workflows/publish.yml +68 -0
  3. toolframe_streamlit_dashboard-0.4.2/.gitignore +17 -0
  4. toolframe_streamlit_dashboard-0.4.2/LICENSE +202 -0
  5. toolframe_streamlit_dashboard-0.4.2/NOTICE +2 -0
  6. toolframe_streamlit_dashboard-0.4.2/PKG-INFO +135 -0
  7. toolframe_streamlit_dashboard-0.4.2/README.md +117 -0
  8. toolframe_streamlit_dashboard-0.4.2/docs/ci.md +84 -0
  9. toolframe_streamlit_dashboard-0.4.2/docs/releasing.md +59 -0
  10. toolframe_streamlit_dashboard-0.4.2/pyproject.toml +36 -0
  11. toolframe_streamlit_dashboard-0.4.2/scripts/check_release.py +24 -0
  12. toolframe_streamlit_dashboard-0.4.2/scripts/smoke_wheel.py +61 -0
  13. toolframe_streamlit_dashboard-0.4.2/scripts/validate.py +250 -0
  14. toolframe_streamlit_dashboard-0.4.2/src/toolframe_streamlit_dashboard/__init__.py +1 -0
  15. toolframe_streamlit_dashboard-0.4.2/src/toolframe_streamlit_dashboard/app.py +73 -0
  16. toolframe_streamlit_dashboard-0.4.2/src/toolframe_streamlit_dashboard/chrome.css +27 -0
  17. toolframe_streamlit_dashboard-0.4.2/src/toolframe_streamlit_dashboard/dependencies.py +187 -0
  18. toolframe_streamlit_dashboard-0.4.2/src/toolframe_streamlit_dashboard/history.py +126 -0
  19. toolframe_streamlit_dashboard-0.4.2/src/toolframe_streamlit_dashboard/management.py +281 -0
  20. toolframe_streamlit_dashboard-0.4.2/src/toolframe_streamlit_dashboard/plugin.py +189 -0
  21. toolframe_streamlit_dashboard-0.4.2/tests/test_dashboard.py +101 -0
  22. toolframe_streamlit_dashboard-0.4.2/tests/test_dependencies.py +137 -0
  23. toolframe_streamlit_dashboard-0.4.2/tests/test_history.py +118 -0
  24. toolframe_streamlit_dashboard-0.4.2/tests/test_management.py +329 -0
  25. toolframe_streamlit_dashboard-0.4.2/uv.lock +1086 -0
@@ -0,0 +1,71 @@
1
+ name: Python CI
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ workflow_dispatch:
7
+ workflow_call:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ # No shared concurrency group: this workflow is also called by publish.yml.
13
+ jobs:
14
+ validate:
15
+ name: Validate (${{ matrix.os }}, Python 3.14.7)
16
+ runs-on: ${{ matrix.os }}
17
+ timeout-minutes: 20
18
+ strategy:
19
+ fail-fast: false
20
+ matrix:
21
+ os: [ubuntu-24.04, macos-15]
22
+ steps:
23
+ - name: Check out this revision
24
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
25
+ with:
26
+ ref: ${{ github.sha }}
27
+ path: dashboard
28
+ persist-credentials: false
29
+ - name: Check out the pinned SDK
30
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
31
+ with:
32
+ # github.repository_owner is the base repository owner for fork PRs.
33
+ repository: ${{ vars.TOOLFRAME_REPOSITORY_OWNER || github.repository_owner }}/toolframe-sdk
34
+ token: ${{ secrets.TOOLFRAME_READ_TOKEN || github.token }}
35
+ ref: ef91b609137a5fe7bae8e0c893e74b096ff06ffe
36
+ path: dependencies/toolframe-sdk
37
+ persist-credentials: false
38
+ - name: Set up Python
39
+ uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
40
+ with:
41
+ python-version: '3.14.7'
42
+ - name: Set up uv
43
+ uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
44
+ with:
45
+ version: '0.12.8'
46
+ enable-cache: false
47
+ - name: Validate in isolated environments
48
+ shell: bash
49
+ run: |
50
+ python dashboard/scripts/validate.py \
51
+ --sdk-source "$GITHUB_WORKSPACE/dependencies/toolframe-sdk" \
52
+ --output-dir "$RUNNER_TEMP/dashboard-artifacts"
53
+ - name: Save validated distributions
54
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
55
+ with:
56
+ name: dashboard-distributions-${{ matrix.os }}-${{ github.sha }}
57
+ path: ${{ runner.temp }}/dashboard-artifacts/dist/*
58
+ if-no-files-found: error
59
+ retention-days: 14
60
+ - name: Save validation evidence
61
+ if: ${{ !cancelled() }}
62
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
63
+ with:
64
+ name: dashboard-validation-${{ matrix.os }}-${{ github.sha }}
65
+ path: |
66
+ ${{ runner.temp }}/dashboard-artifacts/pytest.xml
67
+ ${{ runner.temp }}/dashboard-artifacts/validation.json
68
+ ${{ runner.temp }}/dashboard-artifacts/installed.txt
69
+ ${{ runner.temp }}/dashboard-artifacts/dependency-wheels/*.whl
70
+ if-no-files-found: warn
71
+ retention-days: 14
@@ -0,0 +1,68 @@
1
+ name: Publish Python package
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ repository:
7
+ description: Package index
8
+ type: choice
9
+ required: true
10
+ default: testpypi
11
+ options:
12
+ - testpypi
13
+ - pypi
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ concurrency:
19
+ group: dashboard-publish-${{ github.ref }}-${{ inputs.repository }}
20
+ cancel-in-progress: false
21
+
22
+ jobs:
23
+ release-ref:
24
+ name: Require a matching version tag
25
+ runs-on: ubuntu-24.04
26
+ timeout-minutes: 5
27
+ steps:
28
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
29
+ with:
30
+ ref: ${{ github.sha }}
31
+ persist-credentials: false
32
+ - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
33
+ with:
34
+ python-version: '3.14.7'
35
+ - name: Check tag against project.version
36
+ shell: bash
37
+ env:
38
+ PUBLISH_REPOSITORY: ${{ inputs.repository }}
39
+ run: python scripts/check_release.py "$GITHUB_REF" --repository "$PUBLISH_REPOSITORY"
40
+
41
+ validate:
42
+ needs: release-ref
43
+ uses: ./.github/workflows/ci.yml
44
+ secrets: inherit
45
+ permissions:
46
+ contents: read
47
+
48
+ publish:
49
+ name: Upload validated distributions
50
+ needs: validate
51
+ runs-on: ubuntu-24.04
52
+ timeout-minutes: 10
53
+ environment:
54
+ name: ${{ inputs.repository }}
55
+ url: ${{ inputs.repository == 'pypi' && 'https://pypi.org/p/toolframe-streamlit-dashboard' || 'https://test.pypi.org/p/toolframe-streamlit-dashboard' }}
56
+ permissions:
57
+ id-token: write
58
+ steps:
59
+ - name: Download distributions from this run
60
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
61
+ with:
62
+ name: dashboard-distributions-ubuntu-24.04-${{ github.sha }}
63
+ path: dist
64
+ - name: Publish with Trusted Publishing
65
+ uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
66
+ with:
67
+ packages-dir: dist/
68
+ repository-url: ${{ inputs.repository == 'testpypi' && 'https://test.pypi.org/legacy/' || 'https://upload.pypi.org/legacy/' }}
@@ -0,0 +1,17 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.py[cod]
4
+ .pytest_cache/
5
+ .ruff_cache/
6
+ dist/
7
+ *.egg-info/
8
+ .coverage
9
+ .DS_Store
10
+ /build/
11
+ /.coverage
12
+ /htmlcov/
13
+
14
+ # Local working documents, issue state, and development worktrees.
15
+ /.local/
16
+ /.issues/
17
+ /.worktrees/
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,2 @@
1
+ toolframe-streamlit-dashboard
2
+ Copyright 2026 byfb
@@ -0,0 +1,135 @@
1
+ Metadata-Version: 2.5
2
+ Name: toolframe-streamlit-dashboard
3
+ Version: 0.4.2
4
+ Summary: Native Streamlit page and management provider for Toolframe
5
+ Project-URL: Homepage, https://github.com/toolframe/toolframe-streamlit-dashboard
6
+ Project-URL: Repository, https://github.com/toolframe/toolframe-streamlit-dashboard
7
+ Project-URL: Documentation, https://github.com/toolframe/toolframe-streamlit-dashboard#readme
8
+ Project-URL: Issues, https://github.com/toolframe/toolframe-streamlit-dashboard/issues
9
+ Author-email: byfb <62798989+byfb@users.noreply.github.com>
10
+ License-Expression: Apache-2.0
11
+ License-File: LICENSE
12
+ License-File: NOTICE
13
+ Requires-Python: >=3.14
14
+ Requires-Dist: streamlit==1.61.0
15
+ Requires-Dist: toolframe-sdk<0.4,>=0.2
16
+ Requires-Dist: uvicorn==0.42.0
17
+ Description-Content-Type: text/markdown
18
+
19
+ # Toolframe Streamlit Dashboard
20
+
21
+ This provider runs one native Streamlit process for the shared UI environment.
22
+ Business plugins contribute synchronous `render(context)` pages; navigation and
23
+ plugin management are provided here. Pages use the SDK's synchronous
24
+ `context.services.require(name, version=1).call(method, params)` proxy.
25
+ The Streamlit toolbar uses viewer mode, hiding its Deploy and developer controls.
26
+ Its native running indicator shows a circular spinner instead of cycling sports
27
+ icons. The Running label, Stop button and connection indicators remain available;
28
+ reduced-motion preferences disable the rotation. The narrowly scoped styling
29
+ targets Streamlit 1.61's busy-widget test ID and should be checked on upgrades.
30
+ Plugin lifecycle operations remain available on the Toolframe management page.
31
+
32
+ ## Install
33
+
34
+ Install the provider into a running [Toolframe application](https://github.com/toolframe/toolframe-core#readme):
35
+
36
+ ```sh
37
+ toolframe --home APP plugin add pypi:toolframe-streamlit-dashboard==0.4.2 --enable
38
+ ```
39
+
40
+ Core resolves dependencies and manages the provider's isolated Python environment.
41
+ The Entry Register template already includes this provider.
42
+
43
+ Core resolves the provider and all contributing plugin wheels (with their `ui`
44
+ extras) together before replacing the worker. Changing any page package replaces
45
+ the whole Dashboard. Browser sessions reconnect and session state may reset;
46
+ business services and their persisted data remain independently owned.
47
+
48
+ The provider binds an ephemeral private loopback port and reports it to core.
49
+ Core owns the stable `/` gateway, management credentials and HTTP/WebSocket
50
+ admission. Streamlit owns its server lifespan and script threads. A stuck script
51
+ thread is a cleanup failure, never a successful in-process code reload.
52
+
53
+ SDK 0.2 page contexts carry a host-issued reference for each browser connection.
54
+ Pages use `context.can(scope)` to adapt controls; core checks every service call.
55
+ Navigation filters page scopes and the plugin-management page requires
56
+ `system.plugins.read`. Its mutation controls require the relevant management
57
+ scopes. A password without system grants cannot reach these operations through
58
+ the bridge. Incoming browser identity headers are not trusted.
59
+
60
+ The shared header displays local control, protected access or public access with
61
+ its reason. It remains present when the separate Dashboard Auth plugin is
62
+ unavailable. Its one-second refresh is presentation polling and does not count
63
+ as password activity. Use `activity=False` for other background service polling.
64
+
65
+ `prepare` imports and validates page entry points without rendering them. A
66
+ catalog epoch becomes visible only on `commit`; `abort` preserves live navigation.
67
+ The management page submits operations to core and reads their journal; it does
68
+ not install packages or access SQLite itself.
69
+
70
+ For enable, reload, disable, stop and remove, choose **Preview operation**, review
71
+ the affected plugins, then choose **Apply enable/reload/disable/stop/remove**.
72
+ A preview does not change plugin state. Only stop offers the separate force-stop
73
+ option; temporary runtime validation is offered only for validate.
74
+
75
+ Pending operations update automatically. Completion or errors appear beside the
76
+ controls, and the operation ID stays in the page URL so a browser refresh or
77
+ Dashboard replacement can resume reading its result. Operation history can reopen
78
+ a preview or result. Disabled plugins remain in the management list for re-enabling;
79
+ their pages and tools disappear after the disable operation completes.
80
+ Disabled plugins default to **enable** and do not offer reload/disable/stop.
81
+ Enable restores the installed version; update stages a freshly resolved package.
82
+
83
+ With core 0.5.0+, **Operations** queries the complete core journal with plugin,
84
+ action and result filters. It defaults to 10 rows, with 25/50 options and
85
+ Newer/Older navigation. Each row has a permanent operation number, browser-local
86
+ creation time, action, target and result. Preview rows include the intended action
87
+ (for example, `plan enable`). Viewing a result uses its durable UUID.
88
+ The refresh button aligns with the bottom of the page-size selector, at the right
89
+ edge. Newer and Older sit at opposite edges of one pagination row.
90
+
91
+ Page navigation retains a sequence boundary so new arrivals do not shift older
92
+ pages. **Refresh history**, changing filters or submitting an operation starts
93
+ at the latest first page. The count indicates newer arrivals; statuses remain
94
+ current. Read-only operators can filter, page and inspect results, while apply
95
+ and cancel retain their existing scope checks.
96
+
97
+ The **Plugin dependencies & impact** accordion sits directly below the status
98
+ table and starts collapsed. It reads core's `dependency_graph` diagnostics
99
+ (core 0.4.0+) under the existing `system.plugins.read` permission. Nodes show
100
+ Cordis lifecycle state and current health; arrows run from consumer to supplier.
101
+ Solid lines are required services, dashed lines optional services, and dotted
102
+ lines presentation providers. Missing suppliers and inactive plugins stay visible.
103
+
104
+ Select a plugin and **reload** or **disable** to highlight the lifecycle cohort,
105
+ optional consumers, and page/tool/document entries that may reconnect or refresh.
106
+ The cohort comes from core's actual planner. Presentation refreshes do not imply
107
+ that the provider or every page's business process restarts. Use the full-screen
108
+ control to enlarge the graph; the relationship table includes exact service names
109
+ and versions.
110
+
111
+ This view never installs, validates, submits an operation, or changes composition.
112
+ It describes selected versions; inactive declarations are labeled `last_candidate`.
113
+ New candidates or pending configuration changes can produce a different plan, so
114
+ the existing **Preview operation** / **Apply** workflow remains authoritative.
115
+ Refreshing status refreshes the graph too. An older core shows an upgrade hint.
116
+
117
+ The graph is generated from core state, including newly installed plugins and
118
+ their declared dependencies. `plugin new` only creates source and does not add a
119
+ node; use `plugin add` to install it. Refresh status after changes made elsewhere.
120
+ This is a refreshed snapshot, not a continuously pushed graph animation.
121
+
122
+ Development: `uv sync --group dev`, `uv run pytest -q`, `uv build --no-sources`.
123
+ Each lifecycle integration test uses a fresh subprocess because Streamlit's
124
+ runtime singleton belongs to the process, not a reloadable plugin object.
125
+
126
+ For fresh-environment CI checks, run
127
+ `uv run --isolated --no-project --python 3.14.7 python -I scripts/validate.py`.
128
+ See [CI and package publishing](docs/ci.md) for GitHub Actions, validation artifacts,
129
+ pinned SDK prerequisites and manual TestPyPI/PyPI Trusted Publishing setup.
130
+
131
+ For release validation and Trusted Publisher setup, see [releasing](docs/releasing.md).
132
+
133
+ ## License
134
+
135
+ Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
@@ -0,0 +1,117 @@
1
+ # Toolframe Streamlit Dashboard
2
+
3
+ This provider runs one native Streamlit process for the shared UI environment.
4
+ Business plugins contribute synchronous `render(context)` pages; navigation and
5
+ plugin management are provided here. Pages use the SDK's synchronous
6
+ `context.services.require(name, version=1).call(method, params)` proxy.
7
+ The Streamlit toolbar uses viewer mode, hiding its Deploy and developer controls.
8
+ Its native running indicator shows a circular spinner instead of cycling sports
9
+ icons. The Running label, Stop button and connection indicators remain available;
10
+ reduced-motion preferences disable the rotation. The narrowly scoped styling
11
+ targets Streamlit 1.61's busy-widget test ID and should be checked on upgrades.
12
+ Plugin lifecycle operations remain available on the Toolframe management page.
13
+
14
+ ## Install
15
+
16
+ Install the provider into a running [Toolframe application](https://github.com/toolframe/toolframe-core#readme):
17
+
18
+ ```sh
19
+ toolframe --home APP plugin add pypi:toolframe-streamlit-dashboard==0.4.2 --enable
20
+ ```
21
+
22
+ Core resolves dependencies and manages the provider's isolated Python environment.
23
+ The Entry Register template already includes this provider.
24
+
25
+ Core resolves the provider and all contributing plugin wheels (with their `ui`
26
+ extras) together before replacing the worker. Changing any page package replaces
27
+ the whole Dashboard. Browser sessions reconnect and session state may reset;
28
+ business services and their persisted data remain independently owned.
29
+
30
+ The provider binds an ephemeral private loopback port and reports it to core.
31
+ Core owns the stable `/` gateway, management credentials and HTTP/WebSocket
32
+ admission. Streamlit owns its server lifespan and script threads. A stuck script
33
+ thread is a cleanup failure, never a successful in-process code reload.
34
+
35
+ SDK 0.2 page contexts carry a host-issued reference for each browser connection.
36
+ Pages use `context.can(scope)` to adapt controls; core checks every service call.
37
+ Navigation filters page scopes and the plugin-management page requires
38
+ `system.plugins.read`. Its mutation controls require the relevant management
39
+ scopes. A password without system grants cannot reach these operations through
40
+ the bridge. Incoming browser identity headers are not trusted.
41
+
42
+ The shared header displays local control, protected access or public access with
43
+ its reason. It remains present when the separate Dashboard Auth plugin is
44
+ unavailable. Its one-second refresh is presentation polling and does not count
45
+ as password activity. Use `activity=False` for other background service polling.
46
+
47
+ `prepare` imports and validates page entry points without rendering them. A
48
+ catalog epoch becomes visible only on `commit`; `abort` preserves live navigation.
49
+ The management page submits operations to core and reads their journal; it does
50
+ not install packages or access SQLite itself.
51
+
52
+ For enable, reload, disable, stop and remove, choose **Preview operation**, review
53
+ the affected plugins, then choose **Apply enable/reload/disable/stop/remove**.
54
+ A preview does not change plugin state. Only stop offers the separate force-stop
55
+ option; temporary runtime validation is offered only for validate.
56
+
57
+ Pending operations update automatically. Completion or errors appear beside the
58
+ controls, and the operation ID stays in the page URL so a browser refresh or
59
+ Dashboard replacement can resume reading its result. Operation history can reopen
60
+ a preview or result. Disabled plugins remain in the management list for re-enabling;
61
+ their pages and tools disappear after the disable operation completes.
62
+ Disabled plugins default to **enable** and do not offer reload/disable/stop.
63
+ Enable restores the installed version; update stages a freshly resolved package.
64
+
65
+ With core 0.5.0+, **Operations** queries the complete core journal with plugin,
66
+ action and result filters. It defaults to 10 rows, with 25/50 options and
67
+ Newer/Older navigation. Each row has a permanent operation number, browser-local
68
+ creation time, action, target and result. Preview rows include the intended action
69
+ (for example, `plan enable`). Viewing a result uses its durable UUID.
70
+ The refresh button aligns with the bottom of the page-size selector, at the right
71
+ edge. Newer and Older sit at opposite edges of one pagination row.
72
+
73
+ Page navigation retains a sequence boundary so new arrivals do not shift older
74
+ pages. **Refresh history**, changing filters or submitting an operation starts
75
+ at the latest first page. The count indicates newer arrivals; statuses remain
76
+ current. Read-only operators can filter, page and inspect results, while apply
77
+ and cancel retain their existing scope checks.
78
+
79
+ The **Plugin dependencies & impact** accordion sits directly below the status
80
+ table and starts collapsed. It reads core's `dependency_graph` diagnostics
81
+ (core 0.4.0+) under the existing `system.plugins.read` permission. Nodes show
82
+ Cordis lifecycle state and current health; arrows run from consumer to supplier.
83
+ Solid lines are required services, dashed lines optional services, and dotted
84
+ lines presentation providers. Missing suppliers and inactive plugins stay visible.
85
+
86
+ Select a plugin and **reload** or **disable** to highlight the lifecycle cohort,
87
+ optional consumers, and page/tool/document entries that may reconnect or refresh.
88
+ The cohort comes from core's actual planner. Presentation refreshes do not imply
89
+ that the provider or every page's business process restarts. Use the full-screen
90
+ control to enlarge the graph; the relationship table includes exact service names
91
+ and versions.
92
+
93
+ This view never installs, validates, submits an operation, or changes composition.
94
+ It describes selected versions; inactive declarations are labeled `last_candidate`.
95
+ New candidates or pending configuration changes can produce a different plan, so
96
+ the existing **Preview operation** / **Apply** workflow remains authoritative.
97
+ Refreshing status refreshes the graph too. An older core shows an upgrade hint.
98
+
99
+ The graph is generated from core state, including newly installed plugins and
100
+ their declared dependencies. `plugin new` only creates source and does not add a
101
+ node; use `plugin add` to install it. Refresh status after changes made elsewhere.
102
+ This is a refreshed snapshot, not a continuously pushed graph animation.
103
+
104
+ Development: `uv sync --group dev`, `uv run pytest -q`, `uv build --no-sources`.
105
+ Each lifecycle integration test uses a fresh subprocess because Streamlit's
106
+ runtime singleton belongs to the process, not a reloadable plugin object.
107
+
108
+ For fresh-environment CI checks, run
109
+ `uv run --isolated --no-project --python 3.14.7 python -I scripts/validate.py`.
110
+ See [CI and package publishing](docs/ci.md) for GitHub Actions, validation artifacts,
111
+ pinned SDK prerequisites and manual TestPyPI/PyPI Trusted Publishing setup.
112
+
113
+ For release validation and Trusted Publisher setup, see [releasing](docs/releasing.md).
114
+
115
+ ## License
116
+
117
+ Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).