hypermind 0.11.0__py3-none-any.whl

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 (181) hide show
  1. hmctl/__init__.py +7 -0
  2. hmctl/cli.py +947 -0
  3. hypermind/__init__.py +208 -0
  4. hypermind/_deprecations.py +108 -0
  5. hypermind/agent.py +2896 -0
  6. hypermind/agent_card.py +127 -0
  7. hypermind/api/__init__.py +32 -0
  8. hypermind/api/app.py +686 -0
  9. hypermind/capability.py +923 -0
  10. hypermind/consult.py +493 -0
  11. hypermind/consult_bias.py +112 -0
  12. hypermind/contract_net.py +219 -0
  13. hypermind/crypto/__init__.py +21 -0
  14. hypermind/crypto/cose_encrypt.py +126 -0
  15. hypermind/crypto/dkg.py +246 -0
  16. hypermind/crypto/domain.py +59 -0
  17. hypermind/crypto/frost.py +771 -0
  18. hypermind/crypto/hashing.py +38 -0
  19. hypermind/crypto/hlc.py +163 -0
  20. hypermind/crypto/hpke.py +277 -0
  21. hypermind/crypto/kms.py +196 -0
  22. hypermind/crypto/kms_backends/__init__.py +56 -0
  23. hypermind/crypto/kms_backends/aws.py +128 -0
  24. hypermind/crypto/kms_backends/azure.py +114 -0
  25. hypermind/crypto/kms_backends/gcp.py +97 -0
  26. hypermind/crypto/kms_backends/vault.py +120 -0
  27. hypermind/crypto/namespace_root.py +204 -0
  28. hypermind/crypto/pq.py +152 -0
  29. hypermind/crypto/room_epoch.py +97 -0
  30. hypermind/crypto/signing.py +245 -0
  31. hypermind/deliberation.py +355 -0
  32. hypermind/did_web.py +256 -0
  33. hypermind/dispute.py +858 -0
  34. hypermind/errors.py +218 -0
  35. hypermind/eval/__init__.py +49 -0
  36. hypermind/eval/calibration.py +307 -0
  37. hypermind/eval/comparison.py +251 -0
  38. hypermind/eval/replay.py +202 -0
  39. hypermind/eval/swarm_iq.py +718 -0
  40. hypermind/knowledge/__init__.py +17 -0
  41. hypermind/knowledge/citation_graph.py +141 -0
  42. hypermind/knowledge/correlated_agreement.py +167 -0
  43. hypermind/knowledge/embedding_registry.py +115 -0
  44. hypermind/knowledge/kernel_store.py +197 -0
  45. hypermind/knowledge/rekor.py +173 -0
  46. hypermind/knowledge/reputation.py +364 -0
  47. hypermind/knowledge/swarm_memory.py +523 -0
  48. hypermind/knowledge/transparency.py +409 -0
  49. hypermind/mcp/__init__.py +60 -0
  50. hypermind/mcp/bridge.py +151 -0
  51. hypermind/mcp/client.py +142 -0
  52. hypermind/mcp/provenance.py +214 -0
  53. hypermind/mcp/relata_tools.py +152 -0
  54. hypermind/mcp/server.py +248 -0
  55. hypermind/mcp/transport.py +206 -0
  56. hypermind/mind/__init__.py +150 -0
  57. hypermind/mind/active.py +234 -0
  58. hypermind/mind/belief.py +369 -0
  59. hypermind/mind/deliberator.py +625 -0
  60. hypermind/mind/diversity.py +144 -0
  61. hypermind/mind/evolve.py +184 -0
  62. hypermind/mind/federation.py +154 -0
  63. hypermind/mind/goals.py +117 -0
  64. hypermind/mind/integration.py +190 -0
  65. hypermind/mind/mediator.py +74 -0
  66. hypermind/mind/memory_store.py +129 -0
  67. hypermind/mind/policy.py +307 -0
  68. hypermind/mind/records.py +260 -0
  69. hypermind/mind/roles.py +190 -0
  70. hypermind/mind/sybil_guard.py +41 -0
  71. hypermind/mind/world_model.py +166 -0
  72. hypermind/namespace.py +515 -0
  73. hypermind/namespace_policy.py +254 -0
  74. hypermind/observability/__init__.py +25 -0
  75. hypermind/observability/asgi.py +214 -0
  76. hypermind/observability/cost.py +277 -0
  77. hypermind/observability/otel_export.py +200 -0
  78. hypermind/observability/recorder.py +344 -0
  79. hypermind/observability/swarm_trace.py +438 -0
  80. hypermind/pin_policy.py +116 -0
  81. hypermind/py.typed +0 -0
  82. hypermind/responders/__init__.py +87 -0
  83. hypermind/responders/anthropic.py +159 -0
  84. hypermind/responders/base.py +162 -0
  85. hypermind/responders/openai.py +199 -0
  86. hypermind/responders/router.py +254 -0
  87. hypermind/responders/structured.py +287 -0
  88. hypermind/responders/tools.py +444 -0
  89. hypermind/revocation.py +270 -0
  90. hypermind/rule_ids.py +135 -0
  91. hypermind/schemas/encrypted_statement.cddl +28 -0
  92. hypermind/schemas/namespace_accept.cddl +20 -0
  93. hypermind/schemas/namespace_create.cddl +25 -0
  94. hypermind/schemas/namespace_founding_attest.cddl +30 -0
  95. hypermind/schemas/namespace_invite.cddl +22 -0
  96. hypermind/schemas/wire-v0.1.cddl +73 -0
  97. hypermind/simlab/__init__.py +15 -0
  98. hypermind/simlab/_persona_registry.py +93 -0
  99. hypermind/simlab/_scenario_impl.py +2778 -0
  100. hypermind/simlab/app.py +2538 -0
  101. hypermind/simlab/backends/__init__.py +27 -0
  102. hypermind/simlab/backends/anchor.py +88 -0
  103. hypermind/simlab/backends/local.py +32 -0
  104. hypermind/simlab/backends/server.py +79 -0
  105. hypermind/simlab/cli_command.py +108 -0
  106. hypermind/simlab/config.py +106 -0
  107. hypermind/simlab/deployment.py +26 -0
  108. hypermind/simlab/knowledge.py +716 -0
  109. hypermind/simlab/learning.py +295 -0
  110. hypermind/simlab/modes/__init__.py +115 -0
  111. hypermind/simlab/modes/_eval_real_llm.py +373 -0
  112. hypermind/simlab/modes/aar.py +611 -0
  113. hypermind/simlab/modes/backtest.py +610 -0
  114. hypermind/simlab/modes/binary_forecast.py +69 -0
  115. hypermind/simlab/modes/conformance.py +1869 -0
  116. hypermind/simlab/modes/evaluation.py +2271 -0
  117. hypermind/simlab/modes/governance.py +648 -0
  118. hypermind/simlab/modes/redteam.py +534 -0
  119. hypermind/simlab/modes/tabletop.py +797 -0
  120. hypermind/simlab/modes/tournament.py +448 -0
  121. hypermind/simlab/modes/whatif.py +523 -0
  122. hypermind/simlab/namespace.py +125 -0
  123. hypermind/simlab/personas.py +477 -0
  124. hypermind/simlab/prompt_generator.py +172 -0
  125. hypermind/simlab/question_sets/geopolitics_q20.json +122 -0
  126. hypermind/simlab/question_sets/governance_q5.json +67 -0
  127. hypermind/simlab/question_sets/msft_outlook_q10.json +62 -0
  128. hypermind/simlab/question_sets/whatif_q3.json +38 -0
  129. hypermind/simlab/registry.py +325 -0
  130. hypermind/simlab/runner.py +239 -0
  131. hypermind/simlab/scenario.py +147 -0
  132. hypermind/simlab/swarms.py +180 -0
  133. hypermind/simlab/tool_handlers/__init__.py +4 -0
  134. hypermind/simlab/tool_handlers/alpha_vantage.py +39 -0
  135. hypermind/simlab/tool_handlers/brave.py +46 -0
  136. hypermind/simlab/tool_handlers/newsapi.py +50 -0
  137. hypermind/simlab/tool_handlers/openweather.py +46 -0
  138. hypermind/simlab/tool_handlers/pinecone.py +52 -0
  139. hypermind/simlab/tool_handlers/qdrant.py +57 -0
  140. hypermind/simlab/tool_handlers/query_knowledge_base.py +21 -0
  141. hypermind/simlab/tool_handlers/relata_recall.py +61 -0
  142. hypermind/simlab/tool_handlers/retrieve_document.py +21 -0
  143. hypermind/simlab/tool_handlers/serper.py +46 -0
  144. hypermind/simlab/tool_handlers/tavily.py +53 -0
  145. hypermind/simlab/tool_handlers/weaviate.py +65 -0
  146. hypermind/simlab/tool_handlers/wikipedia.py +64 -0
  147. hypermind/simlab/tool_handlers/wolfram.py +48 -0
  148. hypermind/simlab/tool_handlers/yahoo_finance.py +49 -0
  149. hypermind/simlab/tool_registry.py +568 -0
  150. hypermind/simlab/topic_adapter.py +338 -0
  151. hypermind/simlab/topic_questions.py +259 -0
  152. hypermind/storage/__init__.py +69 -0
  153. hypermind/storage/backend.py +71 -0
  154. hypermind/storage/relata.py +245 -0
  155. hypermind/storage/sqlite.py +258 -0
  156. hypermind/sync.py +191 -0
  157. hypermind/tal.py +175 -0
  158. hypermind/tasks.py +334 -0
  159. hypermind/testing.py +16 -0
  160. hypermind/tools/__init__.py +32 -0
  161. hypermind/tools/registry.py +61 -0
  162. hypermind/transport/__init__.py +22 -0
  163. hypermind/transport/anti_entropy.py +708 -0
  164. hypermind/transport/bus.py +206 -0
  165. hypermind/transport/knows_delta.py +204 -0
  166. hypermind/transport/libp2p.py +298 -0
  167. hypermind/transport/placement.py +58 -0
  168. hypermind/transport/tcp.py +797 -0
  169. hypermind/transport/tls_profile.py +417 -0
  170. hypermind/types.py +59 -0
  171. hypermind/uncertainty.py +222 -0
  172. hypermind/wire.py +897 -0
  173. hypermind/workflow/__init__.py +72 -0
  174. hypermind/workflow/engine.py +655 -0
  175. hypermind/workflow/plan.py +182 -0
  176. hypermind/workflow/repair.py +203 -0
  177. hypermind-0.11.0.dist-info/METADATA +524 -0
  178. hypermind-0.11.0.dist-info/RECORD +181 -0
  179. hypermind-0.11.0.dist-info/WHEEL +4 -0
  180. hypermind-0.11.0.dist-info/entry_points.txt +2 -0
  181. hypermind-0.11.0.dist-info/licenses/LICENSE +201 -0
hypermind/testing.py ADDED
@@ -0,0 +1,16 @@
1
+ """Test-only utilities — not part of the production surface.
2
+
3
+ These helpers exist to make integration tests of HyperMind-backed
4
+ applications easy. They are guaranteed-stable for testing but should
5
+ not appear in production code paths.
6
+
7
+ As of v0.5 (ROADMAP §0.5.4) ``testbed_cohort`` is canonically rooted
8
+ here. The top-level re-export (``hypermind.testbed_cohort``) is now a
9
+ deprecation shim that fires ``PendingDeprecationWarning`` on attribute
10
+ lookup and forwards to this module. The shim escalates to
11
+ ``DeprecationWarning`` in v0.7 and is scheduled for removal in v1.0.
12
+ """
13
+
14
+ from hypermind.agent import HyperMindAgent, testbed_cohort
15
+
16
+ __all__ = ["HyperMindAgent", "testbed_cohort"]
@@ -0,0 +1,32 @@
1
+ """First-class HyperMind tool registry — promoted from
2
+ :mod:`hypermind.simlab.tool_registry` to a public API surface (T1-02).
3
+
4
+ The simlab module continues to own the canonical catalog and on-disk
5
+ activation lifecycle; this package re-exports the relevant types and
6
+ adds an MCP-server view helper (:func:`mcp_view`) used by
7
+ :class:`hypermind.mcp.MCPServer` to publish a tool list.
8
+ """
9
+
10
+ from hypermind.tools.registry import (
11
+ TOOL_CATALOG,
12
+ ActivatedTool,
13
+ ToolDef,
14
+ get_activated_tool,
15
+ get_tool_def,
16
+ list_active_tool_slugs,
17
+ list_catalog,
18
+ load_activated_tools,
19
+ mcp_view,
20
+ )
21
+
22
+ __all__ = [
23
+ "TOOL_CATALOG",
24
+ "ActivatedTool",
25
+ "ToolDef",
26
+ "get_activated_tool",
27
+ "get_tool_def",
28
+ "list_active_tool_slugs",
29
+ "list_catalog",
30
+ "load_activated_tools",
31
+ "mcp_view",
32
+ ]
@@ -0,0 +1,61 @@
1
+ """Re-exports of the canonical tool registry plus an MCP view helper.
2
+
3
+ The original implementation lives in :mod:`hypermind.simlab.tool_registry`
4
+ (SimLab needs disk persistence for activation records); v0.10.1 promotes
5
+ the in-memory catalog and dataclasses to a first-class API under
6
+ ``hypermind.tools``. The simlab module is unchanged so its callers
7
+ keep working.
8
+ """
9
+
10
+ from __future__ import annotations
11
+
12
+ from typing import Any
13
+
14
+ from hypermind.simlab.tool_registry import (
15
+ TOOL_CATALOG,
16
+ ActivatedTool,
17
+ ToolDef,
18
+ get_activated_tool,
19
+ get_tool_def,
20
+ list_active_tool_slugs,
21
+ list_catalog,
22
+ load_activated_tools,
23
+ )
24
+
25
+ __all__ = [
26
+ "TOOL_CATALOG",
27
+ "ActivatedTool",
28
+ "ToolDef",
29
+ "get_activated_tool",
30
+ "get_tool_def",
31
+ "list_active_tool_slugs",
32
+ "list_catalog",
33
+ "load_activated_tools",
34
+ "mcp_view",
35
+ ]
36
+
37
+
38
+ def mcp_view(
39
+ catalog: dict[str, ToolDef] | None = None,
40
+ *,
41
+ only_slugs: list[str] | None = None,
42
+ ) -> list[dict[str, Any]]:
43
+ """Render a tool registry as an MCP ``tools/list`` payload.
44
+
45
+ The returned list of dicts is shaped per the MCP v1.0 schema
46
+ (``name`` / ``description`` / ``inputSchema``). When ``only_slugs``
47
+ is supplied, only those tools are emitted (in the requested order).
48
+ """
49
+ cat = catalog if catalog is not None else TOOL_CATALOG
50
+ if only_slugs is not None:
51
+ items = [cat[s] for s in only_slugs if s in cat]
52
+ else:
53
+ items = list(cat.values())
54
+ return [
55
+ {
56
+ "name": t.slug,
57
+ "description": t.description,
58
+ "inputSchema": t.parameters_schema,
59
+ }
60
+ for t in items
61
+ ]
@@ -0,0 +1,22 @@
1
+ """Transport layer.
2
+
3
+ Two production-grade implementations of `GossipBus`:
4
+ - `InProcessBus`: zero-network for unit tests and CI.
5
+ - `TCPGossipBus`: real asyncio TCP gossipsub-shape with identity-bound
6
+ handshake and topic fan-out.
7
+ """
8
+
9
+ from hypermind.transport.anti_entropy import AESession, BloomFilter, build_filter, diff
10
+ from hypermind.transport.bus import GossipBus, InProcessBus, Subscription
11
+ from hypermind.transport.tcp import TCPGossipBus
12
+
13
+ __all__ = [
14
+ "AESession",
15
+ "BloomFilter",
16
+ "GossipBus",
17
+ "InProcessBus",
18
+ "Subscription",
19
+ "TCPGossipBus",
20
+ "build_filter",
21
+ "diff",
22
+ ]