Skip to content

v0.7.0

Choose a tag to compare

@rmoya81 rmoya81 released this 04 Dec 22:06
· 38 commits to main since this release
991c4b0

Added

  • Native Windows support, tested in CI on Windows and macOS as well as Linux. On Windows,
    run_shell runs commands in Git Bash when Git for Windows is installed (never WSL's
    bash.exe), and otherwise in PowerShell; the tool description tells the model which
    one, so it writes the right syntax. Before, commands went to cmd.exe, which
    understands neither. Command output is now decoded as UTF-8 on every platform.
  • A standalone quark-windows-x64.exe (built with PyInstaller, no Python needed) is
    attached to every GitHub Release, with its SHA-256, and install.ps1 installs it:
    irm https://raw.githubusercontent.com/rmoya81/Quark/main/install.ps1 | iex.
  • quark --version.
  • spawn_agent's file changes are now merged back into the real workspace automatically
    when it finishes, in a git workspace, instead of being left behind in an isolated
    worktree for the user to merge by hand. A head-to-head benchmark against pi with a
    local model found this the hard way: the side agent did its job correctly, but its
    result stayed isolated, so the main agent kept re-reading unchanged files in a loop
    until the loop detector stopped it — 0 bugs actually fixed. The merge is per file with
    git merge-file (a real 3-way merge against the workspace's HEAD at spawn time as the
    common ancestor), not git apply/git merge, since those refuse when the real
    workspace's working tree doesn't already match its own index — exactly the case here,
    since the main agent keeps working while the side agent runs. A file that doesn't
    apply cleanly (including a genuine conflict between two sequential side agents) is
    left with normal conflict markers instead of silently failing or being dropped.
  • edit_file now accepts edits (a list of old_text/new_text pairs) alongside the
    existing single-pair form, applying them to the same file in one call instead of one
    round trip per change — applied in order and atomically (nothing is written if any one
    of them fails to match). Measured against pi head-to-head on the same task: pi's own
    edit already batches several changes per call, which is most of why it finished in
    about half the turns Quark needed for an equivalent multi-location edit.
  • Full session tree: /clone <name> (also quark sessions clone) copies a session's whole
    active branch into a new, independent one, alongside the existing /fork. Every forked or
    cloned session now records where it came from (parent name, fork vs. clone, and the message
    it branched at), and /tree (also quark sessions tree) prints that lineage across the
    workspace's saved sessions as a tree, with the current one marked.
  • /rewind <messages-back> (also quark sessions rewind): drops a session's last N messages
    in place instead of switching to a new one, saving them first as <name>-abandoned (so
    nothing's lost — /tree shows it) and, in quark tui/quark chat, asking the model for a
    one-line summary of what that abandoned attempt was doing.
  • A plugin can now register a provider or an MCP server, not just tools: Plugin.providers()
    returns a {name: factory} map, making name selectable with --provider, where factory
    takes (api_key, model, base_url) the same way get_provider()'s built-ins do — a plugin
    provider manages its own credentials (same pattern as BedrockProvider), so it's never
    asked for a Quark-managed key. Plugin.mcp_servers() returns extra mcpServers-shaped
    entries, started by load_mcp()'s new extra_servers param; the user's own mcp.json
    always wins a name collision. Both run while plugins load, in cli.build_agent(), before
    the provider is built — plugins are now loaded once, early, and passed into
    default_registry(plugins=...) instead of being imported a second time. --provider no
    longer restricts its choices to the built-in names, since a plugin's name isn't known
    until after plugins load.
  • quark plugin install <source>: fetches a plugin instead of writing one from scratch — a
    local *.py file, an http(s) URL to one, or a git repo (#path/to/plugin.py to disambiguate
    one that doesn't have exactly one *.py at its root). Validated with load_plugin() before
    being kept; a source that doesn't define a working PLUGIN is removed again, not left
    half-installed.
  • Two intercepting plugin hooks, for when the observation-only ones below aren't enough:
    Plugin.before_tool_call(name, arguments) can return {"arguments": {...}} to rewrite a
    tool call before it runs, or {"block": True, "reason": "..."} to stop it from running at
    all; Plugin.before_request(messages, tools, system) can override any of those three before
    they're sent to the provider. Both no-ops by default; run_before_tool_call_hooks()/
    run_before_request_hooks() chain multiple plugins (each sees the previous one's override)
    and isolate a broken plugin's exception the same way fire_hook() does.
  • Plugins can now observe a turn as it happens, not just contribute tools or system-prompt
    text: four optional lifecycle hooks on Plugin — on_turn_start(session)/
    on_turn_end(session, result) around each Agent.step() call, and
    on_tool_call(name, arguments)/on_tool_result(name, arguments, output) around each tool
    run inside it. All no-ops by default (existing plugins unaffected); observation only, a hook
    can't change, cancel or replace what's happening. fire_hook(plugins, hook_name, *args, **kwargs) calls a named hook on every plugin, each in its own try/except, matching the
    existing tools_from_plugins()/system_prompt_from_plugins() error-isolation style.
  • Plugins can now add to the agent's system prompt, not just contribute tools:
    Plugin.system_prompt(self, workspace) -> str | None (optional, additive — existing
    plugins with only tools() are unaffected). load_plugins()/tools_from_plugins()
    split out of build_plugin_tools() (still there, as a shorthand) so a caller can get
    at the loaded Plugin instances; default_registry()'s result now exposes them as
    registry.plugins.
  • 3 more providers: --provider huggingface (Hugging Face's Inference Providers router,
    HUGGINGFACE_API_KEY) and --provider moonshot (Moonshot AI's Kimi models,
    MOONSHOT_API_KEY) are both the same OpenAIProvider-with-base_url pattern as the other
    OpenAI-compatible providers; --provider cloudflare (Cloudflare Workers AI, CLOUDFLARE_API_KEY)
    is the same pattern too but, like custom, needs --base-url (its URL encodes your Cloudflare
    account id, so there's no single default endpoint). 19 providers now.
  • --progressive-tools now groups its unlockable tools by topic (files, web, and —
    when enabled — shell, agents, skills, plugins) instead of one flat
    request_more_tools escape hatch for mutating file tools alone. The new request_tools(topic)
    tool's description is the index: one line per topic, naming its tools and when to use them,
    so the model sees what exists without paying for every tool's full schema upfront. A topic's
    tools are also built lazily — a plugin isn't imported, a skill isn't read from disk — until its
    topic is actually unlocked. Real (tiktoken) baseline cost: 529 tokens (system prompt + 4
    tools) vs. 832 for loading everything upfront; unlocking one topic (e.g. files) converges
    back to the same cost as having loaded it directly, never more.
  • AWS Bedrock (--provider bedrock) and Vertex AI (--provider vertex) providers. Both reach
    what those platforms need without actually needing their heavy SDKs (boto3, google-auth):
    Bedrock is called over HTTPS with a from-scratch AWS SigV4 signer (hmac/hashlib only)
    against its Converse API, including the vnd.amazon.eventstream streaming format decoded by
    hand; Vertex reuses AnthropicProvider almost unchanged, since its Anthropic passthrough
    endpoint accepts the same request shape as Anthropic's native API, authenticating with a
    bearer token the user refreshes themselves (gcloud auth application-default print-access-token) instead of pulling in a token-refreshing SDK. 16 providers now.
  • Azure OpenAI (--provider azure, its own AzureOpenAIProvider — different auth header and
    URL shape than plain OpenAI, so not just a base_url swap) and --provider custom (an
    OpenAIProvider alias with no default endpoint, for any other OpenAI-compatible server —
    already possible via --provider openai --base-url, now with a clearer name and no default to
    accidentally fall back to). 14 providers built in now.
  • 7 more providers, all the same OpenAIProvider pointed at that service's own OpenAI-compatible
    endpoint — no new provider code: --provider mistral, groq, xai, deepseek, fireworks,
    together, cerebras (MISTRAL_API_KEY, GROQ_API_KEY, XAI_API_KEY, DEEPSEEK_API_KEY,
    FIREWORKS_API_KEY, TOGETHER_API_KEY, CEREBRAS_API_KEY). 12 providers built in now. Offered
    in quark init's provider picker too.
  • Documentation site redesign: a real landing page (hero, feature cards, a GIF of the actual
    terminal UI) instead of the README dumped as one long page, split into separate
    Getting started / Configuration & tools / Architecture & development pages (still sourced from
    the README via snippets, so there's still one copy to maintain), plus an original logo/favicon,
    a deep-purple palette, and light/dark mode (already built into Material, now themed).
  • scripts/record_demo.py: renders real screenshots and a GIF of quark tui without a live LLM
    provider — drives the actual app with Textual's headless pilot and a scripted fake provider, so
    the UI, agent loop and run_shell call are all genuine, only the model's replies are canned.
    Needs Playwright's Chromium (already used for nothing else in this project) to convert the
    SVG screenshots it captures into PNGs/GIF.

Changed

  • The default system prompt now asks the model to work in as few turns as possible: issue
    every independent tool call at once (unrelated reads, edits to different files), trust file
    paths the user already gave instead of re-listing directories, and verify once near the end
    rather than after every small change. With --progressive-tools, it also asks for every tool
    topic the task obviously needs in the first response instead of unlocking them one round trip
    at a time. Together with multi-edit edit_file and the spawn_agent merge-back above, this
    took Quark from roughly even with pi to 17-39% fewer turns on simple bug-fixing tasks, with a
    local and a cloud model alike (same tests passing on both sides).
  • search now always reports paths inside the workspace with /, also on Windows, so they can
    be passed straight back to the other tools. Paths outside it (read_dirs) stay native.
  • The test suite runs in CI on macOS and Windows as well as Linux (Python 3.10-3.12 on each),
    and the release workflow also builds quark-windows-x64.exe from the new tag, checks that it
    runs and that install.ps1 installs it, and attaches it to the Release.