Skip to content

v0.8.0

Choose a tag to compare

@github-actions github-actions released this 11 Sep 23:09
· 381 commits to main since this release

Added

  • agents: the REST API (/api/**) and the OpenAI Responses API (/v1/**)
    accept a bearer token once authentication is on: a Keycloak access token,
    checked against KC_ISSUER_URI (MC_JWT_AUDIENCES can require an audience),
    or a personal API token. A user creates API tokens on the new profile page
    behind the avatar in the admin UI's header; the secret is shown once, only its
    hash is stored, and a token can be revoked at any time. A request without an
    accepted token gets 401 with a JSON body saying why. Before, the API only
    answered to a browser session with a CSRF token — no program could call it on
    a secured installation; now it takes bearer tokens only, the browser session
    no longer counts there, and Swagger UI's Authorize takes a token for
    Try it out. The agent server (mc-agent-api-app) is secured the
    same way with MC_AUTH_ENABLED=true; it had no authentication at all. Users
    are recorded on sign-in (<data>/<namespace>/system/users/ or the mc_user
    table). New modules: mc-user-core, mc-user, mc-user-pg,
    mc-agent-security.

  • agents: MCP servers as registered tools. An operator registers a server
    under Admin → MCP Servers — a local process, a Docker image or a remote HTTP
    endpoint — tries it out with Test connection, and its tools appear in the
    tool catalog as <prefix>_<tool> (the prefix is fixed once registered, so
    agent definitions keep working). Values in env and headers are used as
    entered; a ${NAME} placeholder is refused until users can set their own
    variables — the environment of the server process is never read.
    process and docker targets start only where
    mindconnect.mcp.allow-process / mindconnect.mcp.allow-docker allow it;
    unset, both are on while sign-in is off and off once it is on, because
    registering asks for a login, not an admin role. A started server inherits
    only PATH, HOME, locale, proxy and container-daemon variables from the
    admin UI. Failed MCP calls report Error: …, so the chat and a workflow's
    tool step see them as failures.
    Discovered tools are cached on disk, so a restart does not start every server
    again. Registrations live in <data>/<namespace>/system/mcp-servers/, one
    JSON file per server; a Gmail registration ships disabled. The modules sit in
    agents/mcp.

  • agents: tool settings in the admin UI: a tool can be switched off or given
    a different description for this installation, without touching any agent
    definition. What an agent definition says about a tool still wins for that
    agent. Stored in <data>/<namespace>/system/tool-settings.json.

  • workflow: run attributes. WorkflowContext carries values the host
    hands one run (getAttribute / setAttribute), passed in with
    WorkflowExecutorService.executeWorkflow(workflow, params, attributes) or
    WorkflowRunService.runWithAttributes(...). Every step of the run sees them,
    parallel for-each blocks and called workflows included; a resumed run starts
    without them.

  • agents: ToolCallScope.rootSessionId, the chat at the top of a sub-agent
    chain, and ToolInvoker.call(tool, arguments, scope), which the tool-call
    workflow step now calls with the scope found on its run.

  • agents: ToolRegistry.releaseSession(sessionId) and
    MultiToolProvider.releaseSession(sessionId): whoever ends a session lets
    the tools go of what they hold for it. The tool test bench calls it after
    every test, so testing an MCP tool no longer leaves a connection — or a
    container — behind per click.

  • common: mc-file-repo, the file counterpart of mc-jdbc for stores that
    keep one JSON document per file. Documents reads without locking and lets
    one writer at a time change a file — across the whole JVM, so two store
    instances on the same directory take turns too — with create,
    createIfAbsent and update(key, change) for changes that must not
    overwrite each other. Writing while already holding a write lock fails at
    once instead of risking a deadlock, a lock that stays taken times out naming
    its holder, and a second process on the same partition (namespace) of a data
    directory is refused — processes serving different namespaces share the
    directory as before. The file session store is the first to use it.

  • common: RecordLog in mc-file-repo — an ordered log of JSON records
    per parent (the messages of a conversation), one file per record, with an
    in-memory index of the file names: append hands out the next key under
    the directory's lock, pages read only their records, and a deleted tail's
    keys are never handed out again.

  • agents: MessageRepository.update(conversation, id, change) changes a
    stored message in one step.

  • common: DocumentTable.insert (writes a new row, false when the key
    exists) and DocumentTable.update(key, change), which reads the row
    FOR UPDATE and writes the change in the same transaction.

  • common: Versions and StaleVersionException in mc-common for such
    checks, and compute(key, change) in Documents and DocumentTable: decide
    on the stored document, or its absence, and write — under one lock.

  • agents: a session has a working directory. AgentSession.workingDir
    is the directory the user is in — the CLI sets it to where it was
    launched (local mode) and changes it with /cd (a relative path taken
    from the session's current directory), the chat's composer
    has a folder button that names it and opens a chooser, POST /api/sessions takes
    workingDir and PUT /api/sessions/{id}/working-dir changes it, an
    embedding calls AgentRuntime.openSession(agent, user, path). The
    file-rooted tools (file_*, glob, bash, the document tools,
    vector_ingest_file) take it as their base directory ahead of a tool's
    baseDir override and the configured default; the system prompt names
    it; a sub-agent called from the session inherits it. glob searches a
    working directory from . and no longer requires path there. The
    directory must exist and, on a server, lie under the new
    mindconnect.tools.working-dir-root (default: mindconnect.tools.base-dir;
    the CLI sets /). Sessions written before read as having none, so
    nothing changes for them.

  • agents: a session can reach additional directories beside its working
    directory (AgentSession.additionalDirs): /add-dir and /dirs in the
    CLI, Additional directories in the chat's chooser, additionalDirs on
    POST /api/sessions and PUT /api/sessions/{id}/working-dir,
    AgentRuntime.addDirectory in an embedding. Relative paths keep meaning
    the working directory; an absolute path into an additional directory is
    allowed, anything outside the session's directories is refused with an
    error naming them. FileRoots in mc-agent-tool-spi is the one sandbox
    check the file, glob and document tools and vector_ingest_file now share
    (ToolCallScope.fileRoots), and each of those tools takes a FileRoots
    beside its Path constructor.

  • agents: the chat's folder button opens a directory chooser that works
    like the operating system's: one path field, the folders inside to step
    into, Use this folder takes what the field says. It browses the server's
    tree under mindconnect.tools.working-dir-root and nothing beyond it; the
    additional directories are listed beneath with a Remove each and an
    Add this folder. GET /api/directories?path= is the same listing over REST,
    over the caller's own tree, and PUT /api/sessions/{id}/working-dir changes
    a session of theirs — like every session endpoint, someone else's answers 404. The
    root may carry {user} (/srv/mindconnect/users/{user}): then every
    user has a root of their own, created on first use, and picks from and
    works in that tree only — the way to run this on a multi-user server.

  • agents: every user has a directory on the server, and every session
    one of its own. mindconnect.users.home (default <data.base-dir>/<namespace>/home/{user})
    is where a user's directories live; a session opened without a working
    directory works in sessions/<id> under it, the files attached to a chat
    are put in that directory's uploads/ — the system prompt names each
    file's path, so file_read, the document tools and bash open them —
    and when the session moves to a project, or a file is attached while it
    works in one, its own directory stays
    reachable as an additional directory. The users' home is also the
    default root a working directory must lie under
    (mindconnect.tools.working-dir-root), so the chat's chooser opens in
    the user's own tree. An embedding sets it with
    AgentRuntimeBuilder.usersHome. Sessions written before keep working as
    they did: none of them gets a directory after the fact. A user id with
    characters other than letters, digits, ., - and _ gets a short hash
    on its directory name, so two such ids never share a home.

  • agents: AttachedFile.path — where the copy of an attached file lies
    on disk, when there is one; ToolCallScope.runWith binds a scope to the
    running thread, and a workflow tool-call step resolves its tools in that
    scope, so an ingestion workflow runs against the session's own files.

  • agents: a bundled coding-assistant agent beside default-chat: it
    works in the project chosen with the chat's folder button — grep and
    glob to orient, file_read with line numbers, file_edit for exact
    changes, file_write for new files, bash (with approval) for the build
    and tests, todo_write for the plan, and the explorer sub-agent for a
    sweep of an unfamiliar codebase. Forty tool rounds per turn, auto-compact
    memory.

  • agents: two file tools for editing code: file_edit replaces one
    exact passage of a file (old_string → new_string; the passage must
    be unique unless replace_all) and returns a unified diff of the
    change, and grep searches file contents for a regular expression under
    a directory or in one file — file:line: text, newest files first, with
    glob, ignore_case, context and files_only, binary files and build
    directories skipped, results capped. file_edit forgives indentation the
    model got wrong when the passage is otherwise unique and keeps the
    file's own, and answers a passage that is not there with the closest
    one, numbered, so the next attempt copies what the file really says. file_read now numbers its lines
    cat -n style and pages through a long file with offset and limit
    (2,000 lines or 20,000 characters per call, and it says where to
    continue); a binary file is refused with a pointer to the document
    tools. Text in ISO-8859-1 is read as well — file_edit writes it back in
    that encoding — CRLF line endings are kept, and grep stops a runaway
    regular expression at its time limit. The bundled default-chat, code-analyst, explorer, verifier
    and file-finder agents get the new tools.

  • agents: bash takes a timeout (seconds, default 120, max 600) and
    caps its output at 30,000 characters, keeping the head and counting the
    rest. With background it starts a command that is not meant to return
    — a dev server, a watcher — watches it for three seconds and answers
    with the pid, whether it still runs or already exited with which code,
    the log so far and the log file under logs/ in the session's
    directory, so a build error is in the tool result instead of in a file
    nobody reads; process_kill ends such
    a process (with everything it spawned) or lists the session's, and
    whatever still runs when the runtime stops is killed with it. A command
    that would let a process go on its own — a & nothing waits for,
    nohup, setsid, disown — is refused and pointed at background,
    since such a process would run on out of the session's reach. Heredoc
    bodies and # comments do not count for that check, and a call returns
    once its shell exits even when a child it started still holds the output.

  • agents: standing instructions in a file, so a project or a user says
    once what would otherwise go in every message. The first of AGENTS.md,
    PROMPT.md or CLAUDE.md is read from two places: the user's instructions
    directory, which holds in every project, and the session's working
    directory, which holds while working there and comes last in the prompt so
    it has the final word. The user's directory is ~/.mindconnect by default,
    which suits a desktop; a server sets
    mindconnect.agent.instructions.user-dir to a path with {user} in it so
    each user gets their own, or to off to drop the scope.
    Both go in as their own section, read fresh every round and cut at 20,000
    characters. AGENTS.md comes first because it is an open specification read
    by a couple of dozen coding tools, so a repository that already has one
    works here without adding a file. For the project only the working directory
    itself is searched, not its parents.

  • agents: a project can bring its own sub-agents, in
    .mindconnect/agents/ in the working directory: one Markdown file each,
    front matter for name, description, tools, disallowedTools and
    model, the body as the system prompt. run_agent resolves them by name
    ahead of the registry, list_agents shows them first. Their tools are the
    caller's own narrowed by the file, never widened, each keeping the approval
    the caller's binding gives it, so a repository cannot hand itself a shell.
    tools: [] gives the agent none, and it may call only the agents its
    caller may.
    tools and disallowedTools may be written as a comma list or as an
    indented YAML block.

  • agents: a server profile for running the apps on a server several
    users share, and the two switches it sets. mindconnect.tools.disabled
    lists tools the installation does not offer at all — they leave every
    catalog, an agent that names one goes without it, and tool settings cannot
    switch it back on; the profile turns off bash and process_kill, which
    nothing confines to a chat's directory. mindconnect.working-dirs.choice: false takes away the choice of a chat's directories: no folder button, the
    directory endpoints refuse, and every chat works in its own directory under
    the user's home. A deleted chat's own directory is now removed with it.

Changed

  • agents: the REST API answers only with what belongs to the caller.
    POST /api/sessions takes {agentId} and the session belongs to the
    authenticated user — a userId in the body is ignored; GET /api/sessions
    lists the caller's sessions and ignores a userId parameter. Every
    /api/sessions/{id}/… endpoint, the user stream (/api/users/me/stream) and
    the workspace endpoints answer 404 for another user's data, exactly like for
    data that does not exist. A client that passed another user's id to act for
    them has to authenticate as that user instead.

  • agents: uploaded files remember who uploaded them (creator, a new
    mc_file column added on start). GET /api/files lists only the caller's
    files, only the uploader may delete one, and a file id in a chat message, a
    session attach or a /v1 request must be a file the caller may read. Files
    uploaded before this version have no creator: they stay readable by id but are
    no longer listed or deletable through the API. Transcription jobs are readable
    only by whoever submitted them.

  • agents: a chat's upload store (session-…) answers only to the chat's
    user. /api/vector-stores and the admin UI's vector-store pages no longer
    list, open, search, fill or delete another user's, and no store can be created
    under a session- name. Ingesting a stored file takes only a file the caller
    may read, and the admin UI's files tab lists and deletes files by the same
    rules as /api/files.

  • agents: the OpenAI Responses API (/v1) runs as the authenticated caller
    instead of the fixed mindconnect.responses.user-id, which is removed (without
    authentication the dev user, MC_DEV_USER, takes its place). Another user's
    response or file answers 404 not_found.

  • agents: the CLI's remote mode authenticates with an API token from
    MC_REMOTE_TOKEN (mindconnect.remote.token) and no longer sends a user id.

  • agents: saving an agent, an LLM config or a vector-store template from a
    form that was opened before someone else saved it is refused instead of
    silently overwriting the other change. Agent definitions, LLM configs and
    templates carry a version that every save raises; the admin UI forms send
    the version they were opened with and answer a stale save with "was changed
    by someone else in the meantime — your changes were not saved", keeping the
    form on screen. Over REST the check is opt-in: send the version you read
    (in the body of POST /api/llm-configs, POST /api/vector-stores/templates,
    PUT /api/agents/{id}) to get 409 Conflict for a stale save; without it a
    save overwrites as before. A new template no longer replaces an existing one
    of the same name, and adding, editing or removing an agent's tool no longer
    drops a tool changed at the same time.

  • agents: AgentSessionRepository has create and update(id, change)
    instead of save. A session is changed in one step on the state the store
    holds, never by writing back a copy read earlier; implementations of the port
    need the two methods.

  • agents: the file persistence keeps a session in one directory,
    data/<namespace>/sessions/<sessionId>/ — session.json, working memory and
    the session's workspace files. Sessions stored under the earlier
    users/<userId>/sessions/ are not read any more; a warning in the log says
    where they are. One process serves a namespace: a second process opening the
    same namespace of the same data directory — the Admin UI while the CLI runs
    in local mode, say — stops at startup with a message saying so.

  • agents: run_agent now tells the model which agents it can actually
    reach — the project's own first, then the caller's roster — instead of
    naming the same three in every prompt. The old description advertised
    web-researcher, file-finder and explorer to every agent, including
    ones whose roster held none of them, and never mentioned a project's own.
    The bundled coding-assistant also gains list_agents, which it was
    missing.

  • agents: an upload's copy for ingestion goes into the session's own
    directory instead of vector-store-uploads/ under the tools base
    directory — the user's home, on most machines.

  • agents: the Admin UI app lets a session work anywhere under the
    user's home by default (mindconnect.tools.working-dir-root set to
    ${user.home} in its yaml, MC_WORKING_DIR_ROOT to override) — it is a
    one-user app on a developer's machine; the users' home stays the default
    root for the API app and for any host that does not set the property.

Removed

  • agents: the mc-agent-tools-gmail module. Gmail is now an MCP server
    registration (bundled, disabled) instead of a tool module of its own; agents
    that used gmail_* tools keep the same names once the registration is
    enabled.

  • agents: the workspace tools are gone — workspace_read, workspace_write,
    workspace_list, their three scopes (session, agent + user, user), the
    WorkspaceStore port with its file, in-memory and Postgres stores, the
    Workspace dialog in the admin UI, GET /api/workspaces/…, and the
    user_notes / user_profile prompt variables the notes provider filled
    from them. A session's working directory and the file tools are where an
    agent reads and writes files now; a newly created agent starts with no
    tools instead of the three. The mc_workspace_file table is left in place
    in an existing Postgres database — drop it by hand when nothing needs the
    files any more. The bundled research-lead answers with its report
    instead of saving report.md.

Fixed

  • agents: a document attached to a chat is ingested again when its
    vector store's embedding config is an alias, as the bundled embeddings
    can be. The alias went to the embeddings endpoint as it was — with no
    model, URL or key — so every upload failed, while testing the config it
    points at succeeded. A failed attachment is now also written to the log;
    until now its reason only showed in the chat's toast.

  • agents: knowing another user's chat session id is no longer enough to
    act in that chat. Most chat endpoints already checked the owner; sending a
    message, regenerating a reply, cancelling a turn, attaching, removing or
    viewing a file, and the turn's live stream (/chat/api/streams/...) did
    not — and a session id travels in URLs and logs. These endpoints now answer
    404 for a session that is not the caller's, and the stream list shows only
    the caller's own turns. Inside a chat, the vector_search, vector_upsert
    and vector_delete_file tools refuse the upload store of any other chat
    session, so the model cannot be talked into reading another user's
    attachments by naming their store.

  • agents: a chat's upload store now belongs to the chat's user, and only
    calls made for that user reach it. The check above applied inside a chat
    only: a workflow started from the workflow admin or
    /api/workflows/{id}/run resolved its tool steps for nobody in particular
    and could read or fill any chat's uploads, and so could a chat model that
    ran such a workflow as a tool; vector_ingest_file did not check at all. A
    workflow run as an agent tool now runs its tool steps for the calling user
    and session, the upload pipeline ingests on behalf of the chat's user, and a
    run outside any chat reaches no chat's store, whatever user it runs as. A sub-agent's vector_search
    without a store searches the uploads of the chat that started it. Upload
    stores from before this change record their owner the next time their chat
    writes to them; until then only that chat reaches them.

  • agents: coming back to the chat no longer lands in a different
    conversation. The chat opened whichever conversation had been started
    last — in another tab, over the REST API — so returning through the
    Chat menu entry, or a page that re-requested /chat, jumped away from
    the one you were working in. It now opens the conversation this browser
    session last had on screen, while it still exists. A conversation started
    elsewhere since then shows up in the chat list at once, marked new until
    you open it.

  • agents: a response reviewer follows its own rules again when the user's
    message is itself an instruction. The reviewer received the user's words as
    its own prompt, so "Antworte exakt mit: Hallo Welt" often made it answer
    "Hallo Welt" instead of reviewing — and a reviewer used as a guard could be
    talked out of its rule by the user it guards against. It is now asked to
    review, with the question and the draft passed as marked material; the
    user_message, agent_response and last_messages template variables are
    unchanged. A reviewer handing the answer back unchanged counts as a pass, not
    as a rewrite.

  • agents: changes to a session no longer overwrite each other. Tool
    activations from parallel tool_search calls, an "allow for this session"
    answered while tools ran, an attached file, a new title — each read the
    session, changed its copy and wrote it back, so whichever came last silently
    dropped what the others had written. The generated title also no longer
    replaces a name the user gave the chat while it was being generated.

  • agents: a message's token count, duration and compressed form no longer
    overwrite each other when they are set at the same time, and deleting the
    newest messages of a conversation no longer hands their sequence numbers to
    the next messages — summaries that covered the deleted range used to claim
    the new messages as well. With the file persistence a history page now reads
    only its own messages and appending lists nothing.

  • agents: two compactions of the same conversation no longer drop each
    other's summary. The file persistence kept all summaries in one
    summaries.json that every save read, extended and rewrote; each summary is
    now its own file under conversations/<id>/summaries/. Summaries in the old
    summaries.json are not read any more.

  • agents: two uploads into the same chat at the same moment register its
    vector store once; each could find the store missing and write its own
    record. The memory vector-store backend no longer blocks a carrier thread
    while a virtual thread waits for a store that is loading, saving or being
    searched.

  • agents: tool calls no longer fail at random when sub-agents run in
    parallel. With the file persistence most stores truncated a file and wrote it
    anew, so a tool task reading the conversation while a sibling task saved a
    message found an empty file and ended with "tool call was interrupted before
    completion: tool task ended FAILED without a result". Every file store now
    writes into a temporary file and moves it into place in one step, and an
    unreadable summaries file is no longer overwritten with just the newest
    summary. A tool task that does fail is logged, and the tool result names the
    reason.

  • agents: the LLM-config form no longer fails with a 500 while a base
    URL for LM Studio is being typed: a host without a scheme is taken as
    http://, and what is not a URL yet reads as an unreachable server in
    the model catalog instead of an exception.

  • agents: switching a chat's model or agent in the Model & tools
    dialog no longer drops the chat's working directory and additional
    directories: the file tools went back to the server's default directory
    after a switch, and the model started searching the wrong tree.

  • agents: bash no longer reports a false timeout for a command that
    prints more than the pipe holds (about 64 KB): the output is drained
    while the command runs instead of after it finished, which it never did
    once the pipe was full.

  • agents: stopping a turn, or a timeout, now ends what a bash command
    started, not just the shell: bash -c "npm run dev" left npm and the
    node server running on their port after the shell was killed.

What's Changed

  • Write every file store atomically by @beisdog in #62
  • Ask a response reviewer to review instead of handing it the user's words by @beisdog in #63
  • MCP servers as registered tools, and tool settings for the catalog by @beisdog in #64
  • Refuse another user's session on every chat endpoint by @beisdog in #65
  • The chat returns to the conversation you were in, and marks chats started elsewhere by @beisdog in #66
  • The upload smoke test opens its chat as the caller by @beisdog in #67
  • Stop resolving MCP registration variables from the process environment by @beisdog in #68
  • Drop two app.css workarounds the framework has since outgrown by @beisdog in #70
  • Reach a chat's upload store only on its user's behalf by @beisdog in #72
  • Close command execution via MCP targets; make MCP failures and re-reads count by @beisdog in #75
  • Secure the REST API with Keycloak JWTs and personal API tokens by @beisdog in #71
  • Serialize file store writes and change stored entities in one step by @beisdog in #73
  • Fix the agents build on main by @beisdog in #76
  • Refuse a save made against a stale version by @beisdog in #77
  • Coding agent support: working directories, code-editing file tools, project instructions and a server profile by @beisdog in #69
  • One section per kind under Unreleased by @beisdog in #78

Full Changelog: v0.7.0...v0.8.0