@elizaos/plugin-bootstrap 1.7.1 → 1.7.2-alpha.2

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.js CHANGED
@@ -5259,6 +5259,36 @@ function formatFacts(facts) {
5259
5259
  }
5260
5260
  // src/providers/actions.ts
5261
5261
  import { addHeader, composeActionExamples, formatActionNames, formatActions } from "@elizaos/core";
5262
+ function formatActionsWithParams(actions) {
5263
+ return actions.map((action) => {
5264
+ let formatted = `## ${action.name}
5265
+ ${action.description}`;
5266
+ if (action.parameters !== undefined && action.parameters !== null && typeof action.parameters === "object" && !Array.isArray(action.parameters)) {
5267
+ const validParams = Object.entries(action.parameters).filter(([, paramDef]) => paramDef !== null && paramDef !== undefined && typeof paramDef === "object" && ("type" in paramDef) && typeof paramDef.type === "string");
5268
+ if (validParams.length === 0) {
5269
+ formatted += `
5270
+
5271
+ **Parameters:** None (can be called directly without parameters)`;
5272
+ } else {
5273
+ formatted += `
5274
+
5275
+ **Parameters:**`;
5276
+ for (const [paramName, paramDef] of validParams) {
5277
+ const required = paramDef.required ? "(required)" : "(optional)";
5278
+ const paramType = paramDef.type ?? "unknown";
5279
+ const paramDesc = paramDef.description ?? "No description provided";
5280
+ formatted += `
5281
+ - \`${paramName}\` ${required}: ${paramType} - ${paramDesc}`;
5282
+ }
5283
+ }
5284
+ }
5285
+ return formatted;
5286
+ }).join(`
5287
+
5288
+ ---
5289
+
5290
+ `);
5291
+ }
5262
5292
  var actionsProvider = {
5263
5293
  name: "ACTIONS",
5264
5294
  description: "Possible response actions",
@@ -5279,6 +5309,7 @@ var actionsProvider = {
5279
5309
  const actionsData = resolvedActions.filter(Boolean);
5280
5310
  const actionNames = `Possible response actions: ${formatActionNames(actionsData)}`;
5281
5311
  const actionsWithDescriptions = actionsData.length > 0 ? addHeader("# Available Actions", formatActions(actionsData)) : "";
5312
+ const actionsWithParams = actionsData.length > 0 ? addHeader("# Available Actions with Parameters", formatActionsWithParams(actionsData)) : "";
5282
5313
  const actionExamples = actionsData.length > 0 ? addHeader("# Action Examples", composeActionExamples(actionsData, 10)) : "";
5283
5314
  const data = {
5284
5315
  actionsData
@@ -5286,7 +5317,8 @@ var actionsProvider = {
5286
5317
  const values = {
5287
5318
  actionNames,
5288
5319
  actionExamples,
5289
- actionsWithDescriptions
5320
+ actionsWithDescriptions,
5321
+ actionsWithParams
5290
5322
  };
5291
5323
  const text = [actionNames, actionsWithDescriptions, actionExamples].filter(Boolean).join(`
5292
5324
 
@@ -8381,5 +8413,5 @@ export {
8381
8413
  actionStateProvider
8382
8414
  };
8383
8415
 
8384
- //# debugId=F28D3384C77B385164756E2164756E21
8416
+ //# debugId=33481F5084CEC20E64756E2164756E21
8385
8417
  //# sourceMappingURL=index.js.map