feat(FN-4486): complete Step 1 — annotate plugin hook ctx params
Fusion-Task-Id: FN-4486 Fusion-Task-Lineage: 7d3b40b2-883f-450c-96ec-796f8af4fa45
This commit is contained in:
@@ -13,6 +13,7 @@ import { installFusionSkillIntoHermesHome } from "./fusion-skill-install.js";
|
|||||||
import { HermesRuntimeAdapter } from "./runtime-adapter.js";
|
import { HermesRuntimeAdapter } from "./runtime-adapter.js";
|
||||||
import type {
|
import type {
|
||||||
FusionPlugin,
|
FusionPlugin,
|
||||||
|
PluginContext,
|
||||||
PluginRuntimeFactory,
|
PluginRuntimeFactory,
|
||||||
PluginRuntimeManifestMetadata,
|
PluginRuntimeManifestMetadata,
|
||||||
} from "@fusion/plugin-sdk";
|
} from "@fusion/plugin-sdk";
|
||||||
@@ -50,7 +51,7 @@ const plugin: FusionPlugin = definePlugin({
|
|||||||
},
|
},
|
||||||
state: "installed",
|
state: "installed",
|
||||||
hooks: {
|
hooks: {
|
||||||
onLoad: (ctx) => {
|
onLoad: (ctx: PluginContext) => {
|
||||||
const settings = resolveCliSettings(ctx.settings);
|
const settings = resolveCliSettings(ctx.settings);
|
||||||
const skillInstall = installFusionSkillIntoHermesHome({ profile: settings.profile });
|
const skillInstall = installFusionSkillIntoHermesHome({ profile: settings.profile });
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ const plugin: FusionPlugin = definePlugin({
|
|||||||
},
|
},
|
||||||
state: "installed",
|
state: "installed",
|
||||||
hooks: {
|
hooks: {
|
||||||
onLoad: async (ctx) => {
|
onLoad: async (ctx: PluginContext) => {
|
||||||
const config = resolveCliConfig(ctx.settings);
|
const config = resolveCliConfig(ctx.settings);
|
||||||
const probe = await probeOpenClawBinary({ binaryPath: config.binaryPath });
|
const probe = await probeOpenClawBinary({ binaryPath: config.binaryPath });
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { definePlugin } from "@fusion/plugin-sdk";
|
import { definePlugin } from "@fusion/plugin-sdk";
|
||||||
|
import type { PluginContext } from "@fusion/plugin-sdk";
|
||||||
import {
|
import {
|
||||||
probePaperclipConnection,
|
probePaperclipConnection,
|
||||||
resolvePaperclipConfig,
|
resolvePaperclipConfig,
|
||||||
@@ -80,7 +81,7 @@ const plugin: FusionPlugin = definePlugin({
|
|||||||
state: "installed",
|
state: "installed",
|
||||||
runtime: paperclipRuntime,
|
runtime: paperclipRuntime,
|
||||||
hooks: {
|
hooks: {
|
||||||
onLoad: async (ctx) => {
|
onLoad: async (ctx: PluginContext) => {
|
||||||
const config = getSettingsConfig(ctx.settings);
|
const config = getSettingsConfig(ctx.settings);
|
||||||
ctx.logger.info(`Paperclip Runtime Plugin loaded (apiUrl=${config.apiUrl})`);
|
ctx.logger.info(`Paperclip Runtime Plugin loaded (apiUrl=${config.apiUrl})`);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user