openbot 0.5.11 → 0.5.12

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/app/cli.js CHANGED
@@ -18,7 +18,7 @@ function checkNodeVersion() {
18
18
  }
19
19
  }
20
20
  checkNodeVersion();
21
- program.name('openbot').description('OpenBot CLI').version('0.5.11');
21
+ program.name('openbot').description('OpenBot CLI').version('0.5.12');
22
22
  program
23
23
  .command('start')
24
24
  .description('Start the OpenBot harness')
@@ -4,11 +4,11 @@ import { DEFAULT_PLUGINS_DIR, DEFAULT_AGENTS_DIR, DEFAULT_CHANNELS_DIR, getBaseD
4
4
  import fs from 'node:fs/promises';
5
5
  import { readFileSync } from 'node:fs';
6
6
  import path from 'node:path';
7
- import { fileURLToPath, pathToFileURL } from 'node:url';
7
+ import { fileURLToPath } from 'node:url';
8
8
  import crypto from 'node:crypto';
9
9
  import matter from 'gray-matter';
10
10
  import { OPENBOT_PLUGIN_ID } from '../../app/openbot-plugin.js';
11
- import { listBuiltInPlugins, parsePluginModule } from '../../services/plugins/registry.js';
11
+ import { listBuiltInPlugins, resolvePlugin } from '../../services/plugins/registry.js';
12
12
  import { enrichOpenbotPluginDescriptor } from '../../services/plugins/enrich-openbot-plugin.js';
13
13
  import { processService } from '../../services/process.js';
14
14
  import { memoryService } from '../memory/service.js';
@@ -372,24 +372,22 @@ const listPluginsFromDisk = async () => {
372
372
  const ids = await listInstalledPluginIds(pluginsDir);
373
373
  const descriptors = await Promise.all(ids.map(async (id) => {
374
374
  try {
375
- const pluginDir = path.join(pluginsDir, id);
376
- const distPath = path.join(pluginDir, 'dist', 'index.js');
377
- const module = await import(pathToFileURL(distPath).href);
378
- const parsed = parsePluginModule(module);
379
- if (!parsed)
375
+ const plugin = await resolvePlugin(id);
376
+ if (!plugin)
380
377
  return null;
378
+ const pluginDir = path.join(pluginsDir, id);
381
379
  const [image, version] = await Promise.all([
382
380
  resolveEntityImageDataUrl(pluginDir),
383
381
  readPluginPackageVersion(pluginDir),
384
382
  ]);
385
383
  return {
386
384
  id,
387
- name: parsed.name || id,
388
- description: parsed.description || '',
385
+ name: plugin.name || id,
386
+ description: plugin.description || '',
389
387
  builtIn: false,
390
388
  version,
391
- image: parsed.image || image,
392
- configSchema: parsed.configSchema,
389
+ image: plugin.image || image,
390
+ configSchema: plugin.configSchema,
393
391
  createdAt: new Date(),
394
392
  updatedAt: new Date(),
395
393
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openbot",
3
- "version": "0.5.11",
3
+ "version": "0.5.12",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "engines": {
@@ -11,7 +11,7 @@
11
11
  "build": "tsc && mkdir -p dist/assets && cp src/assets/icon.svg dist/assets/icon.svg",
12
12
  "start": "node dist/app/cli.js start",
13
13
  "format": "prettier --write .",
14
- "push": "fly deploy --build-only --push --config deploy/fly.toml -a openbot-runtime --image-label v0.5.11"
14
+ "push": "fly deploy --build-only --push --config deploy/fly.toml -a openbot-runtime --image-label v0.5.12"
15
15
  },
16
16
  "bin": {
17
17
  "openbot": "./dist/app/cli.js"
package/src/app/cli.ts CHANGED
@@ -27,7 +27,7 @@ function checkNodeVersion() {
27
27
 
28
28
  checkNodeVersion();
29
29
 
30
- program.name('openbot').description('OpenBot CLI').version('0.5.11');
30
+ program.name('openbot').description('OpenBot CLI').version('0.5.12');
31
31
 
32
32
  program
33
33
  .command('start')
@@ -17,7 +17,7 @@ import {
17
17
  import fs from 'node:fs/promises';
18
18
  import { readFileSync } from 'node:fs';
19
19
  import path from 'node:path';
20
- import { fileURLToPath, pathToFileURL } from 'node:url';
20
+ import { fileURLToPath } from 'node:url';
21
21
  import crypto from 'node:crypto';
22
22
  import matter from 'gray-matter';
23
23
  import {
@@ -32,7 +32,7 @@ import {
32
32
  } from '../../services/plugins/domain.js';
33
33
  import type { PluginRef } from '../../services/plugins/types.js';
34
34
  import { OPENBOT_PLUGIN_ID } from '../../app/openbot-plugin.js';
35
- import { listBuiltInPlugins, parsePluginModule } from '../../services/plugins/registry.js';
35
+ import { listBuiltInPlugins, resolvePlugin } from '../../services/plugins/registry.js';
36
36
  import { enrichOpenbotPluginDescriptor } from '../../services/plugins/enrich-openbot-plugin.js';
37
37
  import { OpenBotEvent, OpenBotState } from '../../app/types.js';
38
38
  import { processService } from '../../services/process.js';
@@ -456,23 +456,21 @@ const listPluginsFromDisk = async (): Promise<PluginDescriptor[]> => {
456
456
  const descriptors = await Promise.all(
457
457
  ids.map(async (id): Promise<PluginDescriptor | null> => {
458
458
  try {
459
+ const plugin = await resolvePlugin(id);
460
+ if (!plugin) return null;
459
461
  const pluginDir = path.join(pluginsDir, id);
460
- const distPath = path.join(pluginDir, 'dist', 'index.js');
461
- const module = await import(pathToFileURL(distPath).href);
462
- const parsed = parsePluginModule(module as Record<string, unknown>);
463
- if (!parsed) return null;
464
462
  const [image, version] = await Promise.all([
465
463
  resolveEntityImageDataUrl(pluginDir),
466
464
  readPluginPackageVersion(pluginDir),
467
465
  ]);
468
466
  return {
469
467
  id,
470
- name: parsed.name || id,
471
- description: parsed.description || '',
468
+ name: plugin.name || id,
469
+ description: plugin.description || '',
472
470
  builtIn: false,
473
471
  version,
474
- image: parsed.image || image,
475
- configSchema: parsed.configSchema,
472
+ image: plugin.image || image,
473
+ configSchema: plugin.configSchema,
476
474
  createdAt: new Date(),
477
475
  updatedAt: new Date(),
478
476
  };