bijou-portfolio 2.0.0__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 (71) hide show
  1. bijou_portfolio-2.0.0/LICENSE +21 -0
  2. bijou_portfolio-2.0.0/MANIFEST.in +2 -0
  3. bijou_portfolio-2.0.0/PKG-INFO +194 -0
  4. bijou_portfolio-2.0.0/README.md +155 -0
  5. bijou_portfolio-2.0.0/pyproject.toml +64 -0
  6. bijou_portfolio-2.0.0/setup.cfg +4 -0
  7. bijou_portfolio-2.0.0/src/bijou/__init__.py +1 -0
  8. bijou_portfolio-2.0.0/src/bijou/adapters/db/__init__.py +6 -0
  9. bijou_portfolio-2.0.0/src/bijou/adapters/db/repository.py +765 -0
  10. bijou_portfolio-2.0.0/src/bijou/adapters/db/tables.py +182 -0
  11. bijou_portfolio-2.0.0/src/bijou/adapters/llm/__init__.py +5 -0
  12. bijou_portfolio-2.0.0/src/bijou/adapters/llm/aurarouter_adapter.py +119 -0
  13. bijou_portfolio-2.0.0/src/bijou/adapters/telemetry/__init__.py +5 -0
  14. bijou_portfolio-2.0.0/src/bijou/adapters/telemetry/duckdb_store.py +282 -0
  15. bijou_portfolio-2.0.0/src/bijou/api/app.py +138 -0
  16. bijou_portfolio-2.0.0/src/bijou/api/deps.py +44 -0
  17. bijou_portfolio-2.0.0/src/bijou/api/v1/__init__.py +5 -0
  18. bijou_portfolio-2.0.0/src/bijou/api/v1/routers.py +616 -0
  19. bijou_portfolio-2.0.0/src/bijou/cli.py +62 -0
  20. bijou_portfolio-2.0.0/src/bijou/config.py +78 -0
  21. bijou_portfolio-2.0.0/src/bijou/core/contracts/__init__.py +117 -0
  22. bijou_portfolio-2.0.0/src/bijou/core/contracts/base.py +13 -0
  23. bijou_portfolio-2.0.0/src/bijou/core/contracts/enums.py +150 -0
  24. bijou_portfolio-2.0.0/src/bijou/core/contracts/manifest.py +51 -0
  25. bijou_portfolio-2.0.0/src/bijou/core/contracts/models.py +362 -0
  26. bijou_portfolio-2.0.0/src/bijou/core/contracts/telemetry.py +41 -0
  27. bijou_portfolio-2.0.0/src/bijou/core/contracts/tools.py +24 -0
  28. bijou_portfolio-2.0.0/src/bijou/core/contracts/views.py +351 -0
  29. bijou_portfolio-2.0.0/src/bijou/core/engine/__init__.py +27 -0
  30. bijou_portfolio-2.0.0/src/bijou/core/engine/forecasting.py +348 -0
  31. bijou_portfolio-2.0.0/src/bijou/core/engine/projection.py +672 -0
  32. bijou_portfolio-2.0.0/src/bijou/core/engine/traversal.py +321 -0
  33. bijou_portfolio-2.0.0/src/bijou/core/ports/__init__.py +37 -0
  34. bijou_portfolio-2.0.0/src/bijou/core/ports/access_control.py +71 -0
  35. bijou_portfolio-2.0.0/src/bijou/core/ports/exceptions.py +33 -0
  36. bijou_portfolio-2.0.0/src/bijou/core/ports/graph_engine.py +105 -0
  37. bijou_portfolio-2.0.0/src/bijou/core/ports/reasoning.py +27 -0
  38. bijou_portfolio-2.0.0/src/bijou/core/ports/repository.py +126 -0
  39. bijou_portfolio-2.0.0/src/bijou/core/ports/telemetry_store.py +43 -0
  40. bijou_portfolio-2.0.0/src/bijou/main.py +6 -0
  41. bijou_portfolio-2.0.0/src/bijou/sdk/__init__.py +193 -0
  42. bijou_portfolio-2.0.0/src/bijou/sdk/client.py +767 -0
  43. bijou_portfolio-2.0.0/src/bijou/sdk/exceptions.py +43 -0
  44. bijou_portfolio-2.0.0/src/bijou/sdk/ingest.py +115 -0
  45. bijou_portfolio-2.0.0/src/bijou/sdk/ingest_cli.py +60 -0
  46. bijou_portfolio-2.0.0/src/bijou/sdk/models.py +176 -0
  47. bijou_portfolio-2.0.0/src/bijou/services/__init__.py +5 -0
  48. bijou_portfolio-2.0.0/src/bijou/services/orchestrator.py +515 -0
  49. bijou_portfolio-2.0.0/src/bijou/web/__init__.py +6 -0
  50. bijou_portfolio-2.0.0/src/bijou/web/bridge.py +183 -0
  51. bijou_portfolio-2.0.0/src/bijou/web/desktop.py +151 -0
  52. bijou_portfolio-2.0.0/src/bijou/web/static/api.js +245 -0
  53. bijou_portfolio-2.0.0/src/bijou/web/static/app.js +771 -0
  54. bijou_portfolio-2.0.0/src/bijou/web/static/bijou.ico +0 -0
  55. bijou_portfolio-2.0.0/src/bijou/web/static/briefing.js +109 -0
  56. bijou_portfolio-2.0.0/src/bijou/web/static/docs.html +401 -0
  57. bijou_portfolio-2.0.0/src/bijou/web/static/entity_puck.js +215 -0
  58. bijou_portfolio-2.0.0/src/bijou/web/static/graph_editor.js +1198 -0
  59. bijou_portfolio-2.0.0/src/bijou/web/static/index.html +367 -0
  60. bijou_portfolio-2.0.0/src/bijou/web/static/studio.js +836 -0
  61. bijou_portfolio-2.0.0/src/bijou/web/static/styles.css +1651 -0
  62. bijou_portfolio-2.0.0/src/bijou/web/static/view_a_dag.js +299 -0
  63. bijou_portfolio-2.0.0/src/bijou/web/static/view_b_tripartite.js +441 -0
  64. bijou_portfolio-2.0.0/src/bijou/web/static/view_c_dock.js +501 -0
  65. bijou_portfolio-2.0.0/src/bijou/web/static/view_global_neural.js +724 -0
  66. bijou_portfolio-2.0.0/src/bijou_portfolio.egg-info/PKG-INFO +194 -0
  67. bijou_portfolio-2.0.0/src/bijou_portfolio.egg-info/SOURCES.txt +69 -0
  68. bijou_portfolio-2.0.0/src/bijou_portfolio.egg-info/dependency_links.txt +1 -0
  69. bijou_portfolio-2.0.0/src/bijou_portfolio.egg-info/entry_points.txt +3 -0
  70. bijou_portfolio-2.0.0/src/bijou_portfolio.egg-info/requires.txt +17 -0
  71. bijou_portfolio-2.0.0/src/bijou_portfolio.egg-info/top_level.txt +1 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 smsiebe
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,2 @@
1
+ recursive-include src/bijou/web/static *
2
+ include README.md LICENSE
@@ -0,0 +1,194 @@
1
+ Metadata-Version: 2.4
2
+ Name: bijou-portfolio
3
+ Version: 2.0.0
4
+ Summary: Multi-Echelon Impact & Causal Graph Engine with Air-Gapped Web UI & Python SDK
5
+ Author: smsiebe
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/smsiebe/bijou
8
+ Project-URL: Repository, https://github.com/smsiebe/bijou.git
9
+ Project-URL: Bug Tracker, https://github.com/smsiebe/bijou/issues
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Classifier: Operating System :: OS Independent
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: pydantic>=2.7.0
23
+ Requires-Dist: pydantic-settings>=2.2.0
24
+ Requires-Dist: fastapi>=0.110.0
25
+ Requires-Dist: uvicorn>=0.29.0
26
+ Requires-Dist: sqlalchemy>=2.0.0
27
+ Requires-Dist: duckdb>=0.10.0
28
+ Requires-Dist: networkx>=3.2.0
29
+ Requires-Dist: httpx>=0.27.0
30
+ Requires-Dist: pyyaml>=6.0
31
+ Requires-Dist: click>=8.1.0
32
+ Requires-Dist: pywebview>=5.0
33
+ Provides-Extra: dev
34
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
35
+ Requires-Dist: pytest-asyncio>=0.24.0; extra == "dev"
36
+ Requires-Dist: ruff>=0.4.0; extra == "dev"
37
+ Requires-Dist: selenium>=4.20.0; extra == "dev"
38
+ Dynamic: license-file
39
+
40
+ # Bijou
41
+
42
+ **Organizational Interests, Stateful Capability Progression & Resource Portfolio Engine (v2)**
43
+
44
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/)
45
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
46
+ [![Zero External CDN](https://img.shields.io/badge/offline--first-airgapped%20compliant-brightgreen)]()
47
+
48
+ ---
49
+
50
+ ## Overview
51
+
52
+ **Bijou** is an offline-first strategic portfolio, capability dependency, and resource orchestration engine designed for modeling the complex interactions between:
53
+ - **Organizations** (and managed Color-of-Money resource pools)
54
+ - **Interests** (hierarchical DAGs spanning mission goals, threats, intelligence gaps, customers, and strategic categories)
55
+ - **Efforts** (stateful capability programs with optional resource requirements, delivery risks, mitigators, and explicit or dependency-relative timing)
56
+ - **6 Typed Relationships with Pedigree** (`OrgOrgEdge`, `OrgInterestEdge`, `InterestInterestEdge`, `OrgEffortEdge`, `EffortInterestEdge`, `EffortEffortEdge`)
57
+
58
+ Bijou ships as a single PyPI distribution (`bijou-portfolio`, import namespace `bijou`) bundling the FastAPI engine, SQLite + DuckDB stores, offline Vanilla JS/SVG Web UI, CLI entrypoints (`bijou`, `bijou-ingest`), and the integrated Python client SDK (`bijou.sdk`).
59
+
60
+ ---
61
+
62
+ ## Key Capabilities
63
+
64
+ 1. **Three Primary Graph Modes (`A` / `B` / `G`)**:
65
+ - **View A — Capability Progression Tree**: Stateful Effort DAG (`COMPLETED` → `IN_WORK` → `PLANNED` / `DISCOVERY_PENDING`) with SPOF detection, slack calculation, and hover neighborhood emphasis.
66
+ - **View B — Tri-Partite Architectural Flow**: Maps **Organizations & Pools ↔ Efforts ↔ Interest Taxonomy**, illuminating indirect shared-interest benefits and potential organizational partnerships.
67
+ - **View G — Global Neural Graph**: Free-floating force-directed topology with pairwise AABB zero-overlap resolution, node-type toggles, Org/Interest multi-filters, node isolation (`Right-Click → Isolate & Connections`), breadcrumb filter history, drag pinning, and cursor-anchored scroll-wheel zoom.
68
+ 2. **Graph-Native Non-Technical Editing**:
69
+ - Right-click anywhere to spawn Organizations, Efforts, or Interests; drag `●` connect handles between nodes to create relationships using plain-English statements instead of raw enum/direction jargon.
70
+ 3. **Bill of Efforts Scenario Dock**:
71
+ - Persistent slide-out cart for exercising mitigators, staging resource pool allocations (with Color-of-Money Interest DAG inheritance & skill-mismatch slip warnings), testing schedule slip/cancellation shocks, and committing approved decisions.
72
+ 4. **Executive Briefing & Entity Studio**:
73
+ - 1-slide landscape printable briefing tailored per Organization (`X-Bijou-Access-Mode` / `X-Bijou-Active-Org` perspective seam) plus a full Entity & Graph Studio with pre-flight manifest diagnostics.
74
+ 5. **Air-Gapped & Self-Contained**:
75
+ - Zero external JS libraries or CDNs in the Web UI; custom pure Vanilla JS + native browser SVG/DOM rendering bundled directly into the Python wheel.
76
+
77
+ ---
78
+
79
+ ## Quickstart
80
+
81
+ ### 1. Installation
82
+
83
+ Install from PyPI (`pip install bijou-portfolio`) or from source:
84
+
85
+ ```bash
86
+ pip install bijou-portfolio
87
+ # or from local source checkout:
88
+ pip install -e ".[dev]"
89
+ ```
90
+
91
+ The single `bijou-portfolio` wheel includes the backend API, CLI, Web UI static assets (plus offline OpenAPI explorer), and `bijou.sdk` (keeping the `bijou` import namespace).
92
+
93
+ #### Air-Gapped / Corporate Firewall Transfer
94
+
95
+ When moving across a firewall into an internet-isolated network, gather platform-matched wheels (including compiled wheels such as `duckdb` and `pydantic-core`) on the connected side first:
96
+
97
+ ```bash
98
+ # Example for Windows x64 + Python 3.12
99
+ pip download bijou-portfolio -d ./wheelhouse --only-binary=:all: --platform win_amd64 --python-version 3.12
100
+
101
+ # On the air-gapped target machine:
102
+ pip install --no-index --find-links=./wheelhouse bijou-portfolio
103
+ ```
104
+
105
+ Note for locked-down corporate hosts: if the current directory is read-only, Bijou automatically stores its SQLite and DuckDB files in `~/.bijou/`, or you can use `bijou --host 127.0.0.1` / `BijouDesktopBridge` to avoid Windows Firewall prompts.
106
+
107
+ ### 2. Launch the Application
108
+
109
+ ```bash
110
+ # Desktop workbench (zero-webserver in-process pywebview window)
111
+ bijou --mode desktop
112
+
113
+ # Or standalone FastAPI HTTP server
114
+ bijou --mode standalone --port 8000
115
+ ```
116
+
117
+ - **Web UI**: `http://0.0.0.0:8000/` (or `http://localhost:8000/` in a local browser)
118
+ - **Offline Interactive API Explorer**: `http://localhost:8000/docs` (also `/redoc`, zero external CDNs)
119
+ - **OpenAPI 3.1 Schema**: `http://localhost:8000/openapi.json`
120
+
121
+ ### 3. Ingest Reference Data
122
+
123
+ ```bash
124
+ bijou-ingest --server-url http://0.0.0.0:8000 \
125
+ --manifest datasets/joint_isr_architecture.yaml \
126
+ --telemetry datasets/satellite_cascade_telemetry.jsonl \
127
+ --replace-all
128
+ ```
129
+
130
+ ---
131
+
132
+ ## Integrated Python SDK (`bijou.sdk`)
133
+
134
+ Use [`BijouClient`](src/bijou/sdk/client.py) (sync), [`AsyncBijouClient`](src/bijou/sdk/client.py) (async), and [`ManifestIngestor`](src/bijou/sdk/ingest.py) directly from `bijou.sdk` for document-extraction pipelines and analytical automation:
135
+
136
+ ```python
137
+ from bijou.sdk import (
138
+ AccessMode,
139
+ BijouClient,
140
+ ManifestIngestor,
141
+ Organization,
142
+ )
143
+
144
+ with BijouClient(base_url="http://0.0.0.0:8000") as client:
145
+ # Upsert entities (idempotent by string ID)
146
+ client.upsert_organization(
147
+ Organization(id="org-demo", name="Joint Demo Org", is_managed=True)
148
+ )
149
+
150
+ # Or import an atomic multi-entity manifest bundle from an extractor
151
+ ingestor = ManifestIngestor(client)
152
+ ingestor.ingest_manifest_file(
153
+ "datasets/joint_isr_architecture.json",
154
+ validate_first=True,
155
+ )
156
+
157
+ # Query projections and run Bill of Efforts simulation
158
+ tree = client.get_capability_tree()
159
+ sim = client.simulate_bill_of_efforts({"effort_slips": {"eff-edge-correlator": 30}})
160
+ print(f"Nodes: {len(tree.nodes)}, Impacted: {sim.impacted_effort_ids}")
161
+ ```
162
+
163
+ ---
164
+
165
+ ## Documentation Index
166
+
167
+ - [**User Guide**](docs/user_guide.md): Domain ontology, forecasting semantics, Color-of-Money rules, and UI walkthrough.
168
+ - [**Architecture Specification**](docs/architecture.md): Hexagonal architecture, SQLite/DuckDB persistence, NetworkX projection engine, and custom SVG/DOM rendering.
169
+ - [**Developer & Contributing Guide**](docs/developer_guide.md): Setup, test suites, banned-token / offline compliance audits, and wheel packaging.
170
+ - [**API & SDK Reference**](docs/api_reference.md): Complete REST endpoint catalog, `bijou.sdk` methods, models, exceptions, and CLI flags.
171
+
172
+ ---
173
+
174
+ ## Testing & Quality Assurance
175
+
176
+ ```bash
177
+ # Run full suite (unit, contract, adversarial, SDK, ingest, Selenium E2E, wheel check)
178
+ pytest tests -v
179
+
180
+ # Audit source code for banned tokens
181
+ python scripts/audit_banned_tokens.py
182
+
183
+ # Run pre-flight gate
184
+ python scripts/black_preflight_audit.py --root .
185
+
186
+ # Regenerate static OpenAPI schema snapshot
187
+ python scripts/export_openapi.py
188
+ ```
189
+
190
+ ---
191
+
192
+ ## License
193
+
194
+ This project is licensed under the MIT License — see [LICENSE](LICENSE).
@@ -0,0 +1,155 @@
1
+ # Bijou
2
+
3
+ **Organizational Interests, Stateful Capability Progression & Resource Portfolio Engine (v2)**
4
+
5
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7
+ [![Zero External CDN](https://img.shields.io/badge/offline--first-airgapped%20compliant-brightgreen)]()
8
+
9
+ ---
10
+
11
+ ## Overview
12
+
13
+ **Bijou** is an offline-first strategic portfolio, capability dependency, and resource orchestration engine designed for modeling the complex interactions between:
14
+ - **Organizations** (and managed Color-of-Money resource pools)
15
+ - **Interests** (hierarchical DAGs spanning mission goals, threats, intelligence gaps, customers, and strategic categories)
16
+ - **Efforts** (stateful capability programs with optional resource requirements, delivery risks, mitigators, and explicit or dependency-relative timing)
17
+ - **6 Typed Relationships with Pedigree** (`OrgOrgEdge`, `OrgInterestEdge`, `InterestInterestEdge`, `OrgEffortEdge`, `EffortInterestEdge`, `EffortEffortEdge`)
18
+
19
+ Bijou ships as a single PyPI distribution (`bijou-portfolio`, import namespace `bijou`) bundling the FastAPI engine, SQLite + DuckDB stores, offline Vanilla JS/SVG Web UI, CLI entrypoints (`bijou`, `bijou-ingest`), and the integrated Python client SDK (`bijou.sdk`).
20
+
21
+ ---
22
+
23
+ ## Key Capabilities
24
+
25
+ 1. **Three Primary Graph Modes (`A` / `B` / `G`)**:
26
+ - **View A — Capability Progression Tree**: Stateful Effort DAG (`COMPLETED` → `IN_WORK` → `PLANNED` / `DISCOVERY_PENDING`) with SPOF detection, slack calculation, and hover neighborhood emphasis.
27
+ - **View B — Tri-Partite Architectural Flow**: Maps **Organizations & Pools ↔ Efforts ↔ Interest Taxonomy**, illuminating indirect shared-interest benefits and potential organizational partnerships.
28
+ - **View G — Global Neural Graph**: Free-floating force-directed topology with pairwise AABB zero-overlap resolution, node-type toggles, Org/Interest multi-filters, node isolation (`Right-Click → Isolate & Connections`), breadcrumb filter history, drag pinning, and cursor-anchored scroll-wheel zoom.
29
+ 2. **Graph-Native Non-Technical Editing**:
30
+ - Right-click anywhere to spawn Organizations, Efforts, or Interests; drag `●` connect handles between nodes to create relationships using plain-English statements instead of raw enum/direction jargon.
31
+ 3. **Bill of Efforts Scenario Dock**:
32
+ - Persistent slide-out cart for exercising mitigators, staging resource pool allocations (with Color-of-Money Interest DAG inheritance & skill-mismatch slip warnings), testing schedule slip/cancellation shocks, and committing approved decisions.
33
+ 4. **Executive Briefing & Entity Studio**:
34
+ - 1-slide landscape printable briefing tailored per Organization (`X-Bijou-Access-Mode` / `X-Bijou-Active-Org` perspective seam) plus a full Entity & Graph Studio with pre-flight manifest diagnostics.
35
+ 5. **Air-Gapped & Self-Contained**:
36
+ - Zero external JS libraries or CDNs in the Web UI; custom pure Vanilla JS + native browser SVG/DOM rendering bundled directly into the Python wheel.
37
+
38
+ ---
39
+
40
+ ## Quickstart
41
+
42
+ ### 1. Installation
43
+
44
+ Install from PyPI (`pip install bijou-portfolio`) or from source:
45
+
46
+ ```bash
47
+ pip install bijou-portfolio
48
+ # or from local source checkout:
49
+ pip install -e ".[dev]"
50
+ ```
51
+
52
+ The single `bijou-portfolio` wheel includes the backend API, CLI, Web UI static assets (plus offline OpenAPI explorer), and `bijou.sdk` (keeping the `bijou` import namespace).
53
+
54
+ #### Air-Gapped / Corporate Firewall Transfer
55
+
56
+ When moving across a firewall into an internet-isolated network, gather platform-matched wheels (including compiled wheels such as `duckdb` and `pydantic-core`) on the connected side first:
57
+
58
+ ```bash
59
+ # Example for Windows x64 + Python 3.12
60
+ pip download bijou-portfolio -d ./wheelhouse --only-binary=:all: --platform win_amd64 --python-version 3.12
61
+
62
+ # On the air-gapped target machine:
63
+ pip install --no-index --find-links=./wheelhouse bijou-portfolio
64
+ ```
65
+
66
+ Note for locked-down corporate hosts: if the current directory is read-only, Bijou automatically stores its SQLite and DuckDB files in `~/.bijou/`, or you can use `bijou --host 127.0.0.1` / `BijouDesktopBridge` to avoid Windows Firewall prompts.
67
+
68
+ ### 2. Launch the Application
69
+
70
+ ```bash
71
+ # Desktop workbench (zero-webserver in-process pywebview window)
72
+ bijou --mode desktop
73
+
74
+ # Or standalone FastAPI HTTP server
75
+ bijou --mode standalone --port 8000
76
+ ```
77
+
78
+ - **Web UI**: `http://0.0.0.0:8000/` (or `http://localhost:8000/` in a local browser)
79
+ - **Offline Interactive API Explorer**: `http://localhost:8000/docs` (also `/redoc`, zero external CDNs)
80
+ - **OpenAPI 3.1 Schema**: `http://localhost:8000/openapi.json`
81
+
82
+ ### 3. Ingest Reference Data
83
+
84
+ ```bash
85
+ bijou-ingest --server-url http://0.0.0.0:8000 \
86
+ --manifest datasets/joint_isr_architecture.yaml \
87
+ --telemetry datasets/satellite_cascade_telemetry.jsonl \
88
+ --replace-all
89
+ ```
90
+
91
+ ---
92
+
93
+ ## Integrated Python SDK (`bijou.sdk`)
94
+
95
+ Use [`BijouClient`](src/bijou/sdk/client.py) (sync), [`AsyncBijouClient`](src/bijou/sdk/client.py) (async), and [`ManifestIngestor`](src/bijou/sdk/ingest.py) directly from `bijou.sdk` for document-extraction pipelines and analytical automation:
96
+
97
+ ```python
98
+ from bijou.sdk import (
99
+ AccessMode,
100
+ BijouClient,
101
+ ManifestIngestor,
102
+ Organization,
103
+ )
104
+
105
+ with BijouClient(base_url="http://0.0.0.0:8000") as client:
106
+ # Upsert entities (idempotent by string ID)
107
+ client.upsert_organization(
108
+ Organization(id="org-demo", name="Joint Demo Org", is_managed=True)
109
+ )
110
+
111
+ # Or import an atomic multi-entity manifest bundle from an extractor
112
+ ingestor = ManifestIngestor(client)
113
+ ingestor.ingest_manifest_file(
114
+ "datasets/joint_isr_architecture.json",
115
+ validate_first=True,
116
+ )
117
+
118
+ # Query projections and run Bill of Efforts simulation
119
+ tree = client.get_capability_tree()
120
+ sim = client.simulate_bill_of_efforts({"effort_slips": {"eff-edge-correlator": 30}})
121
+ print(f"Nodes: {len(tree.nodes)}, Impacted: {sim.impacted_effort_ids}")
122
+ ```
123
+
124
+ ---
125
+
126
+ ## Documentation Index
127
+
128
+ - [**User Guide**](docs/user_guide.md): Domain ontology, forecasting semantics, Color-of-Money rules, and UI walkthrough.
129
+ - [**Architecture Specification**](docs/architecture.md): Hexagonal architecture, SQLite/DuckDB persistence, NetworkX projection engine, and custom SVG/DOM rendering.
130
+ - [**Developer & Contributing Guide**](docs/developer_guide.md): Setup, test suites, banned-token / offline compliance audits, and wheel packaging.
131
+ - [**API & SDK Reference**](docs/api_reference.md): Complete REST endpoint catalog, `bijou.sdk` methods, models, exceptions, and CLI flags.
132
+
133
+ ---
134
+
135
+ ## Testing & Quality Assurance
136
+
137
+ ```bash
138
+ # Run full suite (unit, contract, adversarial, SDK, ingest, Selenium E2E, wheel check)
139
+ pytest tests -v
140
+
141
+ # Audit source code for banned tokens
142
+ python scripts/audit_banned_tokens.py
143
+
144
+ # Run pre-flight gate
145
+ python scripts/black_preflight_audit.py --root .
146
+
147
+ # Regenerate static OpenAPI schema snapshot
148
+ python scripts/export_openapi.py
149
+ ```
150
+
151
+ ---
152
+
153
+ ## License
154
+
155
+ This project is licensed under the MIT License — see [LICENSE](LICENSE).
@@ -0,0 +1,64 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "bijou-portfolio"
7
+ version = "2.0.0"
8
+ description = "Multi-Echelon Impact & Causal Graph Engine with Air-Gapped Web UI & Python SDK"
9
+ readme = "README.md"
10
+ authors = [
11
+ { name = "smsiebe" }
12
+ ]
13
+ license = "MIT"
14
+ requires-python = ">=3.10"
15
+ classifiers = [
16
+ "Development Status :: 4 - Beta",
17
+ "Intended Audience :: Developers",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.10",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ "Programming Language :: Python :: 3.13",
23
+ "Programming Language :: Python :: 3.14",
24
+ "Operating System :: OS Independent",
25
+ ]
26
+ dependencies = [
27
+ "pydantic>=2.7.0",
28
+ "pydantic-settings>=2.2.0",
29
+ "fastapi>=0.110.0",
30
+ "uvicorn>=0.29.0",
31
+ "sqlalchemy>=2.0.0",
32
+ "duckdb>=0.10.0",
33
+ "networkx>=3.2.0",
34
+ "httpx>=0.27.0",
35
+ "pyyaml>=6.0",
36
+ "click>=8.1.0",
37
+ "pywebview>=5.0",
38
+ ]
39
+
40
+ [project.optional-dependencies]
41
+ dev = [
42
+ "pytest>=8.0.0",
43
+ "pytest-asyncio>=0.24.0",
44
+ "ruff>=0.4.0",
45
+ "selenium>=4.20.0",
46
+ ]
47
+
48
+ [project.urls]
49
+ Homepage = "https://github.com/smsiebe/bijou"
50
+ Repository = "https://github.com/smsiebe/bijou.git"
51
+ "Bug Tracker" = "https://github.com/smsiebe/bijou/issues"
52
+
53
+ [project.scripts]
54
+ bijou = "bijou.cli:main"
55
+ bijou-ingest = "bijou.sdk.ingest_cli:main"
56
+
57
+ [tool.setuptools]
58
+ include-package-data = true
59
+
60
+ [tool.setuptools.packages.find]
61
+ where = ["src"]
62
+
63
+ [tool.setuptools.package-data]
64
+ bijou = ["web/static/*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1 @@
1
+ """Bijou package."""
@@ -0,0 +1,6 @@
1
+ """Database storage adapter package."""
2
+
3
+ from bijou.adapters.db.repository import SqlAlchemyGraphRepository
4
+ from bijou.adapters.db.tables import Base
5
+
6
+ __all__ = ["Base", "SqlAlchemyGraphRepository"]