[codex] Add history source plugin imports#19
Closed
luca-ctx wants to merge 2 commits into
Closed
Conversation
Contributor
Author
|
Closing per maintainer request. Current mainline work has moved past this draft plugin import approach. |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds local history-source plugin support for custom agent histories on top of the
ctx-history-jsonl-v1import format.This PR now includes both halves of the intended product shape:
ctx import --history-source,--plugin,--history-source-manifest, andctx import --all;enabled: trueandrefresh: auto.A plugin is a local manifest plus a command-line exporter. ctx passes the previous cursor through the runtime environment, reads
ctx-history-jsonl-v1JSONL from stdout, validates source identity/machine identity/schema, imports/indexes the records, and stores the updated cursor.Search Refresh Behavior
ctx searchkeeps the existing refresh contract:--refresh autobest-effort refreshes native sources and enabled auto plugin sources, then serves existing results if refresh fails;--refresh strictfails if native/plugin refresh fails;--refresh offnever runs provider imports or plugin commands;--provider codexdo not execute custom plugin commands;--provider customcan refresh enabled auto plugin sources.Plugin execution remains local-command based, not a plugin store or in-process ABI. Third parties can ship their own bridge CLI/script, and users can install it into ctx's plugin discovery paths.
Guardrails
ctx setupandctx sourcesdo not execute plugin commands.Docs
Updated docs describe the custom history source model, the manifest + exporter contract, search-time refresh behavior, and adapter shapes for DorkOS, OpenClaw, Hermes, and NanoClaw.
Validation
cargo fmt --all --checkcargo check -p ctxcargo test -p ctx --test clicargo test -p ctx-history-capturecargo test -p ctx history_source_pluginscargo test -p ctx --test cli search_refresh_strict_times_out_when_plugin_helper_keeps_stdout_opengit diff --check