agi-web 2026.5.31.post1__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.
- agi_web-2026.5.31.post1/LICENSE +22 -0
- agi_web-2026.5.31.post1/PKG-INFO +112 -0
- agi_web-2026.5.31.post1/README.md +82 -0
- agi_web-2026.5.31.post1/pyproject.toml +64 -0
- agi_web-2026.5.31.post1/setup.cfg +4 -0
- agi_web-2026.5.31.post1/src/agi_web/__init__.py +49 -0
- agi_web-2026.5.31.post1/src/agi_web/component.py +1058 -0
- agi_web-2026.5.31.post1/src/agi_web.egg-info/PKG-INFO +112 -0
- agi_web-2026.5.31.post1/src/agi_web.egg-info/SOURCES.txt +10 -0
- agi_web-2026.5.31.post1/src/agi_web.egg-info/dependency_links.txt +1 -0
- agi_web-2026.5.31.post1/src/agi_web.egg-info/top_level.txt +1 -0
- agi_web-2026.5.31.post1/test/test_agi_web_component.py +136 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, Jean-Pierre Morard, THALES SIX GTS France SAS
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
|
7
|
+
following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
|
|
10
|
+
disclaimer.
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
|
|
12
|
+
disclaimer in the documentation and/or other materials provided with the distribution.
|
|
13
|
+
3. Neither the name of Jean-Pierre MORARD nor the names of its contributors, or THALES SIX GTS France SAS, may be used
|
|
14
|
+
to endorse or promote products derived from this software without specific prior written permission.
|
|
15
|
+
|
|
16
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
|
17
|
+
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
18
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
19
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
20
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
21
|
+
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
22
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agi-web
|
|
3
|
+
Version: 2026.5.31.post1
|
|
4
|
+
Summary: AGILAB portable web component contract with static Canvas2D/WebGL adapters for Streamlit and HTML
|
|
5
|
+
Author: Jean-Pierre Morard
|
|
6
|
+
Maintainer: Jean-Pierre Morard
|
|
7
|
+
License-Expression: BSD-3-Clause
|
|
8
|
+
Project-URL: Documentation, https://thalesgroup.github.io/agilab
|
|
9
|
+
Project-URL: Source, https://github.com/ThalesGroup/agilab/tree/main/src/agilab/lib/agi-web
|
|
10
|
+
Project-URL: Issues, https://github.com/ThalesGroup/agilab/issues
|
|
11
|
+
Project-URL: Homepage, https://github.com/ThalesGroup/agilab
|
|
12
|
+
Project-URL: Repository, https://github.com/ThalesGroup/agilab
|
|
13
|
+
Project-URL: Discussions, https://github.com/ThalesGroup/agilab/discussions
|
|
14
|
+
Project-URL: Changelog, https://github.com/ThalesGroup/agilab/releases
|
|
15
|
+
Keywords: agilab,web-components,streamlit,react,webgl,canvas,evidence
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: Development Status :: 4 - Beta
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
23
|
+
Classifier: Operating System :: MacOS
|
|
24
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
25
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
26
|
+
Requires-Python: >=3.11
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
|
|
31
|
+
# AGI Web
|
|
32
|
+
|
|
33
|
+
[](https://pypi.org/project/agi-web/)
|
|
34
|
+
[](https://pypi.org/project/agi-web/)
|
|
35
|
+
[](https://opensource.org/licenses/BSD-3-Clause)
|
|
36
|
+
|
|
37
|
+
`agi-web` defines a portable component contract for AGILAB app-owned UI islands.
|
|
38
|
+
It lets an app describe a rich browser component once, attach deterministic
|
|
39
|
+
evidence hashes, and render it in Streamlit or static HTML today while keeping a
|
|
40
|
+
stable payload for richer adapters.
|
|
41
|
+
The bundled static adapter can render a WebGL decision-surface heatmap with a
|
|
42
|
+
Canvas2D overlay/fallback for local replay/scrub controls, clickable timelines,
|
|
43
|
+
keyboard scrubbing, confidence badges, uncertainty-contour glow, and hover
|
|
44
|
+
readouts when the payload includes boundary snapshots.
|
|
45
|
+
|
|
46
|
+
## Quick Install
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install agi-web
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Most users get it through the AGILAB UI profile:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pip install "agilab[ui]"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Component Contract
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
from agi_web import AgiWebComponent, AgiWebRendererSpec, render_streamlit
|
|
62
|
+
|
|
63
|
+
component = AgiWebComponent(
|
|
64
|
+
component_id="playground-boundary",
|
|
65
|
+
title="Decision boundary",
|
|
66
|
+
renderer=AgiWebRendererSpec(
|
|
67
|
+
renderer_id="pytorch-boundary-webgl",
|
|
68
|
+
technology="webgl",
|
|
69
|
+
capabilities=("decision-boundary", "learning-replay", "gpu-heatmap"),
|
|
70
|
+
),
|
|
71
|
+
payload={
|
|
72
|
+
"samples": [{"x1": -0.4, "x2": 0.2, "target": 1}],
|
|
73
|
+
"grid": [{"x1": -0.5, "x2": 0.0, "probability": 0.72}],
|
|
74
|
+
"snapshots": [
|
|
75
|
+
{"epoch": 0, "x1": -0.5, "x2": 0.0, "probability": 0.51},
|
|
76
|
+
{"epoch": 8, "x1": -0.5, "x2": 0.0, "probability": 0.72},
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
render_streamlit(component)
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The contract is intentionally framework-neutral:
|
|
85
|
+
|
|
86
|
+
- The payload is normalized JSON, so Canvas2D, WebGL, Streamlit, notebook,
|
|
87
|
+
static-report, and future React renderers can consume the same data.
|
|
88
|
+
- The evidence block records the renderer, payload hash, action hash, and asset
|
|
89
|
+
hash, so visual proof artifacts can be compared deterministically.
|
|
90
|
+
- The package has no JavaScript build dependency. The current static renderer
|
|
91
|
+
ships Canvas2D/WebGL paths; framework-specific adapters can be added beside
|
|
92
|
+
the contract without forcing Node tooling into every AGILAB install.
|
|
93
|
+
|
|
94
|
+
## Visual Guard
|
|
95
|
+
|
|
96
|
+
The repository ships a deterministic browser fixture for this adapter:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
uv --preview-features extra-build-dependencies run --with playwright --with pillow \
|
|
100
|
+
python tools/agi_web_visual_regression.py --browser chromium --max-render-ms 2500 --json
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
The `agi-web-visual` workflow parity profile compares Chromium output against
|
|
104
|
+
the committed `docs/source/_static/agi-web-visual-baseline` screenshot baseline
|
|
105
|
+
and records per-browser render timing. Pass repeated `--browser` options for
|
|
106
|
+
manual Firefox/WebKit smoke checks.
|
|
107
|
+
|
|
108
|
+
## Repository
|
|
109
|
+
|
|
110
|
+
- Source: https://github.com/ThalesGroup/agilab/tree/main/src/agilab/lib/agi-web
|
|
111
|
+
- Docs: https://thalesgroup.github.io/agilab/agi-web.html
|
|
112
|
+
- Issues: https://github.com/ThalesGroup/agilab/issues
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# AGI Web
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/agi-web/)
|
|
4
|
+
[](https://pypi.org/project/agi-web/)
|
|
5
|
+
[](https://opensource.org/licenses/BSD-3-Clause)
|
|
6
|
+
|
|
7
|
+
`agi-web` defines a portable component contract for AGILAB app-owned UI islands.
|
|
8
|
+
It lets an app describe a rich browser component once, attach deterministic
|
|
9
|
+
evidence hashes, and render it in Streamlit or static HTML today while keeping a
|
|
10
|
+
stable payload for richer adapters.
|
|
11
|
+
The bundled static adapter can render a WebGL decision-surface heatmap with a
|
|
12
|
+
Canvas2D overlay/fallback for local replay/scrub controls, clickable timelines,
|
|
13
|
+
keyboard scrubbing, confidence badges, uncertainty-contour glow, and hover
|
|
14
|
+
readouts when the payload includes boundary snapshots.
|
|
15
|
+
|
|
16
|
+
## Quick Install
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pip install agi-web
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Most users get it through the AGILAB UI profile:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pip install "agilab[ui]"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Component Contract
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
from agi_web import AgiWebComponent, AgiWebRendererSpec, render_streamlit
|
|
32
|
+
|
|
33
|
+
component = AgiWebComponent(
|
|
34
|
+
component_id="playground-boundary",
|
|
35
|
+
title="Decision boundary",
|
|
36
|
+
renderer=AgiWebRendererSpec(
|
|
37
|
+
renderer_id="pytorch-boundary-webgl",
|
|
38
|
+
technology="webgl",
|
|
39
|
+
capabilities=("decision-boundary", "learning-replay", "gpu-heatmap"),
|
|
40
|
+
),
|
|
41
|
+
payload={
|
|
42
|
+
"samples": [{"x1": -0.4, "x2": 0.2, "target": 1}],
|
|
43
|
+
"grid": [{"x1": -0.5, "x2": 0.0, "probability": 0.72}],
|
|
44
|
+
"snapshots": [
|
|
45
|
+
{"epoch": 0, "x1": -0.5, "x2": 0.0, "probability": 0.51},
|
|
46
|
+
{"epoch": 8, "x1": -0.5, "x2": 0.0, "probability": 0.72},
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
render_streamlit(component)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The contract is intentionally framework-neutral:
|
|
55
|
+
|
|
56
|
+
- The payload is normalized JSON, so Canvas2D, WebGL, Streamlit, notebook,
|
|
57
|
+
static-report, and future React renderers can consume the same data.
|
|
58
|
+
- The evidence block records the renderer, payload hash, action hash, and asset
|
|
59
|
+
hash, so visual proof artifacts can be compared deterministically.
|
|
60
|
+
- The package has no JavaScript build dependency. The current static renderer
|
|
61
|
+
ships Canvas2D/WebGL paths; framework-specific adapters can be added beside
|
|
62
|
+
the contract without forcing Node tooling into every AGILAB install.
|
|
63
|
+
|
|
64
|
+
## Visual Guard
|
|
65
|
+
|
|
66
|
+
The repository ships a deterministic browser fixture for this adapter:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
uv --preview-features extra-build-dependencies run --with playwright --with pillow \
|
|
70
|
+
python tools/agi_web_visual_regression.py --browser chromium --max-render-ms 2500 --json
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The `agi-web-visual` workflow parity profile compares Chromium output against
|
|
74
|
+
the committed `docs/source/_static/agi-web-visual-baseline` screenshot baseline
|
|
75
|
+
and records per-browser render timing. Pass repeated `--browser` options for
|
|
76
|
+
manual Firefox/WebKit smoke checks.
|
|
77
|
+
|
|
78
|
+
## Repository
|
|
79
|
+
|
|
80
|
+
- Source: https://github.com/ThalesGroup/agilab/tree/main/src/agilab/lib/agi-web
|
|
81
|
+
- Docs: https://thalesgroup.github.io/agilab/agi-web.html
|
|
82
|
+
- Issues: https://github.com/ThalesGroup/agilab/issues
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
version = "2026.05.31.post1"
|
|
3
|
+
name = "agi-web"
|
|
4
|
+
description = "AGILAB portable web component contract with static Canvas2D/WebGL adapters for Streamlit and HTML"
|
|
5
|
+
requires-python = ">=3.11"
|
|
6
|
+
readme = "README.md"
|
|
7
|
+
authors = [
|
|
8
|
+
{ name = "Jean-Pierre Morard" }
|
|
9
|
+
]
|
|
10
|
+
maintainers = [{ name = "Jean-Pierre Morard" }]
|
|
11
|
+
license = "BSD-3-Clause"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Intended Audience :: Developers",
|
|
16
|
+
"Development Status :: 4 - Beta",
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Programming Language :: Python :: 3.11",
|
|
19
|
+
"Programming Language :: Python :: 3.12",
|
|
20
|
+
"Programming Language :: Python :: 3.13",
|
|
21
|
+
"Programming Language :: Python :: 3.14",
|
|
22
|
+
"Operating System :: MacOS",
|
|
23
|
+
"Operating System :: Microsoft :: Windows",
|
|
24
|
+
"Operating System :: POSIX :: Linux",
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
keywords = [
|
|
28
|
+
"agilab",
|
|
29
|
+
"web-components",
|
|
30
|
+
"streamlit",
|
|
31
|
+
"react",
|
|
32
|
+
"webgl",
|
|
33
|
+
"canvas",
|
|
34
|
+
"evidence",
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
dependencies = []
|
|
38
|
+
|
|
39
|
+
[project.urls]
|
|
40
|
+
Documentation = "https://thalesgroup.github.io/agilab"
|
|
41
|
+
Source = "https://github.com/ThalesGroup/agilab/tree/main/src/agilab/lib/agi-web"
|
|
42
|
+
Issues = "https://github.com/ThalesGroup/agilab/issues"
|
|
43
|
+
Homepage = "https://github.com/ThalesGroup/agilab"
|
|
44
|
+
Repository = "https://github.com/ThalesGroup/agilab"
|
|
45
|
+
Discussions = "https://github.com/ThalesGroup/agilab/discussions"
|
|
46
|
+
Changelog = "https://github.com/ThalesGroup/agilab/releases"
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
[dependency-groups]
|
|
50
|
+
dev = [
|
|
51
|
+
"pytest",
|
|
52
|
+
]
|
|
53
|
+
|
|
54
|
+
[build-system]
|
|
55
|
+
requires = ["setuptools>=68", "wheel"]
|
|
56
|
+
build-backend = "setuptools.build_meta"
|
|
57
|
+
|
|
58
|
+
[tool.setuptools]
|
|
59
|
+
include-package-data = false
|
|
60
|
+
package-dir = {"" = "src"}
|
|
61
|
+
packages = ["agi_web"]
|
|
62
|
+
|
|
63
|
+
[tool.pytest.ini_options]
|
|
64
|
+
testpaths = ["test"]
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"""Portable AGILAB web component contracts."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from importlib.metadata import PackageNotFoundError, version as _package_version
|
|
6
|
+
|
|
7
|
+
from .component import (
|
|
8
|
+
AGI_WEB_COMPONENT_SCHEMA,
|
|
9
|
+
AGI_WEB_EVIDENCE_SCHEMA,
|
|
10
|
+
SUPPORTED_RENDERER_TECHNOLOGIES,
|
|
11
|
+
AgiWebAction,
|
|
12
|
+
AgiWebAsset,
|
|
13
|
+
AgiWebComponent,
|
|
14
|
+
AgiWebRendererSpec,
|
|
15
|
+
component_evidence,
|
|
16
|
+
component_to_static_html,
|
|
17
|
+
normalize_component_id,
|
|
18
|
+
normalize_json_value,
|
|
19
|
+
records_from_data,
|
|
20
|
+
render_notebook,
|
|
21
|
+
render_streamlit,
|
|
22
|
+
stable_sha256,
|
|
23
|
+
to_canonical_json,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
try:
|
|
27
|
+
__version__ = _package_version("agi-web")
|
|
28
|
+
except PackageNotFoundError:
|
|
29
|
+
__version__ = "0+unknown"
|
|
30
|
+
|
|
31
|
+
__all__ = (
|
|
32
|
+
"AGI_WEB_COMPONENT_SCHEMA",
|
|
33
|
+
"AGI_WEB_EVIDENCE_SCHEMA",
|
|
34
|
+
"SUPPORTED_RENDERER_TECHNOLOGIES",
|
|
35
|
+
"AgiWebAction",
|
|
36
|
+
"AgiWebAsset",
|
|
37
|
+
"AgiWebComponent",
|
|
38
|
+
"AgiWebRendererSpec",
|
|
39
|
+
"__version__",
|
|
40
|
+
"component_evidence",
|
|
41
|
+
"component_to_static_html",
|
|
42
|
+
"normalize_component_id",
|
|
43
|
+
"normalize_json_value",
|
|
44
|
+
"records_from_data",
|
|
45
|
+
"render_notebook",
|
|
46
|
+
"render_streamlit",
|
|
47
|
+
"stable_sha256",
|
|
48
|
+
"to_canonical_json",
|
|
49
|
+
)
|