ocuclaw 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -0
- package/dist/config/runtime-config.js +165 -0
- package/dist/domain/activity-status-adapter.js +1041 -0
- package/dist/domain/conversation-state.js +516 -0
- package/dist/domain/debug-store.js +700 -0
- package/dist/domain/message-emoji-filter.js +249 -0
- package/dist/domain/readability-system-prompt.js +17 -0
- package/dist/even-ai/even-ai-endpoint.js +938 -0
- package/dist/even-ai/even-ai-model-hook.js +80 -0
- package/dist/even-ai/even-ai-router.js +98 -0
- package/dist/even-ai/even-ai-run-waiter.js +265 -0
- package/dist/even-ai/even-ai-settings-store.js +365 -0
- package/dist/gateway/gateway-bridge.js +175 -0
- package/dist/gateway/openclaw-client.js +1570 -0
- package/dist/index.js +38 -0
- package/dist/runtime/downstream-handler.js +2747 -0
- package/dist/runtime/downstream-server.js +1565 -0
- package/dist/runtime/ocuclaw-settings-store.js +237 -0
- package/dist/runtime/protocol-adapter.js +378 -0
- package/dist/runtime/relay-core.js +1977 -0
- package/dist/runtime/relay-service.js +146 -0
- package/dist/runtime/session-service.js +1026 -0
- package/dist/runtime/upstream-runtime.js +931 -0
- package/openclaw.plugin.json +95 -0
- package/package.json +36 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createOcuClawRelayService } from "./runtime/relay-service.js";
|
|
2
|
+
import { createEvenAiModelHook } from "./even-ai/even-ai-model-hook.js";
|
|
3
|
+
|
|
4
|
+
export default function register(api) {
|
|
5
|
+
if (!api || typeof api.registerService !== "function") {
|
|
6
|
+
throw new Error("OcuClaw plugin requires api.registerService()");
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const service = createOcuClawRelayService({
|
|
10
|
+
logger: api.logger,
|
|
11
|
+
pluginConfig: api.pluginConfig,
|
|
12
|
+
openclawConfig: api.config,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
if (typeof api.on === "function") {
|
|
16
|
+
api.on(
|
|
17
|
+
"before_model_resolve",
|
|
18
|
+
createEvenAiModelHook({
|
|
19
|
+
getSettingsSnapshot() {
|
|
20
|
+
return service.getEvenAiSettingsSnapshot();
|
|
21
|
+
},
|
|
22
|
+
getDedicatedSessionKey() {
|
|
23
|
+
return service.getRuntimeConfig().evenAiDedicatedSessionKey;
|
|
24
|
+
},
|
|
25
|
+
}),
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
api.registerService({
|
|
30
|
+
id: "ocuclaw-relay",
|
|
31
|
+
start: (ctx) =>
|
|
32
|
+
service.start({
|
|
33
|
+
logger: ctx && ctx.logger,
|
|
34
|
+
stateDir: ctx && ctx.stateDir,
|
|
35
|
+
}),
|
|
36
|
+
stop: (ctx) => service.stop({ logger: ctx && ctx.logger }),
|
|
37
|
+
});
|
|
38
|
+
}
|