← Back to search

io.github.emergent-wisdom/semahash

emergent-wisdom Scanned 5d ago

Content-addressed semantics: fail-closed handshakes over 453 cognitive patterns.

D
59.4 / 100

Versions

0.1.4latest
first seen Jun 5, 2026
0.2.3
first seen May 19, 2026
PermissionsTool SafetyAuthAnnotationsCode QualityStabilitySpecVuln HistoryAuthorTransparencyCommunity

Tools 13

sema_reset_session
annotations: none low

Reset the session pattern cache. Clears the record of which patterns have been served this session, so the leading matches in subsequent searches return detailed results again. Use when context has been compressed or you need fresh detail. Returns: Confirmation with count of patterns cleared.

sema_search
annotations: none low

Search Sema patterns by name, description, or meaning (semantic search). Returns at most 20 ranked matches. The first three unseen matches include search detail; later and previously seen matches use compact summaries. Use sema_resolve() to fetch the complete Pattern Card you need. Args: query: Search term or concept description. limit: Maximum matches to return. Defaults to 10 and is capped at 20. Returns: JSON array of matching patterns.

limit int query str
sema_resolve
annotations: none low

Get a pattern with its dependencies expanded. Args: handle: Pattern handle (e.g., "ChainOfThought") depth: How many hops to expand (1 = direct deps, 2 = deps of deps) Returns: JSON object with the pattern and its resolved dependencies

depth int handle str
sema_tree
annotations: none low

Browse the vocabulary structure organized by layer and category. Args: layer: Filter to specific layer (Physics, Mind, Society, Infrastructure) category: Filter to specific category verbose: If True, includes the gloss (description) for each pattern. Returns: JSON tree structure of patterns

layer string verbose bool category string
sema_lookup
annotations: none low

Lookup a pattern by its Sema reference (Handle#stub). Args: ref: Pattern reference like "ChainOfThought#27ad" or just "ChainOfThought" Returns: Full pattern JSON

ref str
sema_validate
annotations: none low

Validate a pattern JSON using the same rules as the mint pipeline. Args: pattern_json: JSON string of a pattern to validate Returns: Validation result with any errors or warnings

pattern_json str
sema_stats
annotations: none low

Get statistics about the Sema vocabulary. Returns: JSON with vocabulary statistics

sema_graph_skeleton
annotations: none low

Ultra-minimal graph overview (~150 tokens). Shows regions, hubs, and recent activity. Returns: Text summary of the graph structure.

sema_use
annotations: none low

Switch the active vocabulary database without restarting. Args: db_path: Path to the database to switch to. Omit to show current. default: If True, switch back to the bundled vocabulary. Returns: JSON with the new vocabulary stats, or current status.

db_path str default bool
sema_root
annotations: none low

Get both aggregate roots of the active vocabulary. The semantic-set root commits to the unordered set of definition digests and ignores duplicate meanings. The catalog root separately commits to exact handle-to-digest bindings. Both use versioned, domain-separated RFC 9162 Merkle Tree Hash constructions. Pair with `sema_handshake(ref="vocab", ...)` for semantic-set alignment or `sema_handshake(ref="catalog", ...)` for namespace alignment. Returns: JSON with both roots, schemes, counts, full IDs, and short stubs.

sema_handshake
annotations: none low

Byte-level definition agreement check between two agents. Verifies that the requesting agent and the local registry have the *same definition* of a pattern, by comparing content hashes. This is a necessary precondition for shared reasoning about a pattern, but it is NOT a guarantee of shared behavior: two agents can agree on the definition text and still implement it differently. Think of it as "we read the same paragraph," not "we will do the same thing." Use this when you need to rule out silent vocabulary drift before coordinating on a pattern. It does not replace behavioral testing. Args: ref: Pattern reference (e.g., "StateLock#c9c2" or "StateLock"), "vocab" for the semantic-set root, or "catalog" for exact handle-to-definition bindings. your_hash: Your local hash — the 4-char pattern stub, or the 16-char vocab root stub (or full 64-char root). If omitted, returns the canonical hash for you to compare. strict: If true, only a full 64-character hash can produce PROCEED. A matching stub returns REQUIRE_FULL_HASH. If false (default), stubs may proceed for cooperative drift detection. your_scheme: Aggregate-root scheme returned by `sema_root` or an initial aggregate handshake. Required whenever `your_hash` is supplied for `vocab` or `catalog`. Omission or a different scheme fails with HALT; `sema pull` cannot repair algorithm-only drift. Returns: JSON with verdict: PROCEED (accepted under the selected mode), HALT (mismatch), PROVIDE_HASH (no hash supplied), or REQUIRE_FULL_HASH (stub matches but strict mode needs the complete digest). PROCEED includes assurance=prefix or assurance=full_hash. Example workflow (pattern): 1. Agent A: sema_handshake("StateLock") -> gets canonical hash "2f3c" 2. Agent A: sema_handshake("StateLock", "2f3c") -> PROCEED 3. Agent B with drift: sema_handshake("StateLock", "9x7z") -> HALT Example workflow (whole vocabulary): 1. Agent A: sema_handshake("vocab") -> gets stub + root_scheme 2. Agent B: sema_handshake( "vocab", "<that stub>", your_scheme="<that scheme>" ) -> PROCEED / HALT

ref str strict bool your_hash string your_scheme string
sema_propose_context
annotations: none low

Propose a shared definition set for multi-agent coordination. Computes a truncated catalog Merkle root over the requested handle-to-definition bindings. The receiving agent calls sema_verify_context with the same handles and compares roots. Properties of the digest: - Order-independent: handle bindings are sorted before the versioned RFC 9162 tree construction. - Binding-sensitive: swapping two handles' definitions changes the root. - 32 bits wide (8 hex chars). Birthday collisions become likely after roughly 65k independently sampled contexts. This is sufficient to catch ACCIDENTAL vocabulary drift between cooperating agents, but NOT a security primitive: an active adversary can brute-force a matching 4-byte prefix. - What it verifies: that both agents have byte-identical definitions for every pattern in the set. - What it does NOT verify: that both agents will behave compatibly when executing those patterns. Workflow: 1. Agent A: sema_propose_context(["StateLock", "Check", "Task"]) -> returns context_hash "7f3a..." + root_scheme 2. Agent A sends both values to Agent B 3. Agent B: sema_verify_context( ["StateLock", "Check", "Task"], "7f3a...", "<scheme>" ) -> PROCEED or HALT Args: handles: List of pattern handles to include in the context. Returns: JSON with the context_hash, root scheme, and pattern refs.

handles string
sema_verify_context
annotations: none low

Verify a semantic context proposed by another agent. Computes the local truncated catalog root for the given handle bindings and compares it against the remote agent's root under the declared scheme. PROCEED if both match, HALT if not. The short root is a drift-detection primitive between cooperating agents, not a security primitive against an adversary (see sema_propose_context for details). Args: handles: List of pattern handles in the proposed context. remote_hash: The context_hash received from the proposing agent. remote_scheme: The root_scheme received from the proposing agent. Omission or a different scheme fails closed. Returns: JSON with verdict: PROCEED (contexts match) or HALT (drift detected).

handles string remote_hash str remote_scheme string

Permissions 5

network medium
Server uses network capabilities via: fetch(), httpx, urllib
filesystem low
Server uses filesystem capabilities via: glob, open(), os, pathlib, shutil, tempfile
shell high
Server uses shell capabilities via: subprocess
database medium
Server uses database capabilities via: sqlite3
env_vars low
Server uses env_vars capabilities via: os.environ, process.env

Scan Findings 69

low
Tool 'sema_reset_session' has no annotations annotation_checker · 100%
low
Tool 'sema_search' has no annotations annotation_checker · 100%
low
Tool 'sema_resolve' has no annotations annotation_checker · 100%
low
Tool 'sema_tree' has no annotations annotation_checker · 100%
low
Tool 'sema_lookup' has no annotations annotation_checker · 100%
low
Tool 'sema_validate' has no annotations annotation_checker · 100%
low
Tool 'sema_stats' has no annotations annotation_checker · 100%
low
Tool 'sema_graph_skeleton' has no annotations annotation_checker · 100%
low
Tool 'sema_use' has no annotations annotation_checker · 100%
low
Tool 'sema_root' has no annotations annotation_checker · 100%
low
Tool 'sema_handshake' has no annotations annotation_checker · 100%
low
Tool 'sema_propose_context' has no annotations annotation_checker · 100%
low
Tool 'sema_verify_context' has no annotations annotation_checker · 100%
medium
OAuth implementation without PKCE auth_checker · 75%
info
Sandbox failed to start for behavioral verification behavioral_verifier · 100%
medium
Suspicious package name: react-dom dependency_analyzer · 60%
medium
Suspicious package name: react-router dependency_analyzer · 60%
medium
Vulnerable dependency: react-router@7.14.0 (GHSA-2j2x-hqr9-3h42) dependency_analyzer · 95%
medium
Vulnerable dependency: react-router@7.14.0 (GHSA-337j-9hxr-rhxg) dependency_analyzer · 95%
medium
Vulnerable dependency: react-router@7.14.0 (GHSA-49rj-9fvp-4h2h) dependency_analyzer · 95%
medium
Vulnerable dependency: react-router@7.14.0 (GHSA-84g9-w2xq-vcv6) dependency_analyzer · 95%
medium
Vulnerable dependency: react-router@7.14.0 (GHSA-8x6r-g9mw-2r78) dependency_analyzer · 95%
medium
Vulnerable dependency: react-router@7.14.0 (GHSA-chx6-hx7r-mcp5) dependency_analyzer · 95%
medium
Vulnerable dependency: react-router@7.14.0 (GHSA-h8fp-f39c-q6mh) dependency_analyzer · 95%
medium
Vulnerable dependency: react-router@7.14.0 (GHSA-qwww-vcr4-c8h2) dependency_analyzer · 95%
medium
Vulnerable dependency: react-router@7.14.0 (GHSA-wrjc-x8rr-h8h6) dependency_analyzer · 95%
medium
Vulnerable dependency: vite@7.2.4 (GHSA-4w7w-66w2-5vf9) dependency_analyzer · 95%
medium
Vulnerable dependency: vite@7.2.4 (GHSA-fx2h-pf6j-xcff) dependency_analyzer · 95%
medium
Vulnerable dependency: vite@7.2.4 (GHSA-p9ff-h696-f583) dependency_analyzer · 95%
medium
Vulnerable dependency: vite@7.2.4 (GHSA-v2wj-q39q-566r) dependency_analyzer · 95%
medium
Vulnerable dependency: vite@7.2.4 (GHSA-v6wh-96g9-6wx3) dependency_analyzer · 95%
medium
Vulnerable dependency: pydantic@2.0 (GHSA-mr82-8j83-vxmv) dependency_analyzer · 95%
medium
Vulnerable dependency: pydantic@2.0 (PYSEC-2026-1812) dependency_analyzer · 95%
high
Long unicode escape chain in emergent-wisdom-sema-a0729ef/scripts/test_hash_verification.py:22 entropy_analyzer · 80%
high
Long unicode escape chain in emergent-wisdom-sema-a0729ef/src/sema/core/hashing.py:34 entropy_analyzer · 80%
medium
Hex string literal (>50 chars) in emergent-wisdom-sema-a0729ef/src/sema/cli/tests/test_pull.py:1768 entropy_analyzer · 70%
medium
Hex string literal (>50 chars) in emergent-wisdom-sema-a0729ef/src/sema/core/tests/test_vocabulary_root.py:51 entropy_analyzer · 70%
medium
Hex string literal (>50 chars) in emergent-wisdom-sema-a0729ef/src/sema/core/tests/test_vocabulary_root.py:55 entropy_analyzer · 70%
medium
Hex string literal (>50 chars) in emergent-wisdom-sema-a0729ef/src/sema/core/tests/test_vocabulary_root.py:59 entropy_analyzer · 70%
medium
Hex string literal (>50 chars) in emergent-wisdom-sema-a0729ef/src/sema/core/tests/test_vocabulary_root.py:107 entropy_analyzer · 70%
medium
Hex string literal (>50 chars) in emergent-wisdom-sema-a0729ef/src/sema/core/tests/test_hashing.py:218 entropy_analyzer · 70%
medium
Hex string literal (>50 chars) in emergent-wisdom-sema-a0729ef/src/sema/core/tests/test_hashing.py:224 entropy_analyzer · 70%
medium
Hex string literal (>50 chars) in emergent-wisdom-sema-a0729ef/src/sema/core/tests/test_hashing.py:228 entropy_analyzer · 70%
medium
Hex string literal (>50 chars) in emergent-wisdom-sema-a0729ef/src/sema/core/tests/test_hashing.py:232 entropy_analyzer · 70%
medium
Hex string literal (>50 chars) in emergent-wisdom-sema-a0729ef/src/sema/core/tests/test_hashing.py:239 entropy_analyzer · 70%
info
package.json metadata manifest_parser · 100%
info
pyproject.toml metadata manifest_parser · 100%
info
Tool: sema_reset_session manifest_parser · 90%
info
Tool: sema_search manifest_parser · 90%
info
Tool: sema_resolve manifest_parser · 90%
info
Tool: sema_tree manifest_parser · 90%
info
Tool: sema_lookup manifest_parser · 90%
info
Tool: sema_validate manifest_parser · 90%
info
Tool: sema_stats manifest_parser · 90%
info
Tool: sema_graph_skeleton manifest_parser · 90%
info
Tool: sema_use manifest_parser · 90%
info
Tool: sema_root manifest_parser · 90%
info
Tool: sema_handshake manifest_parser · 90%
info
Tool: sema_propose_context manifest_parser · 90%
info
Tool: sema_verify_context manifest_parser · 90%
info
Required env vars (24) manifest_parser · 80%
info
Sandbox failed to start for output poisoning scan output_poisoning · 100%
medium
Permission: network access detected permission_analyzer · 90%
low
Permission: filesystem access detected permission_analyzer · 90%
high
Permission: shell access detected permission_analyzer · 95%
medium
Permission: database access detected permission_analyzer · 90%
low
Permission: env_vars access detected permission_analyzer · 90%
info
SBOM generated: 284 components sbom_generator · 100%
medium
No build provenance detected (SLSA L0) slsa_assessor · 90%