Skip to content

API Reference parrot.knowledge.wiki.remote_cli

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.knowledge.wiki.remote_cli

View source

Remote-mode plumbing for the wikitoolkit CLI (FEAT-569).

Alias BaseWikiStore

Re-exported from parrot.knowledge.wiki.store.BaseWikiStore.

Alias IngestBatchReport

Re-exported from parrot.knowledge.wiki.tools.IngestBatchReport.

Class RemoteCliError

A remote failure surfaced to the shell with exit code 2.

Alias RemoteWikiClient

Re-exported from parrot.knowledge.wiki.remote.RemoteWikiClient.

Alias RemoteWikiError

Re-exported from parrot.knowledge.wiki.remote.RemoteWikiError.

Alias SourceSlicePayload

Re-exported from parrot.knowledge.wiki.tools.SourceSlicePayload.

Alias SyncReport

Re-exported from parrot.knowledge.wiki.sync.SyncReport.

Alias WikiEffectiveConfig

Re-exported from parrot.knowledge.wiki.project.WikiEffectiveConfig.

Alias WikiRemoteConfig

Re-exported from parrot.knowledge.wiki.project.WikiRemoteConfig.

Function call_remote

Call a remote MCP tool and return its raw result envelope.

call_remote(remote: WikiRemoteConfig, tool: str, arguments: dict[str, Any], *, by: str | None = None) -> dict[str, Any]

Parameter Type Default Description
remote WikiRemoteConfig
tool str
arguments dict[str, Any]
by str | None None

Returns: dict[str, Any]

Function call_remote_text

Call a remote MCP tool and return its rendered text content.

call_remote_text(remote: WikiRemoteConfig, tool: str, arguments: dict[str, Any], *, by: str | None = None) -> str

Parameter Type Default Description
remote WikiRemoteConfig
tool str
arguments dict[str, Any]
by str | None None

Returns: str

Function echo_push_report

Print the aggregated push summary.

echo_push_report(report: IngestBatchReport, url: str) -> None

Parameter Type Default Description
report IngestBatchReport
url str

Function push_slices

Delta-push changed files (file:<rel> slices) through wiki_ingest_batch.

push_slices(client: RemoteWikiClient, store: BaseWikiStore, rel_paths: list[str], *, deleted_rel_paths: tuple[str, ...] = ()) -> IngestBatchReport

Parameter Type Default Description
client RemoteWikiClient
store BaseWikiStore
rel_paths list[str]
deleted_rel_paths tuple[str, ...] ()

Returns: IngestBatchReport

Function push_sources

Delta-push source slices: hash oracle, chunk (200 slices / 1 MiB), one retry per chunk.

push_sources(client: RemoteWikiClient, store: BaseWikiStore, local_sources: dict[str, str], *, deleted_source_ids: tuple[str, ...] = ()) -> IngestBatchReport

Parameter Type Default Description
client RemoteWikiClient
store BaseWikiStore
local_sources dict[str, str]
deleted_source_ids tuple[str, ...] ()

Returns: IngestBatchReport

Function refuse_remote

Reject a local-only command while remote mode is active.

refuse_remote(command: str, hint: str = '') -> NoReturn

Parameter Type Default Description
command str
hint str ''

Returns: NoReturn

Function remote_aware

Resolve remote mode before a command body and refuse unsupported commands.

The optional tool name is retained as command metadata for callers that need it; command implementations pass explicit arguments to the helpers.

remote_aware(*, proxied: bool, tool: str | None = None) -> Callable[[Callable[..., Any]], Callable[..., Any]]

Parameter Type Default Description
proxied bool
tool str | None None

Returns: Callable[[Callable[..., Any]], Callable[..., Any]]

Function remote_client

Build a remote client with the configured or locally derived actor.

remote_client(remote: WikiRemoteConfig, *, by: str | None = None) -> RemoteWikiClient

Parameter Type Default Description
remote WikiRemoteConfig
by str | None None

Returns: RemoteWikiClient

Function remote_or_none

Resolve the repository configuration without opening a wiki store.

remote_or_none(path_: str | None) -> tuple[Path, WikiEffectiveConfig, WikiRemoteConfig | None]

Parameter Type Default Description
path_ str | None

Returns: tuple[Path, WikiEffectiveConfig, WikiRemoteConfig | None]

Alias resolve_remote

Re-exported from parrot.knowledge.wiki.project.resolve_remote.

Function sync_pull_remote

Page through wiki_sync_pull into a staging holder, then merge with last-writer-wins.

sync_pull_remote(client: RemoteWikiClient, local: BaseWikiStore, *, wiki_name: str, include_own: bool, dry_run: bool) -> SyncReport

Parameter Type Default Description
client RemoteWikiClient
local BaseWikiStore
wiki_name str
include_own bool
dry_run bool

Returns: SyncReport

Function sync_push_remote

Send local memory pages and their asserted edges through wiki_sync_push.

The push is chunked (200 pages / 1 MiB per call, the server's caps). Each edge travels with the first chunk holding one of its endpoints, so the server's "edge must touch a pushed page" filter accepts it. A page that alone exceeds the byte budget is not sent and is listed under rejected. Counts are summed over chunks.

sync_push_remote(client: RemoteWikiClient, local: BaseWikiStore) -> dict[str, Any]

Parameter Type Default Description
client RemoteWikiClient
local BaseWikiStore

Returns: dict[str, Any]

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally