mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-23 17:52:49 +00:00
* feat(plugins): expose agent and workspace lifecycle hooks * test(plugins): verify lifecycle examples with version requirements * fix(plugins): publish archive hooks for closed agents * test(plugins): remove diagnostic catch from lifecycle test * refactor(plugins): define hook handlers in lifecycle module
31 lines
723 B
TypeScript
31 lines
723 B
TypeScript
import type { PluginServerContext } from "@getpaseo/plugin";
|
|
|
|
export default function contribute(server: PluginServerContext) {
|
|
server.before("agent.create", ({ request }) => {
|
|
if (request.config.provider !== "codex") {
|
|
return request;
|
|
}
|
|
|
|
return {
|
|
...request,
|
|
config: {
|
|
...request.config,
|
|
providerOptions: {
|
|
...request.config.providerOptions,
|
|
sandbox_mode: "workspace-write",
|
|
approval_policy: "on-request",
|
|
},
|
|
mcpServers: {
|
|
...request.config.mcpServers,
|
|
company: {
|
|
type: "http",
|
|
url: "https://tools.example.com/mcp",
|
|
},
|
|
},
|
|
},
|
|
};
|
|
});
|
|
|
|
return () => {};
|
|
}
|