Releases: SamurAI-Official/ShugoCore
Release list
v1.8.1 — Android runtime fixes, on-device model downloads, desktop server mode
v1.8.1 — Android Runtime Fixes, On-Device Model Downloads & Desktop Server Mode
Fixed — "Start Agent does nothing" on Android
Root cause: android_inference (and the whole decision-engine closure) was
never bundled into the Chaquopy source set, so create_backend({"type": "android"}) raised ValueError, was silently caught, and left pyAgent = null — the Start Agent button appeared to do nothing.
py-modulesnow includesandroid_inference+shugocore_agent; all 21
engine modules are bundled intoapp/src/main/python/.DecisionEngineimports lazily inside a guarded_initialize_engine—
missing engine dependencies degrade to the stub observation loop instead of
crashing agent construction.- Kotlin compile fixes:
Service.START_STICKY(previous constant is
API-34-only),PyObject.toJava(Map::class.java), vararg spread for
create_agent(soc, api_url), null-safe model-dir scan, inference init moved
off the main thread.
Added — On-device model downloads (no adb pushes)
- Models… dialog in
MainActivity: curated catalog of 5 ungated Hugging
Face GGUF quantizations (Qwen2.5-0.5B/1.5B/3B-Instruct,
Llama-3.2-1B-Instruct, SmolLM2-1.7B-Instruct, all Q4_K_M), tagged
recommendedper RAM tier; plus sideloaded.gguffiles, select & load /
delete, and a live %/MB progress bar. ModelDownloader: resumable HTTP downloads (Range +.part→ atomic
rename + exact-size verification + cancel + auto-retry) into
filesDir/models.- Hot-load:
ShugoCoreService.loadOnDeviceModel()starts the llama.cpp
bridge and the loopbackLocalApiServeron127.0.0.1:11434without
restarting the agent — the agent's default backend URL is the same
endpoint, so on-device inference activates on the next generate call. findModelFile()prefers the persistedselected_model.
Added — Sensor engagement test cycle
AndroidAgent.update_telemetry()/sensor_test_cycle(steps)/
enrichedget_status(); Kotlin pushes battery / charging / CPU temp / RAM /
accelerometer / thermal telemetry every tick.- Binder APIs
getAgentStatus()/runSensorTestCycle()/
getDeviceRecommendation();MainActivitypolls agent status at 1 Hz —
fixes the frozen memory status display. tests/test_sensor_engagement.py— 6/6 passing.
Added — Desktop server mode (macOS / Linux / Windows)
shugocore_server.py(shugocore-serverconsole script) speaks the Ollama
wire contract (/api/generate,/api/chat,/api/tags,/health) plus
the engine API (/api/v1/status,/api/v1/task), so the tablet pairs as a
node with zero client changes. Desktop URL field inMainActivity;
on-device llama.cpp remains the default when blank.tests/test_shugocore_server.pyexercises every endpoint with real HTTP.
Fixed — Android build toolchain
- Gradle wrapper pinned back to 8.11.1 (Gradle 9 removed
Project.exec(Action)that AGP 8.7.3 needs), daemon JDK pinned to 21,
Kotlin Gradle plugin +kotlinOptions jvmTarget 17+ndkVersion 27.0.12077973+ ChaquopybuildPythonadded.compileDebugKotlin,
configureCMakeDebug, and the fullassembleDebugAPK all build.
Fixed — Backend resilience
OllamaBackenddefault timeout 30 → 120 s (cold model loads made every
decision fall back).
v1.8.0
[1.8.0] - 2026-09-03
Fixed — Android native inference is now real end-to-end
The Android stack previously stopped at placeholder JNI calls and stubbed
HTTP responses. The full chain now runs real tokens:
HTTP → LocalApiServer → LlamaCppBridge → JNI → llama.cpp → GGUF.
platforms/android/app/src/main/cpp/llama_jni.cpp— rewritten against
the pinned llama.cpp (b10795) C API:llama_model_load_from_file/
llama_init_from_modelsession creation, vocab-based
llama_tokenize/llama_token_to_piece,llama_decodebatching via
llama_batch_get_one, and a proper sampler chain
(penalties → top_k → top_p → temp → dist) sampled with
llama_sampler_sample. Per-session state (ShugoSession: model, context,
vocab, KV position, pending-UTF-8 buffer) replaces the previous mutable
globals;nativeDrainflushes partial multi-byte characters at
end-of-generation so streamed text is never corrupted mid-codepoint.CMakeLists.txt— rewritten: valid CMake syntax, static llama/ggml
linked intolibllama_jni.so, optional Vulkan GPU offload
(-DSHUGOCORE_VULKAN=ON), no-march=native(broke NDK + emulator
builds), and dual-target support — Android NDK builds and host CI
validation builds (-DSHUGOCORE_JNI_INCLUDE=...).LocalApiServer.kt— replaced JDK-internalcom.sun.net.httpserver
(absent on Android) with a minimal HTTP/1.1 implementation on
ServerSocket, loopback-only./api/generateand/api/chatnow parse
JSON bodies, apply sampling options (temperature,top_k,top_p,
repeat_penalty,seed,num_predict), stream NDJSON chunks when
stream: true, and return Ollama-shaped responses (response/
message.content,done,eval_count,total_duration) so ShugoCore's
OllamaBackend/AndroidBackendwork unmodified.
Verified
- Host build of
libllama_jni.dylib(full llama.cpp + JNI bridge) compiles
and links with zero warnings against the pinned headers; all 8 JNI symbols
(nativeInit,nativeFree,nativeTokenize,nativeDetokenize,
nativeDrain,nativeEvalPrompt,nativeGenerateToken,nativeReset)
exported with names exactly matching the Kotlinexternal fun
declarations. - Version metadata aligned at 1.8.0 across
version.py,pyproject.toml,
andbuild.gradle.
v1.7.0: Android Native Layer
[1.7.0] - 2026-09-03
Added — Android native layer
platforms/android/— Complete Android application shell with native
llama.cpp inference via JNI bindings.LlamaCppBridge.kt— Kotlin JNI wrapper for llama.cpp with token
streaming, batching, and resource management.LocalApiServer.kt— OpenAI-compatible HTTP API server running on
127.0.0.1:11434, enabling ShugoCore backends to work unmodified on Android.CapabilityDetector.kt— Hardware capability detection (SoC, NPU, GPU,
RAM) for automatic model/quantization selection.ThermalMonitor.kt— Battery and thermal state monitoring with
inference throttling and emergency shutdown.ShugoCoreService.kt— Foreground service managing inference backend
lifecycle, thermal throttling, and periodic agent execution.MainActivity.kt— Minimal UI for starting/stopping the agent service.llama_jni.cpp— Native JNI bindings for llama.cpp with Vulkan GPU
offload support.shugocore_agent.py— Python agent entrypoint for Chaquopy runtime.android_inference.py— Android backend compatible with
OllamaBackendinterface.
v1.6.0
v1.6.0 — Dream Consolidation, Memory Write Gates & Simulation Framework
Added
Dream Consolidation
DreamConsolidationclass — periodic reflective pass that compresses episodic experiences into durable identity insights (inspired by GrowBot's "dream" phase)- Insight extraction from patterns: recurring failures (≥2 occurrences) and consistent successes (≥3 occurrences)
- Clamped identity mutations: max 1 sentence added per dream, identity never falls below minimum length
- Dream is the SOLE writer of Tier 3 mutations during normal operation (code-enforced)
Memory Write Gates
- Code-enforced write permissions per memory tier:
- Tier 0 (Scratchpad): Only scratchpad writes
- Tier 1 (EpisodicMemory): Only episodic record (append-only)
- Tier 2 (SemanticMemory): Only consolidation/maintenance worker
- Tier 3 (CoreIdentity): Only dream consolidation or explicit promotion
check_write_permission()/enforce_write()withPermissionErroron violation
Simulation Framework
simulation/module with MuJoCo backend and stub fallback- Robot models: Berkeley Humanoid Lite, Reachy2, Unitree G1
- Test scenarios: WalkToTarget, BalanceTest, EmergencyStop
run_benchmark()for public test data generationpip install 'shugocore[simulation]'for MuJoCo support
Integration
- Dream consolidation runs automatically in continuous agent loop
- Dream stats exposed via
status() - 174 tests passing
Documentation
- Updated README with simulation framework and file structure
- CHANGELOG entries for v1.5.0 and v1.6.0
v1.4.0
[1.4.0]
Added — fleet-shared Tier 2 memory (PostgreSQL + pgvector)
pg_memory.py—PgSemanticMemory, a drop-in PostgreSQL + pgvector
backend for Tier 2 semantic memory, enabling the persistence half of the
Shogunet memory mesh: several agents (or planning nodes) pointing at the
same DSN see one consistent knowledge base. API parity with the SQLite
SemanticMemory(store_fact / search / reinforce / decay / prune /
get_fact / extract_entities / facts_about / related_entities /
entity_names), so it plugs directly into
DecisionEngine(semantic_memory=...)andMemoryManager(semantic=...).open_semantic_memory()factory — single storage knob for operators:
apostgres://orpostgresql://DSN selectsPgSemanticMemory; any
other value preserves the historical local SQLite behavior.
DecisionEngineroutesmemory_db_paththrough it, so switching a fleet
to shared memory is a one-line config change.- Embedding parity — the pg backend embeds with the same deterministic
hashing embedding as the SQLite backend, so facts written by one agent on
one backend are retrievable with identical similarity scores by another
agent on the other backend. - Search pushed down to pgvector — cosine distance (
<=>) is computed
server-side (similarity = 1 - distance), with an optional HNSW index
recipe for fleet scale documented in the module docstring. - Fail-closed, no silent stub — construction raises with actionable
instructions if psycopg2 is missing (pip install 'shugocore[postgres]')
or the pgvector extension is unavailable (CREATE EXTENSION vector;).
A fleet-shared memory that quietly failed to persist would violate the
Tier 2 invariants, so none exists. postgresoptional dependency —pip install 'shugocore[postgres]'
installs psycopg2-binary; no new required dependencies for existing users.
Hardened — fleet memory boundary
- Table identifiers (
table_prefix) are strictly validated
(^[a-z][a-z0-9_]{0,40}$) before interpolation into DDL/DML. - Tier 2 only: the pg store never touches Tier 0/1 (per-agent) or Tier 3
(read-only identity), preserving the memory invariants (N0-N1) across the
fleet.
v1.3.0
[1.3.0]
Added — hardening for Continuous Synthetic Functional Agency
- Continuous agent daemon (
continuous_agent.py): a top-level orchestrator
that embodies the OBSERVE → GATE → DECIDE → EXECUTE → EVALUATE → RECORD →
CONSOLIDATE loop in a single entry point. Bounded iteration counts, bounded
interval pacing, and graceful shutdown. CLI:
python3 continuous_agent.py --interval 2.0 --max-iterations 1000. - HMAC-signed audit chains (
audit.py):AuditChainnow accepts an
optionalhmac_key(operator-held, e.g. viaSecretResolver). Entries carry
an HMAC-SHA256 tag over the chain hash + payload, making history
tamper-evident and authenticated when the audit file lives on shared
storage. Verification is backward-compatible with unsigned (1.2.x) chains.
Includes averify_audit_file()helper andpython3 audit.py <file>CLI. - Real embeddings for Tier 2 (
vector_db.py): environment observations
were previously stored with all-zero placeholder vectors; they now use
deterministic n-gram hashed embeddings (hashed_embedding()), making
similarity search meaningful without any third-party dependency. - Pluggable embedding backends (
vector_db.py):VectorDBaccepts an
injectable embedding function, so operators can swap in a learned encoder
(sentence-transformers, OpenAI, etc.) without touching storage logic. - Shogunet optional dependency (
pyproject.toml): the networking runtime
is now installable viapip install shugocore[shogunet].
Hardened — ethics surface
EthicalGovernorplaceholder predicates (can_explain,detect_bias,
is_privacy_compliant,can_audit) no longer return hardcoded values.
They now evaluate real signals: decision provenance/audit-trail presence,
input attribute screening for protected-category bias, and data-subject
consent coverage for privacy compliance.
Fixed
pyproject.tomlversion was left at 1.2.0 after the 1.2.1 bump; both now
share the single source of truth inversion.pyvalues.
v1.2.1
[1.2.1]
Added — Shogunet multi-agent networking integration
shugonet_bridge.py— ShugoCore-side adapter for the Shogunet networking
layer, following the same pattern asrobotics_handler.pyand
mobile_nodes.py. Enables multi-agent collaboration over 5G, 4G, WiFi,
LoRa, and Bluetooth with a codependent memory mesh.ShugonetExecutionHandlerdispatches network actions to the Shogunet
ShugonetAgentRuntime.register_network_handlers()registers network action types with the
ExecutionLayerandpolicy.KNOWN_ACTION_TYPES.attach_network_fallbacks()merges network trigger severities into the
deterministicFallbackController.- Network action types:
network_send,network_query,network_sync
(side-effecting) andnetwork_list_agents,network_status
(read-only). - Network fallback triggers:
network_transport_exhausted(pause),
network_peer_lost(pause),memory_sync_conflict_storm(safe_state),
audit_chain_broken(halt). network_topic()helper for canonical/shugunet/{agent_id}/{tail}
topic construction.
tests/test_shugonet.py— 22 integration tests covering action type
registration, handler dispatch, fallback severity integration, and
execution-layer compatibility.DecisionEnginenow accepts an optionalshogonet_handlerparameter
for automatic handler registration at engine construction time.
ShugoCore v1.2.0
v1.2.0: Multiphase stress-test suite (97 tests) + 3 robustness fixes
Phase 1 lifecycle churn/soak, Phase 2 ROS transport stress, Phase 3 thermal
oscillation, Phase 4 model execution vs fake llama.cpp/Ollama server.
Fixes found by stress testing:
- memory-worker thread leak in AndroidShugoCoreNode.stop()
- JavaBridgeROS2Interface.spin_once malformed-payload crash
- RosBridgeInterface non-dict packet crash
335 tests passing, including the required 5-second hardware soak.