mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 12:00:24 +00:00
docs(agents): tighten provider boundary guidance
This commit is contained in:
@@ -36,6 +36,21 @@ third-party plugins see.
|
||||
matching `src/plugin-sdk/<id>.ts` facade.
|
||||
- If core or core tests need a bundled plugin helper, export it from `api.ts`
|
||||
first instead of letting them deep-import extension internals.
|
||||
- For provider plugins, keep auth, onboarding, catalog selection, and
|
||||
vendor-only product behavior local to the plugin. Do not move those into
|
||||
core just because two providers look similar.
|
||||
- Before adding a new provider-local `wrapStreamFn`, `buildReplayPolicy`,
|
||||
`normalizeToolSchemas`, `inspectToolSchemas`, or compat patch helper, check
|
||||
whether the same behavior already exists through `openclaw/plugin-sdk/*`.
|
||||
Reuse shared family helpers first.
|
||||
- If two bundled providers share the same replay policy shape, tool-schema
|
||||
compat rewrite, payload patch, or stream-wrapper chain, stop copying the
|
||||
logic. Extract one shared helper and migrate both call sites in the same
|
||||
change.
|
||||
- Prefer named provider-family helpers over repeating raw option bags. If a
|
||||
provider needs OpenAI-style Anthropic tool payload compat, Gemini schema
|
||||
cleanup, or an XAI compat patch, use a named shared helper instead of
|
||||
inlining the policy knobs again.
|
||||
|
||||
## Expanding The Boundary
|
||||
|
||||
|
||||
Reference in New Issue
Block a user