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.
- hmctl/__init__.py +7 -0
- hmctl/cli.py +947 -0
- hypermind/__init__.py +208 -0
- hypermind/_deprecations.py +108 -0
- hypermind/agent.py +2896 -0
- hypermind/agent_card.py +127 -0
- hypermind/api/__init__.py +32 -0
- hypermind/api/app.py +686 -0
- hypermind/capability.py +923 -0
- hypermind/consult.py +493 -0
- hypermind/consult_bias.py +112 -0
- hypermind/contract_net.py +219 -0
- hypermind/crypto/__init__.py +21 -0
- hypermind/crypto/cose_encrypt.py +126 -0
- hypermind/crypto/dkg.py +246 -0
- hypermind/crypto/domain.py +59 -0
- hypermind/crypto/frost.py +771 -0
- hypermind/crypto/hashing.py +38 -0
- hypermind/crypto/hlc.py +163 -0
- hypermind/crypto/hpke.py +277 -0
- hypermind/crypto/kms.py +196 -0
- hypermind/crypto/kms_backends/__init__.py +56 -0
- hypermind/crypto/kms_backends/aws.py +128 -0
- hypermind/crypto/kms_backends/azure.py +114 -0
- hypermind/crypto/kms_backends/gcp.py +97 -0
- hypermind/crypto/kms_backends/vault.py +120 -0
- hypermind/crypto/namespace_root.py +204 -0
- hypermind/crypto/pq.py +152 -0
- hypermind/crypto/room_epoch.py +97 -0
- hypermind/crypto/signing.py +245 -0
- hypermind/deliberation.py +355 -0
- hypermind/did_web.py +256 -0
- hypermind/dispute.py +858 -0
- hypermind/errors.py +218 -0
- hypermind/eval/__init__.py +49 -0
- hypermind/eval/calibration.py +307 -0
- hypermind/eval/comparison.py +251 -0
- hypermind/eval/replay.py +202 -0
- hypermind/eval/swarm_iq.py +718 -0
- hypermind/knowledge/__init__.py +17 -0
- hypermind/knowledge/citation_graph.py +141 -0
- hypermind/knowledge/correlated_agreement.py +167 -0
- hypermind/knowledge/embedding_registry.py +115 -0
- hypermind/knowledge/kernel_store.py +197 -0
- hypermind/knowledge/rekor.py +173 -0
- hypermind/knowledge/reputation.py +364 -0
- hypermind/knowledge/swarm_memory.py +523 -0
- hypermind/knowledge/transparency.py +409 -0
- hypermind/mcp/__init__.py +60 -0
- hypermind/mcp/bridge.py +151 -0
- hypermind/mcp/client.py +142 -0
- hypermind/mcp/provenance.py +214 -0
- hypermind/mcp/relata_tools.py +152 -0
- hypermind/mcp/server.py +248 -0
- hypermind/mcp/transport.py +206 -0
- hypermind/mind/__init__.py +150 -0
- hypermind/mind/active.py +234 -0
- hypermind/mind/belief.py +369 -0
- hypermind/mind/deliberator.py +625 -0
- hypermind/mind/diversity.py +144 -0
- hypermind/mind/evolve.py +184 -0
- hypermind/mind/federation.py +154 -0
- hypermind/mind/goals.py +117 -0
- hypermind/mind/integration.py +190 -0
- hypermind/mind/mediator.py +74 -0
- hypermind/mind/memory_store.py +129 -0
- hypermind/mind/policy.py +307 -0
- hypermind/mind/records.py +260 -0
- hypermind/mind/roles.py +190 -0
- hypermind/mind/sybil_guard.py +41 -0
- hypermind/mind/world_model.py +166 -0
- hypermind/namespace.py +515 -0
- hypermind/namespace_policy.py +254 -0
- hypermind/observability/__init__.py +25 -0
- hypermind/observability/asgi.py +214 -0
- hypermind/observability/cost.py +277 -0
- hypermind/observability/otel_export.py +200 -0
- hypermind/observability/recorder.py +344 -0
- hypermind/observability/swarm_trace.py +438 -0
- hypermind/pin_policy.py +116 -0
- hypermind/py.typed +0 -0
- hypermind/responders/__init__.py +87 -0
- hypermind/responders/anthropic.py +159 -0
- hypermind/responders/base.py +162 -0
- hypermind/responders/openai.py +199 -0
- hypermind/responders/router.py +254 -0
- hypermind/responders/structured.py +287 -0
- hypermind/responders/tools.py +444 -0
- hypermind/revocation.py +270 -0
- hypermind/rule_ids.py +135 -0
- hypermind/schemas/encrypted_statement.cddl +28 -0
- hypermind/schemas/namespace_accept.cddl +20 -0
- hypermind/schemas/namespace_create.cddl +25 -0
- hypermind/schemas/namespace_founding_attest.cddl +30 -0
- hypermind/schemas/namespace_invite.cddl +22 -0
- hypermind/schemas/wire-v0.1.cddl +73 -0
- hypermind/simlab/__init__.py +15 -0
- hypermind/simlab/_persona_registry.py +93 -0
- hypermind/simlab/_scenario_impl.py +2778 -0
- hypermind/simlab/app.py +2538 -0
- hypermind/simlab/backends/__init__.py +27 -0
- hypermind/simlab/backends/anchor.py +88 -0
- hypermind/simlab/backends/local.py +32 -0
- hypermind/simlab/backends/server.py +79 -0
- hypermind/simlab/cli_command.py +108 -0
- hypermind/simlab/config.py +106 -0
- hypermind/simlab/deployment.py +26 -0
- hypermind/simlab/knowledge.py +716 -0
- hypermind/simlab/learning.py +295 -0
- hypermind/simlab/modes/__init__.py +115 -0
- hypermind/simlab/modes/_eval_real_llm.py +373 -0
- hypermind/simlab/modes/aar.py +611 -0
- hypermind/simlab/modes/backtest.py +610 -0
- hypermind/simlab/modes/binary_forecast.py +69 -0
- hypermind/simlab/modes/conformance.py +1869 -0
- hypermind/simlab/modes/evaluation.py +2271 -0
- hypermind/simlab/modes/governance.py +648 -0
- hypermind/simlab/modes/redteam.py +534 -0
- hypermind/simlab/modes/tabletop.py +797 -0
- hypermind/simlab/modes/tournament.py +448 -0
- hypermind/simlab/modes/whatif.py +523 -0
- hypermind/simlab/namespace.py +125 -0
- hypermind/simlab/personas.py +477 -0
- hypermind/simlab/prompt_generator.py +172 -0
- hypermind/simlab/question_sets/geopolitics_q20.json +122 -0
- hypermind/simlab/question_sets/governance_q5.json +67 -0
- hypermind/simlab/question_sets/msft_outlook_q10.json +62 -0
- hypermind/simlab/question_sets/whatif_q3.json +38 -0
- hypermind/simlab/registry.py +325 -0
- hypermind/simlab/runner.py +239 -0
- hypermind/simlab/scenario.py +147 -0
- hypermind/simlab/swarms.py +180 -0
- hypermind/simlab/tool_handlers/__init__.py +4 -0
- hypermind/simlab/tool_handlers/alpha_vantage.py +39 -0
- hypermind/simlab/tool_handlers/brave.py +46 -0
- hypermind/simlab/tool_handlers/newsapi.py +50 -0
- hypermind/simlab/tool_handlers/openweather.py +46 -0
- hypermind/simlab/tool_handlers/pinecone.py +52 -0
- hypermind/simlab/tool_handlers/qdrant.py +57 -0
- hypermind/simlab/tool_handlers/query_knowledge_base.py +21 -0
- hypermind/simlab/tool_handlers/relata_recall.py +61 -0
- hypermind/simlab/tool_handlers/retrieve_document.py +21 -0
- hypermind/simlab/tool_handlers/serper.py +46 -0
- hypermind/simlab/tool_handlers/tavily.py +53 -0
- hypermind/simlab/tool_handlers/weaviate.py +65 -0
- hypermind/simlab/tool_handlers/wikipedia.py +64 -0
- hypermind/simlab/tool_handlers/wolfram.py +48 -0
- hypermind/simlab/tool_handlers/yahoo_finance.py +49 -0
- hypermind/simlab/tool_registry.py +568 -0
- hypermind/simlab/topic_adapter.py +338 -0
- hypermind/simlab/topic_questions.py +259 -0
- hypermind/storage/__init__.py +69 -0
- hypermind/storage/backend.py +71 -0
- hypermind/storage/relata.py +245 -0
- hypermind/storage/sqlite.py +258 -0
- hypermind/sync.py +191 -0
- hypermind/tal.py +175 -0
- hypermind/tasks.py +334 -0
- hypermind/testing.py +16 -0
- hypermind/tools/__init__.py +32 -0
- hypermind/tools/registry.py +61 -0
- hypermind/transport/__init__.py +22 -0
- hypermind/transport/anti_entropy.py +708 -0
- hypermind/transport/bus.py +206 -0
- hypermind/transport/knows_delta.py +204 -0
- hypermind/transport/libp2p.py +298 -0
- hypermind/transport/placement.py +58 -0
- hypermind/transport/tcp.py +797 -0
- hypermind/transport/tls_profile.py +417 -0
- hypermind/types.py +59 -0
- hypermind/uncertainty.py +222 -0
- hypermind/wire.py +897 -0
- hypermind/workflow/__init__.py +72 -0
- hypermind/workflow/engine.py +655 -0
- hypermind/workflow/plan.py +182 -0
- hypermind/workflow/repair.py +203 -0
- hypermind-0.11.0.dist-info/METADATA +524 -0
- hypermind-0.11.0.dist-info/RECORD +181 -0
- hypermind-0.11.0.dist-info/WHEEL +4 -0
- hypermind-0.11.0.dist-info/entry_points.txt +2 -0
- 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
|
+
]
|