nvs-runtime 1.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 (185) hide show
  1. nvs_runtime-1.0.0/.github/ISSUE_TEMPLATE/bug_report.md +30 -0
  2. nvs_runtime-1.0.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
  3. nvs_runtime-1.0.0/.github/ISSUE_TEMPLATE/feature_request.md +18 -0
  4. nvs_runtime-1.0.0/.github/PULL_REQUEST_TEMPLATE.md +23 -0
  5. nvs_runtime-1.0.0/.github/RELEASE_NOTES_v1.0.0.md +86 -0
  6. nvs_runtime-1.0.0/.github/workflows/ci.yml +38 -0
  7. nvs_runtime-1.0.0/.github/workflows/release.yml +74 -0
  8. nvs_runtime-1.0.0/.gitignore +16 -0
  9. nvs_runtime-1.0.0/CITATION.cff +28 -0
  10. nvs_runtime-1.0.0/CODE_OF_CONDUCT.md +31 -0
  11. nvs_runtime-1.0.0/CONTRIBUTING.md +77 -0
  12. nvs_runtime-1.0.0/GOVERNANCE.md +71 -0
  13. nvs_runtime-1.0.0/LICENSE +190 -0
  14. nvs_runtime-1.0.0/PKG-INFO +234 -0
  15. nvs_runtime-1.0.0/README.md +190 -0
  16. nvs_runtime-1.0.0/ROADMAP.md +37 -0
  17. nvs_runtime-1.0.0/SECURITY.md +34 -0
  18. nvs_runtime-1.0.0/SUPPORT.md +42 -0
  19. nvs_runtime-1.0.0/docs/README.md +18 -0
  20. nvs_runtime-1.0.0/docs/architecture.md +114 -0
  21. nvs_runtime-1.0.0/docs/contribution-guide.md +69 -0
  22. nvs_runtime-1.0.0/docs/developer-guide.md +67 -0
  23. nvs_runtime-1.0.0/docs/provider-guide.md +87 -0
  24. nvs_runtime-1.0.0/docs/runtime-guide.md +117 -0
  25. nvs_runtime-1.0.0/examples/hello_runtime.py +31 -0
  26. nvs_runtime-1.0.0/examples/hidden_trajectory/README.md +33 -0
  27. nvs_runtime-1.0.0/examples/hidden_trajectory/gate_nvs_cli.py +29 -0
  28. nvs_runtime-1.0.0/examples/hidden_trajectory/run_door.py +54 -0
  29. nvs_runtime-1.0.0/examples/hidden_trajectory/sensos_door.py +117 -0
  30. nvs_runtime-1.0.0/examples/plan_and_invoke.py +57 -0
  31. nvs_runtime-1.0.0/public-sync/allowlist.txt +185 -0
  32. nvs_runtime-1.0.0/public-sync/audit-rules.toml +115 -0
  33. nvs_runtime-1.0.0/public-sync/audit_artifacts.py +384 -0
  34. nvs_runtime-1.0.0/public-sync/check_allowlist.py +96 -0
  35. nvs_runtime-1.0.0/public-sync/export_public.py +291 -0
  36. nvs_runtime-1.0.0/public-sync/sync-manifest.json +193 -0
  37. nvs_runtime-1.0.0/public-sync/tests/test_public_sync.py +195 -0
  38. nvs_runtime-1.0.0/pyproject.toml +135 -0
  39. nvs_runtime-1.0.0/src/nvs_runtime/__init__.py +29 -0
  40. nvs_runtime-1.0.0/src/nvs_runtime/__version__.py +3 -0
  41. nvs_runtime-1.0.0/src/nvs_runtime/config/__init__.py +3 -0
  42. nvs_runtime-1.0.0/src/nvs_runtime/config/settings.py +26 -0
  43. nvs_runtime-1.0.0/src/nvs_runtime/core/__init__.py +6 -0
  44. nvs_runtime-1.0.0/src/nvs_runtime/core/clock.py +32 -0
  45. nvs_runtime-1.0.0/src/nvs_runtime/core/composition.py +92 -0
  46. nvs_runtime-1.0.0/src/nvs_runtime/core/errors.py +69 -0
  47. nvs_runtime-1.0.0/src/nvs_runtime/core/hext.py +43 -0
  48. nvs_runtime-1.0.0/src/nvs_runtime/core/models.py +151 -0
  49. nvs_runtime-1.0.0/src/nvs_runtime/core/protocols.py +77 -0
  50. nvs_runtime-1.0.0/src/nvs_runtime/core/runtime.py +373 -0
  51. nvs_runtime-1.0.0/src/nvs_runtime/events/__init__.py +4 -0
  52. nvs_runtime-1.0.0/src/nvs_runtime/events/bus.py +50 -0
  53. nvs_runtime-1.0.0/src/nvs_runtime/events/types.py +35 -0
  54. nvs_runtime-1.0.0/src/nvs_runtime/executors/__init__.py +2 -0
  55. nvs_runtime-1.0.0/src/nvs_runtime/governance/__init__.py +4 -0
  56. nvs_runtime-1.0.0/src/nvs_runtime/governance/engine.py +58 -0
  57. nvs_runtime-1.0.0/src/nvs_runtime/governance/quota.py +48 -0
  58. nvs_runtime-1.0.0/src/nvs_runtime/graph/__init__.py +3 -0
  59. nvs_runtime-1.0.0/src/nvs_runtime/graph/capability_graph.py +100 -0
  60. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/__init__.py +62 -0
  61. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/_gate_child.py +375 -0
  62. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/adapter_loader.py +70 -0
  63. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/canonical.py +22 -0
  64. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/capture_archive.py +204 -0
  65. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/capture_chain.py +319 -0
  66. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/cli.py +765 -0
  67. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/envelope.py +303 -0
  68. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/formal_save.py +499 -0
  69. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/formal_writer.py +590 -0
  70. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/gate_client.py +460 -0
  71. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/item_set.py +317 -0
  72. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/k_measure.py +145 -0
  73. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/model_catalog.py +56 -0
  74. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/payload.py +382 -0
  75. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/phase2/__init__.py +3 -0
  76. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/phase2/evaluate.py +319 -0
  77. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/phase2/geometry.py +80 -0
  78. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/phase2/labels.py +72 -0
  79. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/phase4/__init__.py +3 -0
  80. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/phase4/normalize.py +171 -0
  81. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/phase4/summary.py +270 -0
  82. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/phase4b/__init__.py +3 -0
  83. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/phase4b/load.py +46 -0
  84. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/phase4b/metrics.py +96 -0
  85. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/phase4b/scan.py +33 -0
  86. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/record.py +334 -0
  87. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/record_schema.py +781 -0
  88. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/replay/__init__.py +6 -0
  89. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/replay/risk_control.py +196 -0
  90. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/rerun.py +302 -0
  91. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/rsa/__init__.py +6 -0
  92. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/rsa/analysis.py +248 -0
  93. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/rsa/calibration.py +659 -0
  94. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/rsa/compare.py +714 -0
  95. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/rsa/readout.py +192 -0
  96. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/run.py +362 -0
  97. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/token_temporal.py +368 -0
  98. nvs_runtime-1.0.0/src/nvs_runtime/hidden_trajectory/window.py +344 -0
  99. nvs_runtime-1.0.0/src/nvs_runtime/integrations/__init__.py +4 -0
  100. nvs_runtime-1.0.0/src/nvs_runtime/integrations/hekb_formal.py +169 -0
  101. nvs_runtime-1.0.0/src/nvs_runtime/integrations/hekb_vnext.py +302 -0
  102. nvs_runtime-1.0.0/src/nvs_runtime/metrics/__init__.py +3 -0
  103. nvs_runtime-1.0.0/src/nvs_runtime/metrics/collector.py +63 -0
  104. nvs_runtime-1.0.0/src/nvs_runtime/observability/__init__.py +3 -0
  105. nvs_runtime-1.0.0/src/nvs_runtime/observability/store.py +44 -0
  106. nvs_runtime-1.0.0/src/nvs_runtime/planner/__init__.py +3 -0
  107. nvs_runtime-1.0.0/src/nvs_runtime/planner/planner.py +158 -0
  108. nvs_runtime-1.0.0/src/nvs_runtime/providers/__init__.py +19 -0
  109. nvs_runtime-1.0.0/src/nvs_runtime/providers/base.py +43 -0
  110. nvs_runtime-1.0.0/src/nvs_runtime/providers/edge.py +165 -0
  111. nvs_runtime-1.0.0/src/nvs_runtime/providers/grpc.py +58 -0
  112. nvs_runtime-1.0.0/src/nvs_runtime/providers/hekb.py +77 -0
  113. nvs_runtime-1.0.0/src/nvs_runtime/providers/http.py +59 -0
  114. nvs_runtime-1.0.0/src/nvs_runtime/providers/kernel.py +67 -0
  115. nvs_runtime-1.0.0/src/nvs_runtime/providers/local.py +88 -0
  116. nvs_runtime-1.0.0/src/nvs_runtime/providers/mcp.py +84 -0
  117. nvs_runtime-1.0.0/src/nvs_runtime/providers/registry.py +56 -0
  118. nvs_runtime-1.0.0/src/nvs_runtime/providers/replay.py +138 -0
  119. nvs_runtime-1.0.0/src/nvs_runtime/py.typed +0 -0
  120. nvs_runtime-1.0.0/src/nvs_runtime/security/__init__.py +4 -0
  121. nvs_runtime-1.0.0/src/nvs_runtime/security/cbac.py +106 -0
  122. nvs_runtime-1.0.0/src/nvs_runtime/security/signer.py +20 -0
  123. nvs_runtime-1.0.0/src/nvs_runtime/session/__init__.py +4 -0
  124. nvs_runtime-1.0.0/src/nvs_runtime/session/checkpoint.py +108 -0
  125. nvs_runtime-1.0.0/src/nvs_runtime/session/manager.py +149 -0
  126. nvs_runtime-1.0.0/src/nvs_runtime/transport/__init__.py +3 -0
  127. nvs_runtime-1.0.0/src/nvs_runtime/transport/memory.py +36 -0
  128. nvs_runtime-1.0.0/tests/conftest.py +34 -0
  129. nvs_runtime-1.0.0/tests/edge_env.py +21 -0
  130. nvs_runtime-1.0.0/tests/fake_observe_adapter.py +61 -0
  131. nvs_runtime-1.0.0/tests/fixtures/hidden_trajectory/contract-facts-from-u4.json +102 -0
  132. nvs_runtime-1.0.0/tests/fixtures/hidden_trajectory/contract-v2-u4-base.json +182 -0
  133. nvs_runtime-1.0.0/tests/test_edge_env.py +49 -0
  134. nvs_runtime-1.0.0/tests/test_edge_provider.py +220 -0
  135. nvs_runtime-1.0.0/tests/test_events_observability.py +59 -0
  136. nvs_runtime-1.0.0/tests/test_gate_child_payload_kind.py +144 -0
  137. nvs_runtime-1.0.0/tests/test_hekb_vnext_store.py +181 -0
  138. nvs_runtime-1.0.0/tests/test_hekb_vnext_store_stubbed.py +194 -0
  139. nvs_runtime-1.0.0/tests/test_hidden_trajectory_archive.py +158 -0
  140. nvs_runtime-1.0.0/tests/test_hidden_trajectory_audit_r8.py +231 -0
  141. nvs_runtime-1.0.0/tests/test_hidden_trajectory_capture_extra.py +359 -0
  142. nvs_runtime-1.0.0/tests/test_hidden_trajectory_capture_map.py +1073 -0
  143. nvs_runtime-1.0.0/tests/test_hidden_trajectory_capture_record.py +211 -0
  144. nvs_runtime-1.0.0/tests/test_hidden_trajectory_contract_build.py +384 -0
  145. nvs_runtime-1.0.0/tests/test_hidden_trajectory_edge_observe.py +169 -0
  146. nvs_runtime-1.0.0/tests/test_hidden_trajectory_envelope.py +859 -0
  147. nvs_runtime-1.0.0/tests/test_hidden_trajectory_formal_writer.py +665 -0
  148. nvs_runtime-1.0.0/tests/test_hidden_trajectory_gate.py +563 -0
  149. nvs_runtime-1.0.0/tests/test_hidden_trajectory_gate_child_isolation.py +362 -0
  150. nvs_runtime-1.0.0/tests/test_hidden_trajectory_gate_client.py +849 -0
  151. nvs_runtime-1.0.0/tests/test_hidden_trajectory_item_set.py +234 -0
  152. nvs_runtime-1.0.0/tests/test_hidden_trajectory_k_measure.py +241 -0
  153. nvs_runtime-1.0.0/tests/test_hidden_trajectory_k_measure_entry_point.py +109 -0
  154. nvs_runtime-1.0.0/tests/test_hidden_trajectory_mm_e2e.py +588 -0
  155. nvs_runtime-1.0.0/tests/test_hidden_trajectory_observe_cli.py +867 -0
  156. nvs_runtime-1.0.0/tests/test_hidden_trajectory_payload.py +538 -0
  157. nvs_runtime-1.0.0/tests/test_hidden_trajectory_phase2_geometry.py +177 -0
  158. nvs_runtime-1.0.0/tests/test_hidden_trajectory_phase4_support.py +290 -0
  159. nvs_runtime-1.0.0/tests/test_hidden_trajectory_phase4b_support.py +90 -0
  160. nvs_runtime-1.0.0/tests/test_hidden_trajectory_readout_project.py +18 -0
  161. nvs_runtime-1.0.0/tests/test_hidden_trajectory_record_capture_extra.py +280 -0
  162. nvs_runtime-1.0.0/tests/test_hidden_trajectory_record_malformed.py +147 -0
  163. nvs_runtime-1.0.0/tests/test_hidden_trajectory_record_schema.py +497 -0
  164. nvs_runtime-1.0.0/tests/test_hidden_trajectory_replay_risk_control.py +18 -0
  165. nvs_runtime-1.0.0/tests/test_hidden_trajectory_rerun_k_checks.py +57 -0
  166. nvs_runtime-1.0.0/tests/test_hidden_trajectory_rerun_k_part.py +124 -0
  167. nvs_runtime-1.0.0/tests/test_hidden_trajectory_rsa_analysis.py +156 -0
  168. nvs_runtime-1.0.0/tests/test_hidden_trajectory_rsa_calibration.py +295 -0
  169. nvs_runtime-1.0.0/tests/test_hidden_trajectory_rsa_compare.py +370 -0
  170. nvs_runtime-1.0.0/tests/test_hidden_trajectory_rsa_readout.py +135 -0
  171. nvs_runtime-1.0.0/tests/test_hidden_trajectory_run.py +669 -0
  172. nvs_runtime-1.0.0/tests/test_hidden_trajectory_save.py +573 -0
  173. nvs_runtime-1.0.0/tests/test_hidden_trajectory_save_integration.py +183 -0
  174. nvs_runtime-1.0.0/tests/test_hidden_trajectory_token_temporal_e2e.py +349 -0
  175. nvs_runtime-1.0.0/tests/test_hidden_trajectory_window.py +381 -0
  176. nvs_runtime-1.0.0/tests/test_persistent_plan_session.py +56 -0
  177. nvs_runtime-1.0.0/tests/test_planner_graph.py +137 -0
  178. nvs_runtime-1.0.0/tests/test_providers.py +103 -0
  179. nvs_runtime-1.0.0/tests/test_release_workflow.py +75 -0
  180. nvs_runtime-1.0.0/tests/test_replay_provider.py +75 -0
  181. nvs_runtime-1.0.0/tests/test_runtime_api.py +113 -0
  182. nvs_runtime-1.0.0/tests/test_runtime_coverage.py +300 -0
  183. nvs_runtime-1.0.0/tests/test_security_governance.py +80 -0
  184. nvs_runtime-1.0.0/tests/test_session_checkpoint.py +82 -0
  185. nvs_runtime-1.0.0/tests/u65_support.py +198 -0
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: Bug report
3
+ about: Report a defect in NVS Runtime
4
+ title: "[Bug]: "
5
+ labels: bug
6
+ ---
7
+
8
+ ## Description
9
+
10
+ <!-- What went wrong? -->
11
+
12
+ ## Steps to reproduce
13
+
14
+ 1.
15
+ 2.
16
+ 3.
17
+
18
+ ## Expected
19
+
20
+ ## Actual
21
+
22
+ ## Environment
23
+
24
+ - OS:
25
+ - Python:
26
+ - `nvs-runtime` version / commit:
27
+
28
+ ## Additional context
29
+
30
+ <!-- Minimal repro, logs, related PRs -->
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: true
2
+ contact_links:
3
+ - name: Documentation
4
+ url: https://github.com/GemminAI/nvs-runtime/blob/main/docs/architecture.md
5
+ about: Architecture and guides for NVS Runtime
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: Feature request
3
+ about: Propose an enhancement to NVS Runtime
4
+ title: "[Feature]: "
5
+ labels: enhancement
6
+ ---
7
+
8
+ ## Problem
9
+
10
+ <!-- What problem should this solve? -->
11
+
12
+ ## Proposal
13
+
14
+ <!-- Prefer Runtime API stability. Note if a new provider is enough. -->
15
+
16
+ ## Alternatives
17
+
18
+ ## Additional context
@@ -0,0 +1,23 @@
1
+ ## Summary
2
+
3
+ <!-- What changed and why -->
4
+
5
+ ## Type of change
6
+
7
+ - [ ] Bug fix
8
+ - [ ] New provider / adapter
9
+ - [ ] Documentation
10
+ - [ ] Tests
11
+ - [ ] Examples
12
+ - [ ] Other (describe)
13
+
14
+ ## Checklist
15
+
16
+ - [ ] Tests added or updated (`pytest --cov=nvs_runtime` passes)
17
+ - [ ] Docs updated if user-facing behavior changed
18
+ - [ ] Examples updated when the demonstrated flow changed
19
+ - [ ] Backwards compatibility preserved for the Runtime API
20
+ (`discover` / `plan` / `invoke` / `observe` / `session` / `checkpoint` / `metrics`)
21
+ — or breaking changes are called out explicitly
22
+ - [ ] Provider-specific code stays under `providers/`
23
+ - [ ] Offline / deterministic (no API keys, no live network required)
@@ -0,0 +1,86 @@
1
+ # NVS Runtime v1.0.0
2
+
3
+ **The Runtime for Layer-Oriented AI Systems**
4
+
5
+ First public release of the provider-agnostic NVS Runtime.
6
+
7
+ - **Repository:** https://github.com/GemminAI/nvs-runtime
8
+ - **License:** Apache-2.0
9
+ - **Python:** ≥3.11
10
+
11
+ ## Overview
12
+
13
+ NVS Runtime is a clean-room execution substrate for layer-oriented AI systems.
14
+
15
+ Applications use one stable Runtime API.
16
+ Providers (MCP, HTTP, gRPC, Local, Kernel, HEKB, and future adapters) plug in underneath.
17
+
18
+ This release is **not** an MCP runtime, LLM framework, or RAG framework.
19
+
20
+ ## What's new
21
+
22
+ - Stable Runtime API: `discover` · `plan` · `invoke` · `observe` · `session` · `checkpoint` · `metrics`
23
+ - Capability Graph and graph-search Planner (no hardcoded pipelines)
24
+ - Sessions, checkpoints, governance quotas, event bus, metrics, observability
25
+ - Dependency-injected composition root (`build_runtime`)
26
+ - Offline, deterministic test suite (no API keys)
27
+ - MCP isolated under `providers/` — not central to the runtime
28
+
29
+ ## Install
30
+
31
+ ```bash
32
+ pip install -e ".[dev]"
33
+ pytest --cov=nvs_runtime
34
+ python examples/plan_and_invoke.py
35
+ ```
36
+
37
+ ## Runtime API
38
+
39
+ ```python
40
+ runtime = build_runtime()
41
+ runtime.discover()
42
+ runtime.plan(...)
43
+ await runtime.invoke(...)
44
+ runtime.observe(...)
45
+ runtime.session(...)
46
+ runtime.checkpoint(...)
47
+ runtime.metrics()
48
+ await runtime.shutdown()
49
+ ```
50
+
51
+ ## Providers
52
+
53
+ | Provider | Notes |
54
+ |----------|-------|
55
+ | Local | Default deterministic pipeline capabilities |
56
+ | HTTP | Offline stub or injectable transport |
57
+ | gRPC | Offline stub or injectable transport |
58
+ | MCP | Optional; tool projection helper included |
59
+ | Kernel | Optional; returns `DEFERRED` when unavailable |
60
+ | HEKB | Knowledge provider via `ObjectStore` protocol |
61
+
62
+ ## Architecture
63
+
64
+ ```
65
+ Application → NVS Runtime → Providers
66
+ ```
67
+
68
+ Core: Planner, Capability Graph, Session Manager, Governance, Metrics, Observability, Event Bus, Transport, Provider Registry.
69
+
70
+ HEXT is consumed only through semantic object / store interfaces.
71
+ Kernel and HEKB integrate only through providers and adapters.
72
+
73
+ ## Known limitations
74
+
75
+ - Distributed remote placement is minimal
76
+ - HTTP / gRPC / MCP default paths are offline stubs unless wired with transports or SDKs
77
+ - Kernel does not reimplement geometry locally when unavailable
78
+ - Metrics and observability are in-process only (no Prometheus exporter yet)
79
+
80
+ ## Roadmap
81
+
82
+ See [ROADMAP.md](../ROADMAP.md) for v1.1 / v1.2 / v2.0 milestones.
83
+
84
+ ## Citation
85
+
86
+ See [CITATION.cff](../CITATION.cff).
@@ -0,0 +1,38 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main, "cursor/**"]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ python-version: ["3.12", "3.13", "3.14"]
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - name: Set up Python ${{ matrix.python-version }}
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: ${{ matrix.python-version }}
22
+ - name: Install nvs-observation (not on PyPI yet)
23
+ run: pip install "git+https://github.com/GemminAI/nvs-observation.git"
24
+ - name: Install
25
+ run: pip install -e ".[dev,replay]"
26
+ - name: Lint
27
+ run: ruff check src tests
28
+ - name: Typecheck
29
+ run: mypy src
30
+ # The public CI has neither the NVS-Kernel edge package nor sensos, so coverage is reported
31
+ # here, not gated. The gate (fail_under = 90, pyproject.toml) is required in a full
32
+ # environment where the kernel and sensos are installed.
33
+ - name: Test
34
+ run: pytest --cov=nvs_runtime --cov-report=term-missing --cov-fail-under=0
35
+ - name: Examples
36
+ run: |
37
+ python examples/hello_runtime.py
38
+ python examples/plan_and_invoke.py
@@ -0,0 +1,74 @@
1
+ # Manual release to TestPyPI or PyPI with Trusted Publishing (OIDC): no stored credentials
2
+ # are used. Run it by hand (workflow_dispatch) from main; the publish jobs wait for the
3
+ # approval rules of their GitHub environment (testpypi, pypi).
4
+ name: Release
5
+
6
+ on:
7
+ workflow_dispatch:
8
+ inputs:
9
+ target:
10
+ description: "Where to publish"
11
+ type: choice
12
+ options:
13
+ - testpypi
14
+ - pypi
15
+ required: true
16
+
17
+ permissions: {}
18
+
19
+ jobs:
20
+ build:
21
+ if: github.ref == 'refs/heads/main'
22
+ runs-on: ubuntu-latest
23
+ permissions:
24
+ contents: read
25
+ steps:
26
+ - uses: actions/checkout@v4
27
+ - name: Set up Python 3.12
28
+ uses: actions/setup-python@v5
29
+ with:
30
+ python-version: "3.12"
31
+ - name: Install build tools
32
+ run: python -m pip install build twine
33
+ - name: Build
34
+ run: python -m build
35
+ - name: Check the distributions
36
+ run: twine check dist/*
37
+ - name: SHA-256 of the distributions
38
+ run: sha256sum dist/*
39
+ - uses: actions/upload-artifact@v4
40
+ with:
41
+ name: dist
42
+ path: dist/
43
+
44
+ publish-testpypi:
45
+ if: github.ref == 'refs/heads/main' && inputs.target == 'testpypi'
46
+ needs: build
47
+ runs-on: ubuntu-latest
48
+ environment: testpypi
49
+ permissions:
50
+ id-token: write
51
+ steps:
52
+ - uses: actions/download-artifact@v4
53
+ with:
54
+ name: dist
55
+ path: dist/
56
+ - name: Publish to TestPyPI
57
+ uses: pypa/gh-action-pypi-publish@release/v1
58
+ with:
59
+ repository-url: https://test.pypi.org/legacy/
60
+
61
+ publish-pypi:
62
+ if: github.ref == 'refs/heads/main' && inputs.target == 'pypi'
63
+ needs: build
64
+ runs-on: ubuntu-latest
65
+ environment: pypi
66
+ permissions:
67
+ id-token: write
68
+ steps:
69
+ - uses: actions/download-artifact@v4
70
+ with:
71
+ name: dist
72
+ path: dist/
73
+ - name: Publish to PyPI
74
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,16 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ .eggs/
5
+ dist/
6
+ build/
7
+ .venv/
8
+ venv/
9
+ .env
10
+ .coverage
11
+ htmlcov/
12
+ .pytest_cache/
13
+ .ruff_cache/
14
+ .mypy_cache/
15
+ *.swp
16
+ .DS_Store
@@ -0,0 +1,28 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use NVS Runtime, please cite it as below."
3
+ title: "NVS Runtime"
4
+ type: software
5
+ version: 1.0.0
6
+ license: Apache-2.0
7
+ date-released: "2026-07-26"
8
+ url: "https://github.com/GemminAI/nvs-runtime"
9
+ repository-code: "https://github.com/GemminAI/nvs-runtime"
10
+ abstract: >-
11
+ NVS Runtime is a provider-agnostic execution substrate for
12
+ layer-oriented AI systems. Applications use a stable Runtime API;
13
+ heterogeneous providers (MCP, HTTP, gRPC, Local, Kernel, HEKB) are
14
+ orchestrated beneath it.
15
+ authors:
16
+ - name: "GemminAI"
17
+ website: "https://github.com/GemminAI"
18
+ keywords:
19
+ - runtime
20
+ - ai-runtime
21
+ - agent
22
+ - orchestration
23
+ - mcp
24
+ - llm
25
+ - python
26
+ - hext
27
+ - distributed-systems
28
+ - middleware
@@ -0,0 +1,31 @@
1
+ # Code of Conduct
2
+
3
+ ## Our pledge
4
+
5
+ We pledge to make participation in the NVS Runtime community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ ## Our standards
8
+
9
+ Examples of behavior that contributes to a positive environment:
10
+
11
+ - Demonstrating empathy and respect
12
+ - Giving and accepting constructive feedback
13
+ - Focusing on what is best for the community
14
+ - Showing courtesy in technical disagreement
15
+
16
+ Unacceptable behavior includes:
17
+
18
+ - Harassment, trolling, or personal attacks
19
+ - Sexualized language or imagery
20
+ - Publishing others’ private information without permission
21
+ - Other conduct that could reasonably be considered inappropriate in a professional setting
22
+
23
+ ## Enforcement
24
+
25
+ Report unacceptable behavior to the maintainers via GitHub issues labeled `conduct`, or through the repository’s security/contact channels listed in [SECURITY.md](SECURITY.md) and [SUPPORT.md](SUPPORT.md).
26
+
27
+ Maintainers will review and respond as appropriate. They may remove, edit, or reject contributions that violate this Code of Conduct.
28
+
29
+ ## Attribution
30
+
31
+ This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1.
@@ -0,0 +1,77 @@
1
+ # Contributing to NVS Runtime
2
+
3
+ Thank you for contributing. Please also read the detailed
4
+ [Contribution Guide](docs/contribution-guide.md) and the
5
+ [Code of Conduct](CODE_OF_CONDUCT.md).
6
+
7
+ ## Development setup
8
+
9
+ ```bash
10
+ git clone https://github.com/GemminAI/nvs-runtime.git
11
+ cd nvs-runtime
12
+ python -m venv .venv
13
+ source .venv/bin/activate # Windows: .venv\Scripts\activate
14
+ # nvs-observation is not on PyPI yet, so install it from GitHub first
15
+ pip install "git+https://github.com/GemminAI/nvs-observation.git"
16
+ pip install -e ".[dev]"
17
+ ```
18
+
19
+ ## Running tests
20
+
21
+ ```bash
22
+ pytest --cov=nvs_runtime --cov-report=term-missing
23
+ ```
24
+
25
+ Examples (offline, no API keys):
26
+
27
+ ```bash
28
+ python examples/hello_runtime.py
29
+ python examples/plan_and_invoke.py
30
+ ```
31
+
32
+ ## Formatting and lint
33
+
34
+ ```bash
35
+ ruff check src tests
36
+ ruff format src tests # optional; keep diffs focused
37
+ ```
38
+
39
+ Target: Python 3.12+, typed public APIs, protocols over deep inheritance.
40
+
41
+ ## What belongs here
42
+
43
+ Changes to the runtime, the providers, the capture path and the readers of stored results belong in
44
+ this repository. K measurement, the K checks, experiment drivers and their examples belong to the
45
+ Developer Tools, not here. A test that needs a measured K reads the stored data in
46
+ `tests/fixtures/measured_k` (see its `manifest.json`); do not edit those files by hand.
47
+
48
+ ## Commit style
49
+
50
+ - Prefer short, imperative subject lines (≤ ~72 chars)
51
+ - Explain *why* in the body when the change is non-obvious
52
+ - Keep commits focused; avoid mixing docs-only and large code changes
53
+
54
+ Examples:
55
+
56
+ ```
57
+ Add HttpProvider offline transport contract test
58
+ Clarify Runtime API session lifecycle in docs
59
+ ```
60
+
61
+ ## Pull request workflow
62
+
63
+ 1. Open an issue for non-trivial changes
64
+ 2. Branch from `main` (or the active release branch)
65
+ 3. Keep the Runtime API stable unless the issue explicitly changes it
66
+ 4. Put provider-specific code under `providers/`
67
+ 5. Add or update offline deterministic tests
68
+ 6. Update docs / examples when user-facing behavior changes
69
+ 7. Ensure `pytest --cov=nvs_runtime` and `ruff check` pass
70
+ 8. Fill out the PR template checklist
71
+
72
+ ## Principles
73
+
74
+ 1. **Runtime first** — do not privilege any provider
75
+ 2. **Stable API** — `discover` / `plan` / `invoke` / `observe` / `session` / `checkpoint` / `metrics`
76
+ 3. **Composition** — DI via `build_runtime()`, no module singletons
77
+ 4. **Deterministic tests** — offline, no secrets
@@ -0,0 +1,71 @@
1
+ # Governance
2
+
3
+ NVS Runtime is governed lightly so the Runtime API stays stable while the
4
+ provider ecosystem can evolve.
5
+
6
+ ## Project Vision
7
+
8
+ NVS Runtime is a **provider-agnostic execution substrate** for layer-oriented
9
+ AI systems.
10
+
11
+ - Applications depend on the Runtime API, never on a specific provider.
12
+ - MCP, HTTP, gRPC, Local, Kernel, HEKB, and future adapters are peers.
13
+ - The runtime must remain usable offline and testable without external APIs.
14
+ - We optimize for long-term API stability over short-term feature density.
15
+
16
+ ## Decision Process
17
+
18
+ 1. **Routine changes** (docs, tests, bug fixes, non-breaking provider work)
19
+ → discussed in issues/PRs; merged by a maintainer after review.
20
+ 2. **User-facing or architectural changes**
21
+ → open an issue first; prefer consensus among active maintainers.
22
+ 3. **Breaking Runtime API changes**
23
+ → require an RFC and an explicit release note; reserved for major versions
24
+ unless a security fix demands otherwise.
25
+
26
+ When consensus is unclear, maintainers decide. Rationale should be recorded in
27
+ the issue, PR, or RFC.
28
+
29
+ ## RFC Process
30
+
31
+ Use an RFC for proposals that affect:
32
+
33
+ - the stable Runtime API (`discover` / `plan` / `invoke` / `observe` /
34
+ `session` / `checkpoint` / `metrics`)
35
+ - core architecture (planner, capability graph, governance, transport)
36
+ - cross-cutting provider contracts
37
+
38
+ Suggested flow:
39
+
40
+ 1. Open a Discussion (category **RFC**) or an issue labeled `rfc`.
41
+ 2. Describe problem, proposal, alternatives, and compatibility impact.
42
+ 3. Allow a short comment period (typically ≥7 days for non-urgent RFCs).
43
+ 4. A maintainer accepts, defers, or declines with a brief public note.
44
+
45
+ Small provider additions do **not** need an RFC if they preserve contracts.
46
+
47
+ ## Maintainers
48
+
49
+ | Role | Responsibility |
50
+ |------|----------------|
51
+ | Maintainers | Merge rights, releases, security coordination, RFC decisions |
52
+ | Contributors | Patches, docs, providers, reviews via pull requests |
53
+
54
+ Current maintainers are listed in the GitHub repository settings and may be
55
+ mirrored in `CODEOWNERS` when that file is introduced.
56
+
57
+ Maintainers are expected to follow the [Code of Conduct](CODE_OF_CONDUCT.md)
58
+ and keep the Runtime API trustworthy for downstream users.
59
+
60
+ ## Release Policy
61
+
62
+ | Channel | Policy |
63
+ |---------|--------|
64
+ | **SemVer** | `MAJOR.MINOR.PATCH` — Runtime API breaks require `MAJOR` |
65
+ | **v1.x** | Additive, backwards-compatible changes preferred |
66
+ | **Patches** | Bug fixes and security fixes; no intentional API breaks |
67
+ | **Tags** | Git tags `vX.Y.Z` with GitHub Releases and notes |
68
+ | **Security** | Coordinated disclosure per [SECURITY.md](SECURITY.md) |
69
+
70
+ Pre-release tags (e.g. `v1.1.0-rc.1`) may be used for soak testing.
71
+ Experimental provider features should not break the stable Runtime API.