Skip to main content

jusi-acp

jusi-acp is the shared Agent Client Protocol family for Jusi 1.0. It gives independently installed ACP agent providers one %%acp notebook experience: structured VisiData events, durable follow-ups, exact cancellation, permission choices, client-owned command execution, session controls, completion, and editor-native copy/open/diff actions.

This package is a family library, not an exact provider. Installing it alone does not add a Jusi catalog entry. An exact package such as a future jusi-gigacode depends on jusi-acp and supplies its own catalog entry, attesting kernel module, launch validation, and worker factory.

Configuration

Jusi loads ~/.jusi/jusi.toml at the kernel target. ACP uses the standard [magic.alias] layout:

[acp.work]
provider = "gigacode"
path = "/work/project"
additional_directories = ["../shared"]
model = "provider-owned-model-name"

provider, path, additional_directories, and mcp_servers are common family keys. The selected exact provider validates the complete table and owns the remaining keys. Configuration is frozen for one notebook runtime; use a full Jusi restart to reload it.

%%acp work
Inspect the project and implement the requested change.

Resume syntax is explicit:

%%acp work --load SESSION_ID
Continue after replaying agent history.
%%acp work --resume SESSION_ID
Continue without requesting history replay.

Exact provider integration

The exact package advertises the shared claim and wraps its identity around the family kernel adapter:

# catalog.py
from jusi_acp import family_claim

def catalog_entry():
    return {
        "plugin_id": "gigacode",
        "plugin_version": __version__,
        "distribution": "jusi-gigacode",
        "families": [family_claim()],
        "kernel_extensions": ["jusi_gigacode.kernel"],
        "worker_entry_point": "jusi_gigacode.worker:create_worker",
        "media_types": ["text/x-ansi"],
        "interaction": "terminal_interactive",
    }
# kernel.py
from jusi_acp import KernelProviderAdapter

_adapter = KernelProviderAdapter("gigacode", __version__)
jusi_kernel_adapter_v1 = _adapter.manifest
configure_jusi_runtime_v1 = _adapter.configure
load_ipython_extension = _adapter.load_ipython_extension
# worker.py
from pathlib import Path
from jusi_acp import ACPWorker, AgentLaunch, ProviderSpec

def resolve_launch(config, cwd: Path):
    return AgentLaunch(("gigacode", "--acp"), cwd)

PROVIDER = ProviderSpec("gigacode", __version__, resolve_launch)

def create_worker(context):
    return ACPWorker(context, PROVIDER)

The provider must use the same ID and version in its catalog, kernel adapter, and ProviderSpec. It must not register %%acp itself or store live sessions globally.

Shared behavior

  • ACP v1 over the official Python SDK.
  • Python 3.10 or newer.
  • execute, followup, complete, interrupt, and editor_actions for every exact provider claiming the family.
  • Markdown syntax and indentation in ACP prompt cells.
  • ACP terminal methods run bounded, non-interactive subprocesses at the target.
  • ACP filesystem, elicitation, and terminal-auth capabilities are not advertised in the initial release.
  • Agent-driven authentication is available through /auth METHOD_ID or an exact provider's configured AgentLaunch.auth_method.
  • /mode ID, /config ID VALUE, and /cancel are family commands.
  • Initial bodies and later follow-ups use the same family-command dispatcher.
  • ACP available_commands_update entries appear in completion and in the event sheet with their descriptions and optional free-text input hints. Invoking an advertised slash command sends its complete text as a regular ACP prompt; command-specific behavior and output remain agent-owned.
  • Diff content opens through Jusi's acknowledged, remote-safe read-only diff action.
  • ACP remains authoritative for conversation context. The family stores a normalized read-only presentation cache so resume-only sessions retain useful review history.
  • The live event view groups adjacent assistant and thought chunks, consolidates tool updates by call ID, and updates terminal output in place while retaining every raw ACP update in the durable journal.
  • Completed prompts appear as one row each in a turns sheet. Enter opens that turn's grouped event view; turn completion returns focus to the summary.

The first turn begins inside the terminal application after Jusi creates the client. It is cancellable with the application's c command or /cancel, but is not published as a Jusi client operation. Later follow-ups are exact Jusi operations and support :JusiInterrupt without closing the session.

Development

python3.12 -m venv .venv
.venv/bin/pip install -e '.[dev]'
.venv/bin/pytest

The notebook follow-up integration test uses a sibling jusi frontend checkout, or the path supplied in JUSI_NVIM_ROOT, together with the installed Python backend. It edits notebook cells through Neovim and checks the real serialized follow-up lane, answer history, and same-client reuse.

Turn review and questions

The turns sheet records the model ID reported by the agent, from either model configuration or older ACP session model metadata. It stays blank when the agent does not report a model; it is not inferred from the executable name. Tool events show the tool name/kind, command, and raw input when supplied. Enter opens the full event details (or the existing diff view).

Qwen/GigaCode question requests carried in rawInput.questions pause the agent and show the current question and choices in a read-only view. Type your answer in the notebook cell in Vim and submit it using the usual Jusi follow-up action. Each follow-up answers one question. Write the option label (available in cell completion) or any free-form, multiline answer; text and whitespace are preserved. For multiple-choice questions, describe all your choices in the answer. An empty answer is rejected without advancing to the next question.

When a question arrives, the current Jusi operation returns successfully with status: awaiting_answer, freeing the follow-up lane while keeping the ACP request pending. After the last answer, that same ACP turn resumes, and the answer follow-up stays active until the turn finishes or asks another question. Answers remain in the original turn's event history and in normal Jusi follow-up history; they never become separate agent prompts. Once the turn finishes, the next follow-up starts a new prompt as usual.

Submit /cancel from the cell to cancel a waiting turn, including any partially answered question set. Closing the question view just hides it; it does not answer or cancel anything. While waiting, all other cell text is an answer, including slash-prefixed text. During resumed work, use :JusiInterrupt as usual. While waiting for input there is no active Jusi operation to interrupt, so use /cancel (or c in the question view). No text entry in VisiData is required.

Ordinary tool permission requests retain their approval choices, with d exposing the full request payload. Questions use the Qwen permission extension, not generic ACP elicitation.

ACP UI updates run from the drawing thread with a bounded curses polling interval, including while the terminal has no focus. SDK logging goes to event diagnostics and VisiData's Ctrl-E error history. Agent stderr appears as labelled diagnostic events, including during authentication. Browser launcher environment variables are preserved, and provider environment overrides take precedence.

Metadata

Release files for jusi-acp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jusi-acp 0.1.0
File Size Uploaded
jusi_acp-0.1.0.tar.gz 40.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jusi-acp 0.1.0
File Interpreter ABI Platform
jusi_acp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 74.3 kB

Release files / jusi_acp-0.1.0.tar.gz

Download URL jusi_acp-0.1.0.tar.gz
Size 40.3 kB
Tags Source
SHA-256 checksum
How to use checksums
41a2d521dec2ccda4e22aab9da8dda1b16f4a60cba0e119e91c01a7bff17e63e
BLAKE2b-256 checksum
How to use checksums
7ca17b39940e72380fe602fec4514a7220845e024e3da8839c299e07b6aca680
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / jusi_acp-0.1.0-py3-none-any.whl

Download URL jusi_acp-0.1.0-py3-none-any.whl
Size 34.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e17e0289518e976d5ec796dd69cf429c8070cc6bb998ea8d8249f97a7c462f53
BLAKE2b-256 checksum
How to use checksums
4ce770ad80007168f33ebb11b1c0f2cedc4808fa6e11c0ef85a5a19c7279cdd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page