mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-03 02:41:36 +00:00
* feat(plugins): mirror local coding sessions to a remote Beam receiver * fix(plugins): satisfy static gates for the Beam mirror seam * fix(plugins): import the config type from the narrow contracts subpath * fix(plugins): require catalog consent and loopback-only plaintext for the Beam mirror
26 lines
952 B
TypeScript
26 lines
952 B
TypeScript
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
import { createBeamRequestHandler } from "./src/http.js";
|
|
import { createBeamMirrorService } from "./src/mirror.js";
|
|
import { createBeamSessionCatalog } from "./src/session-catalog.js";
|
|
import { createBeamStore } from "./src/store.js";
|
|
|
|
export default definePluginEntry({
|
|
id: "beam",
|
|
name: "Beam",
|
|
description: "Receive redacted local coding sessions as a read-only catalog",
|
|
register(api) {
|
|
const store = createBeamStore(api.runtime);
|
|
api.registerSessionCatalog(createBeamSessionCatalog(store));
|
|
api.registerHttpRoute({
|
|
path: "/api/v1/beam/sessions",
|
|
auth: "gateway",
|
|
match: "exact",
|
|
handler: createBeamRequestHandler({
|
|
store,
|
|
resolveControlUiBasePath: () => api.runtime.config.current().gateway?.controlUi?.basePath,
|
|
}),
|
|
});
|
|
api.registerService(createBeamMirrorService({ runtime: api.runtime }));
|
|
},
|
|
});
|