- Migrate src/ → plugin/ (plugin/core/, plugin/web/, plugin/commands/)
and src/mcp/ → services/ per OpenClaw plugin dev spec
- Add Gemini CLI backend (plugin/core/gemini/sdk-adapter.ts) with GEMINI.md
system-prompt injection
- Inject bootstrap as stateless system prompt on every turn instead of
first turn only: Claude via --system-prompt, Gemini via workspace/GEMINI.md;
eliminates isFirstTurn branch, keeps skills in sync with OpenClaw snapshots
- Fix session-map-store defensive parsing (sessions ?? []) to handle bare {}
reset files without crashing on .find()
- Add docs/TEST_FLOW.md with E2E test scenarios and expected outcomes
- Add docs/claude/BRIDGE_MODEL_FINDINGS.md with contractor-probe results
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
21 lines
601 B
TypeScript
21 lines
601 B
TypeScript
import { execFileSync } from "node:child_process";
|
|
|
|
export type AddBaseAgentInput = {
|
|
agentId: string;
|
|
workspace: string;
|
|
bridgeModel: string;
|
|
};
|
|
|
|
/**
|
|
* Create the base OpenClaw agent using the `openclaw agents add` CLI.
|
|
* This sets up routing and workspace; contractor metadata is written separately.
|
|
*/
|
|
export function createBaseAgent(input: AddBaseAgentInput): void {
|
|
const { agentId, workspace, bridgeModel } = input;
|
|
execFileSync(
|
|
"openclaw",
|
|
["agents", "add", agentId, "--workspace", workspace, "--model", bridgeModel, "--non-interactive"],
|
|
{ stdio: "inherit" },
|
|
);
|
|
}
|