mirror of
http://192.168.0.88:13333/lywsvip/openclaw-zero-token.git
synced 2026-06-18 10:52:45 +08:00
Major upgrade from e26988a38 to upstream v2026.3.28 (f9b107928).
Key changes:
- Upstream src/, ui/, extensions/ (89 bundled extensions)
- Zero-token web providers preserved in src/zero-token/
- AskOnce plugin restored and registered as CLI command
- Added missing packages: @anthropic-ai/vertex-sdk, @modelcontextprotocol/sdk
- Fixed tsconfig rootDir, skipLibCheck for plugin-sdk DTS build
- Added askonce to bundled plugin metadata and package.json exports
- Fixed AskOnce CLI command registration (missing commands metadata)
- Restored AskOnce adapter imports (correct 5-level relative paths)
- Removed stale migration artifacts from root directory
39 lines
1.4 KiB
TypeScript
39 lines
1.4 KiB
TypeScript
import pluginSdkEntryList from "../../scripts/lib/plugin-sdk-entrypoints.json" with { type: "json" };
|
|
|
|
export const pluginSdkEntrypoints = [...pluginSdkEntryList];
|
|
|
|
export const pluginSdkSubpaths = pluginSdkEntrypoints.filter((entry) => entry !== "index");
|
|
|
|
/** Map every SDK entrypoint name to its source file path inside the repo. */
|
|
export function buildPluginSdkEntrySources(entries: readonly string[] = pluginSdkEntrypoints) {
|
|
return Object.fromEntries(entries.map((entry) => [entry, `src/plugin-sdk/${entry}.ts`]));
|
|
}
|
|
|
|
/** List the public package specifiers that should resolve to plugin SDK entrypoints. */
|
|
export function buildPluginSdkSpecifiers() {
|
|
return pluginSdkEntrypoints.map((entry) =>
|
|
entry === "index" ? "openclaw/plugin-sdk" : `openclaw/plugin-sdk/${entry}`,
|
|
);
|
|
}
|
|
|
|
/** Build the package.json exports map for all plugin SDK subpaths. */
|
|
export function buildPluginSdkPackageExports() {
|
|
return Object.fromEntries(
|
|
pluginSdkEntrypoints.map((entry) => [
|
|
entry === "index" ? "./plugin-sdk" : `./plugin-sdk/${entry}`,
|
|
{
|
|
types: `./dist/plugin-sdk/${entry}.d.ts`,
|
|
default: `./dist/plugin-sdk/${entry}.js`,
|
|
},
|
|
]),
|
|
);
|
|
}
|
|
|
|
/** List the dist artifacts expected for every generated plugin SDK entrypoint. */
|
|
export function listPluginSdkDistArtifacts() {
|
|
return pluginSdkEntrypoints.flatMap((entry) => [
|
|
`dist/plugin-sdk/${entry}.js`,
|
|
`dist/plugin-sdk/${entry}.d.ts`,
|
|
]);
|
|
}
|