Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 2.3 KB

README.md

File metadata and controls

45 lines (32 loc) · 2.3 KB

repo-info Native Tool Plugin

repo-info is a small read-only first-party Native Tool Plugin used to dogfood WebCodex's TypeScript Plugin SDK and authoring workflow. It exposes exactly one tool, git_summary, which observes the Git repository selected by the provider's configured cwd.

This repository copy was initially created with webcodex plugin init plugins/repo-info --id repo-info, then switched from the scaffold's published SDK dependency to file:../../npm/plugin-sdk so repository CI always tests the current checkout without depending on npm registry availability. External projects generated by plugin init continue to use the exact published @yyjeqhc/webcodex-plugin-sdk@0.1.0 package.

Install, build, and test

npm ci
npm run typecheck
npm run build
npm test

Node.js 18 or newer is required. Production execution uses the compiled ESM dist/plugin.js.

Configure one Runner

Build the Plugin, then add a provider entry to the target Runner's startup-bound runner.toml:

[[plugins.providers]]
id = "repo-info"
name = "Repo Info"
command = "node"
args = ["/absolute/path/to/webcodex/plugins/repo-info/dist/plugin.js"]
cwd = "/absolute/path/to/repository"
timeout_secs = 30

cwd is the repository being observed. It is the authority boundary for git_summary; it is intentionally not the Plugin source directory unless that is the repository you want to inspect. The tool accepts no path argument and never performs project/Runner/path discovery.

git_summary uses only bounded local Git observations with git --no-optional-locks. It does not fetch, pull, checkout, reset, add, commit, modify Git configuration, contact remotes, or return the absolute cwd, environment, credentials, remote URLs, or Git configuration. Oversized status output is reported explicitly instead of being silently truncated.

Author loop

webcodex plugin check --runner <runner> --plugin repo-info
webcodex plugin reload --runner <runner>
webcodex plugin list --runner <runner> --plugin repo-info
webcodex plugin describe --runner <runner> --plugin repo-info --tool git_summary

Invocation remains on the canonical existing plugin_tool describe -> call path; there is intentionally no webcodex plugin call command. This Plugin is an authoring/dogfood example, not a built-in Git replacement.