Skip to content

Releases: SamurAI-Official/ShugoCore

v1.8.1 — Android runtime fixes, on-device model downloads, desktop server mode

Choose a tag to compare

@SamurAI-Official SamurAI-Official released this 05 Sep 05:58

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-modules now includes android_inference + shugocore_agent; all 21
    engine modules are bundled into app/src/main/python/.
  • DecisionEngine imports 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
    recommended per RAM tier; plus sideloaded .gguf files, 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 loopback LocalApiServer on 127.0.0.1:11434 without
    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 persisted selected_model.

Added — Sensor engagement test cycle

  • AndroidAgent.update_telemetry() / sensor_test_cycle(steps) /
    enriched get_status(); Kotlin pushes battery / charging / CPU temp / RAM /
    accelerometer / thermal telemetry every tick.
  • Binder APIs getAgentStatus() / runSensorTestCycle() /
    getDeviceRecommendation(); MainActivity polls 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-server console 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 in MainActivity;
    on-device llama.cpp remains the default when blank.
  • tests/test_shugocore_server.py exercises 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 + Chaquopy buildPython added. compileDebugKotlin,
    configureCMakeDebug, and the full assembleDebug APK all build.

Fixed — Backend resilience

  • OllamaBackend default timeout 30 → 120 s (cold model loads made every
    decision fall back).

v1.8.0

Choose a tag to compare

@SamurAI-Official SamurAI-Official released this 04 Sep 05:48

[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_model session creation, vocab-based
    llama_tokenize / llama_token_to_piece, llama_decode batching 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; nativeDrain flushes 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 into libllama_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-internal com.sun.net.httpserver
    (absent on Android) with a minimal HTTP/1.1 implementation on
    ServerSocket, loopback-only. /api/generate and /api/chat now 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/AndroidBackend work 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 Kotlin external fun
    declarations.
  • Version metadata aligned at 1.8.0 across version.py, pyproject.toml,
    and build.gradle.

v1.7.0: Android Native Layer

Choose a tag to compare

@SamurAI-Official SamurAI-Official released this 04 Sep 03:40

[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
    OllamaBackend interface.

v1.6.0

Choose a tag to compare

@SamurAI-Official SamurAI-Official released this 04 Sep 02:08

v1.6.0 — Dream Consolidation, Memory Write Gates & Simulation Framework

Added

Dream Consolidation

  • DreamConsolidation class — 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() with PermissionError on 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 generation
  • pip 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

Choose a tag to compare

@SamurAI-Official SamurAI-Official released this 03 Sep 17:48

[1.4.0]

Added — fleet-shared Tier 2 memory (PostgreSQL + pgvector)

  • pg_memory.pyPgSemanticMemory, 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=...) and MemoryManager(semantic=...).
  • open_semantic_memory() factory — single storage knob for operators:
    a postgres:// or postgresql:// DSN selects PgSemanticMemory; any
    other value preserves the historical local SQLite behavior.
    DecisionEngine routes memory_db_path through 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.
  • postgres optional dependencypip 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

Choose a tag to compare

@SamurAI-Official SamurAI-Official released this 03 Sep 17:48

[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): AuditChain now accepts an
    optional hmac_key (operator-held, e.g. via SecretResolver). 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 a verify_audit_file() helper and python3 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): VectorDB accepts 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 via pip install shugocore[shogunet].

Hardened — ethics surface

  • EthicalGovernor placeholder 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.toml version was left at 1.2.0 after the 1.2.1 bump; both now
    share the single source of truth in version.py values.

v1.2.1

Choose a tag to compare

@SamurAI-Official SamurAI-Official released this 03 Sep 17:48

[1.2.1]

Added — Shogunet multi-agent networking integration

  • shugonet_bridge.py — ShugoCore-side adapter for the Shogunet networking
    layer, following the same pattern as robotics_handler.py and
    mobile_nodes.py. Enables multi-agent collaboration over 5G, 4G, WiFi,
    LoRa, and Bluetooth with a codependent memory mesh.
    • ShugonetExecutionHandler dispatches network actions to the Shogunet
      ShugonetAgentRuntime.
    • register_network_handlers() registers network action types with the
      ExecutionLayer and policy.KNOWN_ACTION_TYPES.
    • attach_network_fallbacks() merges network trigger severities into the
      deterministic FallbackController.
    • Network action types: network_send, network_query, network_sync
      (side-effecting) and network_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.
  • DecisionEngine now accepts an optional shogonet_handler parameter
    for automatic handler registration at engine construction time.

ShugoCore v1.2.0

Choose a tag to compare

@SamurAI-Official SamurAI-Official released this 01 Sep 20:07

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.