Plugins: internalize more extension SDK imports
This commit is contained in:
parent
4b2aec622b
commit
0f56b16d47
1
extensions/device-pair/api.ts
Normal file
1
extensions/device-pair/api.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from "openclaw/plugin-sdk/device-pair";
|
||||
@ -1,4 +1,5 @@
|
||||
import os from "node:os";
|
||||
import qrcode from "qrcode-terminal";
|
||||
import {
|
||||
approveDevicePairing,
|
||||
definePluginEntry,
|
||||
@ -8,8 +9,7 @@ import {
|
||||
runPluginCommandWithTimeout,
|
||||
resolveTailnetHostWithRunner,
|
||||
type OpenClawPluginApi,
|
||||
} from "openclaw/plugin-sdk/device-pair";
|
||||
import qrcode from "qrcode-terminal";
|
||||
} from "./api.js";
|
||||
import {
|
||||
armPairNotifyOnce,
|
||||
formatPendingRequests,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { promises as fs } from "node:fs";
|
||||
import path from "node:path";
|
||||
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/device-pair";
|
||||
import { listDevicePairing } from "openclaw/plugin-sdk/device-pair";
|
||||
import type { OpenClawPluginApi } from "./api.js";
|
||||
import { listDevicePairing } from "./api.js";
|
||||
|
||||
const NOTIFY_STATE_FILE = "device-pair-notify.json";
|
||||
const NOTIFY_POLL_INTERVAL_MS = 10_000;
|
||||
|
||||
1
extensions/llm-task/api.ts
Normal file
1
extensions/llm-task/api.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from "openclaw/plugin-sdk/llm-task";
|
||||
@ -1,8 +1,4 @@
|
||||
import {
|
||||
definePluginEntry,
|
||||
type AnyAgentTool,
|
||||
type OpenClawPluginApi,
|
||||
} from "openclaw/plugin-sdk/llm-task";
|
||||
import { definePluginEntry, type AnyAgentTool, type OpenClawPluginApi } from "./api.js";
|
||||
import { createLlmTaskTool } from "./src/llm-task-tool.js";
|
||||
|
||||
export default definePluginEntry({
|
||||
|
||||
@ -8,8 +8,8 @@ import {
|
||||
normalizeThinkLevel,
|
||||
resolvePreferredOpenClawTmpDir,
|
||||
supportsXHighThinking,
|
||||
} from "openclaw/plugin-sdk/llm-task";
|
||||
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/llm-task";
|
||||
} from "../api.js";
|
||||
import type { OpenClawPluginApi } from "../api.js";
|
||||
|
||||
function stripCodeFences(s: string): string {
|
||||
const trimmed = s.trim();
|
||||
|
||||
1
extensions/memory-lancedb/api.ts
Normal file
1
extensions/memory-lancedb/api.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from "openclaw/plugin-sdk/memory-lancedb";
|
||||
@ -10,7 +10,7 @@ import { randomUUID } from "node:crypto";
|
||||
import type * as LanceDB from "@lancedb/lancedb";
|
||||
import { Type } from "@sinclair/typebox";
|
||||
import OpenAI from "openai";
|
||||
import { definePluginEntry, type OpenClawPluginApi } from "openclaw/plugin-sdk/memory-lancedb";
|
||||
import { definePluginEntry, type OpenClawPluginApi } from "./api.js";
|
||||
import {
|
||||
DEFAULT_CAPTURE_MAX_CHARS,
|
||||
MEMORY_CATEGORIES,
|
||||
|
||||
1
extensions/thread-ownership/api.ts
Normal file
1
extensions/thread-ownership/api.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from "openclaw/plugin-sdk/thread-ownership";
|
||||
@ -1,8 +1,4 @@
|
||||
import {
|
||||
definePluginEntry,
|
||||
type OpenClawConfig,
|
||||
type OpenClawPluginApi,
|
||||
} from "openclaw/plugin-sdk/thread-ownership";
|
||||
import { definePluginEntry, type OpenClawConfig, type OpenClawPluginApi } from "./api.js";
|
||||
|
||||
type ThreadOwnershipConfig = {
|
||||
forwarderUrl?: string;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user