@nextclaw/openclaw-compat 0.1.6 → 0.1.8
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/dist/index.d.ts +50 -1
- package/dist/index.js +500 -684
- package/package.json +11 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as _nextclaw_core from '@nextclaw/core';
|
|
1
2
|
import { Config, ExtensionChannel } from '@nextclaw/core';
|
|
2
3
|
|
|
3
4
|
type PluginConfigUiHint = {
|
|
@@ -306,6 +307,17 @@ declare function sleep(ms: number): Promise<void>;
|
|
|
306
307
|
declare function normalizePluginHttpPath(rawPath: string): string;
|
|
307
308
|
declare const DEFAULT_ACCOUNT_ID = "default";
|
|
308
309
|
declare function normalizeAccountId(accountId?: string | null): string;
|
|
310
|
+
declare function createNextclawBuiltinChannelPlugin(channelId: string): {
|
|
311
|
+
id: string;
|
|
312
|
+
nextclaw: {
|
|
313
|
+
isEnabled: (cfg: _nextclaw_core.Config) => boolean;
|
|
314
|
+
createChannel: (ctx: {
|
|
315
|
+
config: _nextclaw_core.Config;
|
|
316
|
+
bus: _nextclaw_core.MessageBus;
|
|
317
|
+
sessionManager?: _nextclaw_core.SessionManager;
|
|
318
|
+
}) => unknown;
|
|
319
|
+
};
|
|
320
|
+
};
|
|
309
321
|
declare const __nextclawPluginSdkCompat = true;
|
|
310
322
|
type _CompatOnly = OpenClawPluginApi;
|
|
311
323
|
|
|
@@ -520,6 +532,43 @@ declare function createPluginRuntime(params: {
|
|
|
520
532
|
config?: Config;
|
|
521
533
|
}): PluginRuntime;
|
|
522
534
|
|
|
535
|
+
type PluginRegisterRuntime = {
|
|
536
|
+
config: Config;
|
|
537
|
+
workspaceDir: string;
|
|
538
|
+
logger: PluginLogger;
|
|
539
|
+
registry: PluginRegistry;
|
|
540
|
+
toolNameOwners: Map<string, string>;
|
|
541
|
+
channelIdOwners: Map<string, string>;
|
|
542
|
+
providerIdOwners: Map<string, string>;
|
|
543
|
+
resolvedToolNames: Set<string>;
|
|
544
|
+
reservedToolNames: Set<string>;
|
|
545
|
+
reservedChannelIds: Set<string>;
|
|
546
|
+
reservedProviderIds: Set<string>;
|
|
547
|
+
};
|
|
548
|
+
declare function createPluginRegisterRuntime(params: {
|
|
549
|
+
config: Config;
|
|
550
|
+
workspaceDir: string;
|
|
551
|
+
logger: PluginLogger;
|
|
552
|
+
registry: PluginRegistry;
|
|
553
|
+
reservedToolNames: Set<string>;
|
|
554
|
+
reservedChannelIds: Set<string>;
|
|
555
|
+
reservedProviderIds: Set<string>;
|
|
556
|
+
}): PluginRegisterRuntime;
|
|
557
|
+
declare function registerPluginWithApi(params: {
|
|
558
|
+
runtime: PluginRegisterRuntime;
|
|
559
|
+
record: PluginRecord;
|
|
560
|
+
pluginId: string;
|
|
561
|
+
source: string;
|
|
562
|
+
rootDir: string;
|
|
563
|
+
register: (api: OpenClawPluginApi) => void | Promise<void>;
|
|
564
|
+
pluginConfig?: Record<string, unknown>;
|
|
565
|
+
}): {
|
|
566
|
+
ok: true;
|
|
567
|
+
} | {
|
|
568
|
+
ok: false;
|
|
569
|
+
error: string;
|
|
570
|
+
};
|
|
571
|
+
|
|
523
572
|
declare function validateJsonSchemaValue(params: {
|
|
524
573
|
schema: Record<string, unknown>;
|
|
525
574
|
cacheKey: string;
|
|
@@ -578,4 +627,4 @@ declare function uninstallPlugin(params: {
|
|
|
578
627
|
extensionsDir?: string;
|
|
579
628
|
}): Promise<UninstallPluginResult>;
|
|
580
629
|
|
|
581
|
-
export { DEFAULT_ACCOUNT_ID, type InstallPluginResult, type NormalizedPluginsConfig, type OpenClawChannelAgentPrompt, type OpenClawChannelConfigAdapter, type OpenClawChannelConfigSchema, type OpenClawChannelGateway, type OpenClawChannelGatewayStartContext, type OpenClawChannelPlugin, type OpenClawChannelSetup, type OpenClawPluginApi, type OpenClawPluginChannelRegistration, type OpenClawPluginConfigSchema, type OpenClawPluginDefinition, type OpenClawPluginModule, type OpenClawPluginTool, type OpenClawPluginToolContext, type OpenClawPluginToolFactory, type OpenClawPluginToolOptions, type OpenClawProviderPlugin, PLUGIN_MANIFEST_FILENAME, PLUGIN_MANIFEST_FILENAMES, type PackageManifest, type PluginCandidate, type PluginChannelBinding, type PluginChannelGatewayHandle, type PluginChannelRegistration, type PluginConfigUiHint, type PluginDiagnostic, type PluginDiscoveryResult, type PluginInstallLogger, type PluginInstallSource, type PluginInstallUpdate, type PluginKind, type PluginLoadOptions, type PluginLogger, type PluginManifest, type PluginManifestLoadResult, type PluginManifestRecord, type PluginManifestRegistry, type PluginOrigin, type PluginProviderRegistration, type PluginRecord, type PluginRegistry, type PluginReplyDispatchParams, type PluginRuntime, type PluginRuntimeBridge, type PluginStatusReport, type PluginToolRegistration, type PluginUiMetadata, type UninstallActions, type UninstallPluginResult, type _CompatOnly, __nextclawPluginSdkCompat, addPluginLoadPath, buildChannelConfigSchema, buildOauthProviderAuthResult, buildPluginStatusReport, createPluginRuntime, disablePluginInConfig, discoverOpenClawPlugins, emptyPluginConfigSchema, enablePluginInConfig, getPackageManifestMetadata, getPluginChannelBindings, getPluginUiMetadataFromRegistry, installPluginFromArchive, installPluginFromDir, installPluginFromFile, installPluginFromNpmSpec, installPluginFromPath, loadOpenClawPlugins, loadPluginManifest, loadPluginManifestRegistry, loadPluginUiMetadata, normalizeAccountId, normalizePluginHttpPath, normalizePluginsConfig, recordPluginInstall, removePluginFromConfig, resolveEnableState, resolvePluginChannelMessageToolHints, resolvePluginInstallDir, resolvePluginManifestPath, resolveUninstallDirectoryTarget, setPluginRuntimeBridge, sleep, startPluginChannelGateways, stopPluginChannelGateways, toPluginUiMetadata, uninstallPlugin, validateJsonSchemaValue };
|
|
630
|
+
export { DEFAULT_ACCOUNT_ID, type InstallPluginResult, type NormalizedPluginsConfig, type OpenClawChannelAgentPrompt, type OpenClawChannelConfigAdapter, type OpenClawChannelConfigSchema, type OpenClawChannelGateway, type OpenClawChannelGatewayStartContext, type OpenClawChannelPlugin, type OpenClawChannelSetup, type OpenClawPluginApi, type OpenClawPluginChannelRegistration, type OpenClawPluginConfigSchema, type OpenClawPluginDefinition, type OpenClawPluginModule, type OpenClawPluginTool, type OpenClawPluginToolContext, type OpenClawPluginToolFactory, type OpenClawPluginToolOptions, type OpenClawProviderPlugin, PLUGIN_MANIFEST_FILENAME, PLUGIN_MANIFEST_FILENAMES, type PackageManifest, type PluginCandidate, type PluginChannelBinding, type PluginChannelGatewayHandle, type PluginChannelRegistration, type PluginConfigUiHint, type PluginDiagnostic, type PluginDiscoveryResult, type PluginInstallLogger, type PluginInstallSource, type PluginInstallUpdate, type PluginKind, type PluginLoadOptions, type PluginLogger, type PluginManifest, type PluginManifestLoadResult, type PluginManifestRecord, type PluginManifestRegistry, type PluginOrigin, type PluginProviderRegistration, type PluginRecord, type PluginRegisterRuntime, type PluginRegistry, type PluginReplyDispatchParams, type PluginRuntime, type PluginRuntimeBridge, type PluginStatusReport, type PluginToolRegistration, type PluginUiMetadata, type UninstallActions, type UninstallPluginResult, type _CompatOnly, __nextclawPluginSdkCompat, addPluginLoadPath, buildChannelConfigSchema, buildOauthProviderAuthResult, buildPluginStatusReport, createNextclawBuiltinChannelPlugin, createPluginRegisterRuntime, createPluginRuntime, disablePluginInConfig, discoverOpenClawPlugins, emptyPluginConfigSchema, enablePluginInConfig, getPackageManifestMetadata, getPluginChannelBindings, getPluginUiMetadataFromRegistry, installPluginFromArchive, installPluginFromDir, installPluginFromFile, installPluginFromNpmSpec, installPluginFromPath, loadOpenClawPlugins, loadPluginManifest, loadPluginManifestRegistry, loadPluginUiMetadata, normalizeAccountId, normalizePluginHttpPath, normalizePluginsConfig, recordPluginInstall, registerPluginWithApi, removePluginFromConfig, resolveEnableState, resolvePluginChannelMessageToolHints, resolvePluginInstallDir, resolvePluginManifestPath, resolveUninstallDirectoryTarget, setPluginRuntimeBridge, sleep, startPluginChannelGateways, stopPluginChannelGateways, toPluginUiMetadata, uninstallPlugin, validateJsonSchemaValue };
|