Skip to content

Commit 8c02521

Browse files
committed
docs: document active memory admin alibaba plugins
1 parent bac84c5 commit 8c02521

7 files changed

Lines changed: 34 additions & 0 deletions

File tree

extensions/active-memory/doctor-contract-api.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* Doctor migration contract for Active Memory state. It moves legacy per-session
3+
* toggle JSON into the plugin state keyed store used by current runtimes.
4+
*/
15
import crypto from "node:crypto";
26
import fs from "node:fs/promises";
37
import path from "node:path";
@@ -81,6 +85,7 @@ async function archiveLegacySource(params: {
8185
}
8286
}
8387

88+
/** State migrations exposed to OpenClaw doctor for Active Memory. */
8489
export const stateMigrations: PluginDoctorStateMigration[] = [
8590
{
8691
id: "active-memory-session-toggles-json-to-plugin-state",

extensions/active-memory/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* Active Memory plugin entry and runtime implementation. It recalls recent
3+
* memory context through configured agents and injects bounded context snippets.
4+
*/
15
import crypto from "node:crypto";
26
import fsSync from "node:fs";
37
import fs from "node:fs/promises";
@@ -2861,6 +2865,7 @@ async function maybeResolveActiveRecall(params: {
28612865
}
28622866
}
28632867

2868+
/** Plugin entry registering Active Memory hooks, tools, config schema, and doctor cleanup. */
28642869
export default definePluginEntry({
28652870
id: "active-memory",
28662871
name: "Active Memory",

extensions/admin-http-rpc/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* Admin HTTP RPC plugin entry. It exposes a trusted gateway-authenticated HTTP
3+
* endpoint for the explicit admin method allowlist.
4+
*/
15
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
26
import { handleAdminHttpRpcRequest } from "./src/handler.js";
37

extensions/admin-http-rpc/src/handler.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* HTTP handler for the Admin RPC endpoint. It validates JSON requests, enforces
3+
* the method allowlist, dispatches gateway methods, and maps errors to HTTP.
4+
*/
15
import { randomUUID } from "node:crypto";
26
import type { IncomingMessage, ServerResponse } from "node:http";
37
import { dispatchGatewayMethod } from "openclaw/plugin-sdk/gateway-method-runtime";
@@ -184,6 +188,7 @@ async function dispatchAdminRpc(request: ParsedRequest): Promise<RpcResponse> {
184188
}
185189
}
186190

191+
/** Handle one gateway-authenticated Admin HTTP RPC request. */
187192
export async function handleAdminHttpRpcRequest(
188193
req: IncomingMessage,
189194
res: ServerResponse,

extensions/admin-http-rpc/src/methods.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* Method allowlist for Admin HTTP RPC. Only methods listed here can cross the
3+
* trusted operator HTTP surface.
4+
*/
15
const ADMIN_HTTP_RPC_ALLOWED_METHOD_GROUPS = {
26
gateway: [
37
"health",
@@ -54,10 +58,12 @@ const ADMIN_HTTP_RPC_ALLOWED_METHODS: ReadonlySet<string> = new Set(
5458
Object.values(ADMIN_HTTP_RPC_ALLOWED_METHOD_GROUPS).flat(),
5559
);
5660

61+
/** Return whether an admin RPC method is exposed over HTTP. */
5762
export function isAdminHttpRpcAllowedMethod(method: string): boolean {
5863
return ADMIN_HTTP_RPC_ALLOWED_METHODS.has(method);
5964
}
6065

66+
/** List all admin RPC methods exposed over HTTP. */
6167
export function listAdminHttpRpcAllowedMethods(): string[] {
6268
return Array.from(ADMIN_HTTP_RPC_ALLOWED_METHODS);
6369
}

extensions/alibaba/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* Alibaba Model Studio plugin entry. Registers the DashScope-backed video
3+
* generation provider.
4+
*/
15
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
26
import { buildAlibabaVideoGenerationProvider } from "./video-generation-provider.js";
37

extensions/alibaba/video-generation-provider.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* Alibaba Model Studio video provider adapter. It resolves DashScope auth and
3+
* HTTP policy before delegating task polling to the shared video helper.
4+
*/
15
import { isProviderApiKeyConfigured } from "openclaw/plugin-sdk/provider-auth";
26
import { resolveApiKeyForProvider } from "openclaw/plugin-sdk/provider-auth-runtime";
37
import { resolveProviderHttpRequestConfig } from "openclaw/plugin-sdk/provider-http";
@@ -25,6 +29,7 @@ function resolveDashscopeAigcApiBaseUrl(baseUrl: string): string {
2529
return baseUrl.replace(/\/+$/u, "");
2630
}
2731

32+
/** Build the Alibaba/DashScope video generation provider descriptor. */
2833
export function buildAlibabaVideoGenerationProvider(): VideoGenerationProvider {
2934
return {
3035
id: "alibaba",

0 commit comments

Comments
 (0)