Skip to content

libmoss v0.29.0

Choose a tag to compare

@moss-release-bot moss-release-bot released this 03 Nov 01:11
· 14 commits to main since this release
7585261

Precompiled C SDK binaries for the Moss SDK.

Changed

  • Breaking change: moss_inference_responses_create replaces moss_inference_chat_completions_create, in the shape of OpenAI's Responses API, and calls /responses under the base URL. The request JSON takes input, a string or a list of items, and instructions in place of messages, plus max_output_tokens, and function tools are flat. The callback, a MossInferenceEventFn in place of MossInferenceChunkFn, gets each Responses event as JSON, such as response.output_text.delta, and the stream ends after response.completed or response.incomplete. Without a callback, out_json gets the response of that last event, plus request_id when the reply has one, and it is NULL when a callback stopped the stream first. A function call's result goes back in input as a function_call_output item, after the output items as they came, whose mcp_call items give the model the earlier tool results. A response.failed or error event fails the call with its message and code, and once an mcp_call item has arrived every failure has the code failed_after_tool_call. Moss stores nothing: store is ignored, and previous_response_id, background, include and built-in tools fail with the code unsupported_parameter. The third argument is call_options_json, the name its error messages use. MOSS_INFERENCE_API_VERSION is 3.
  • Every request the library makes, such as model and index downloads, control-plane calls, authentication, uploads, telemetry and inference, sends a moss-sdk/<version> User-Agent.

Removed

  • moss_inference_chat_completions_create, MossInferenceChunkFn, the chat completion JSON joined from the chunks with its choices, logprobs and moss_tool_steps, and the moss_tool_step chunks.

Fixed

  • On Linux, TLS no longer trusts emSign ECC Root CA - G3, which webpki-roots 1.0.10 drops after the private keys of eight eMudhra intermediate CAs were compromised. macOS and Windows use the system trust store.

Platforms

Archive OS Arch
libmoss-v0.29.0-aarch64-apple-darwin.tar.gz macOS ARM64 (Apple Silicon)
libmoss-v0.29.0-x86_64-unknown-linux-gnu.tar.gz Linux x86_64
libmoss-v0.29.0-aarch64-unknown-linux-gnu.tar.gz Linux ARM64
libmoss-v0.29.0-x86_64-pc-windows-msvc.tar.gz Windows x86_64

Contents

Each archive contains:

  • include/libmoss.h - C header
  • lib/libmoss.dylib, lib/libmoss.so or lib/moss.dll - shared library
  • LICENSE-THIRD-PARTY.txt - licenses of the third-party code the library links

Windows archives also contain the DLL import library lib/moss.dll.lib.

Usage

Extract, then compile and link. The macOS dylib ships with an
@rpath/libmoss.dylib install name, so pass an -rpath that
resolves to lib/ or the binary aborts at launch with
"Library not loaded: @rpath/libmoss.dylib ... no LC_RPATH's found":

# macOS
clang your_app.c -o your_app -Iinclude -Llib -lmoss \
  -Wl,-rpath,@loader_path/lib \
  -framework Security -framework SystemConfiguration

# Linux
gcc your_app.c -o your_app -Iinclude -Llib -lmoss -lpthread -lm -ldl