openbot 0.5.5 → 0.5.6
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 +1 -1
- package/dist/services/plugins/service.js +5 -1
- package/docs/plugins.md +14 -12
- package/package.json +2 -2
- package/src/app/cli.ts +1 -1
- package/src/app/types.ts +1 -0
- package/src/services/plugins/service.ts +7 -1
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.
|
|
21
|
+
program.name('openbot').description('OpenBot CLI').version('0.5.6');
|
|
22
22
|
program
|
|
23
23
|
.command('start')
|
|
24
24
|
.description('Start the OpenBot harness')
|
|
@@ -6,6 +6,9 @@ import { promisify } from 'node:util';
|
|
|
6
6
|
import { DEFAULT_PLUGINS_DIR, DEFAULT_MARKETPLACE_REGISTRY_URL, getBaseDir, loadConfig, } from '../../app/config.js';
|
|
7
7
|
import { invalidatePlugin } from './plugin-cache.js';
|
|
8
8
|
const execAsync = promisify(exec);
|
|
9
|
+
function isLatestVersionAlias(version) {
|
|
10
|
+
return version.trim().toLowerCase() === 'latest';
|
|
11
|
+
}
|
|
9
12
|
const DEFAULT_MARKETPLACE_AGENTS = [];
|
|
10
13
|
const DEFAULT_MARKETPLACE_CHANNELS = [];
|
|
11
14
|
function isRecord(value) {
|
|
@@ -155,7 +158,8 @@ export const pluginService = {
|
|
|
155
158
|
if (existsSync(path.join(finalPath, 'package.json'))) {
|
|
156
159
|
try {
|
|
157
160
|
const pkgJson = JSON.parse(await fs.readFile(path.join(finalPath, 'package.json'), 'utf-8'));
|
|
158
|
-
|
|
161
|
+
const wantsLatest = version !== undefined && isLatestVersionAlias(version);
|
|
162
|
+
if (!version || (!wantsLatest && pkgJson.version === version)) {
|
|
159
163
|
console.log(`[plugins] ${packageName}${version ? `@${version}` : ''} is already installed.`);
|
|
160
164
|
return { name: pkgJson.name, version: pkgJson.version };
|
|
161
165
|
}
|
package/docs/plugins.md
CHANGED
|
@@ -28,7 +28,7 @@ export interface Plugin {
|
|
|
28
28
|
export interface PluginContext {
|
|
29
29
|
agentId: string;
|
|
30
30
|
agentDetails: AgentDetails;
|
|
31
|
-
config: Record<string, unknown>;
|
|
31
|
+
config: Record<string, unknown>; // from AGENT.md plugins[].config
|
|
32
32
|
storage: Storage;
|
|
33
33
|
tools: Record<string, ToolDefinition>; // merged from all tool plugins
|
|
34
34
|
}
|
|
@@ -49,16 +49,16 @@ model as the tool result (`history.ts`). Structured fields (e.g. `list`,
|
|
|
49
49
|
|
|
50
50
|
## Built-in plugins
|
|
51
51
|
|
|
52
|
-
| Id
|
|
53
|
-
|
|
|
54
|
-
| `openbot`
|
|
55
|
-
| `claude-code`
|
|
56
|
-
| `gemini-cli`
|
|
57
|
-
| `bash`
|
|
58
|
-
| `storage`
|
|
59
|
-
| `memory`
|
|
60
|
-
| `todo`
|
|
61
|
-
| `plugin-manager
|
|
52
|
+
| Id | Role | Notes |
|
|
53
|
+
| ---------------- | ------- | ------------------------------------------------------------- |
|
|
54
|
+
| `openbot` | Runtime | Standard batteries-included OpenBot agent runtime. |
|
|
55
|
+
| `claude-code` | Runtime | Claude Agent SDK; owns its own tool loop |
|
|
56
|
+
| `gemini-cli` | Runtime | Google `gemini` CLI in headless mode |
|
|
57
|
+
| `bash` | Tool | `bash` (inbuilt in `openbot`) |
|
|
58
|
+
| `storage` | Tool | `create_channel`, `patch_*`, ... (inbuilt in `openbot`) |
|
|
59
|
+
| `memory` | Tool | `remember`, `recall`, `forget` (inbuilt in `openbot`) |
|
|
60
|
+
| `todo` | Tool | `todo_write`, `todo_read` (inbuilt in `openbot`) |
|
|
61
|
+
| `plugin-manager` | Infra | Marketplace list, npm plugin install/uninstall, agent install |
|
|
62
62
|
|
|
63
63
|
## Batteries-included: `openbot` runtime
|
|
64
64
|
|
|
@@ -96,7 +96,9 @@ plugins:
|
|
|
96
96
|
|
|
97
97
|
On first use OpenBot installs the package into
|
|
98
98
|
`~/.openbot/plugins/<npm-name>/` (scoped packages live under
|
|
99
|
-
`~/.openbot/plugins/@scope/<name>/`).
|
|
99
|
+
`~/.openbot/plugins/@scope/<name>/`). Publish `action:plugin:install` with no
|
|
100
|
+
`version` to ensure a plugin is present; pass `version: "latest"` to upgrade an
|
|
101
|
+
existing install to npm's latest tag, or a concrete semver to pin.
|
|
100
102
|
|
|
101
103
|
## Approval plugin
|
|
102
104
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openbot",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.6",
|
|
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.
|
|
14
|
+
"push": "fly deploy --build-only --push --config deploy/fly.toml -a openbot-runtime --image-label v0.5.6"
|
|
15
15
|
},
|
|
16
16
|
"bin": {
|
|
17
17
|
"openbot": "./dist/app/cli.js"
|
package/src/app/cli.ts
CHANGED
package/src/app/types.ts
CHANGED
|
@@ -17,9 +17,14 @@ const execAsync = promisify(exec);
|
|
|
17
17
|
|
|
18
18
|
export interface InstallOptions {
|
|
19
19
|
packageName: string;
|
|
20
|
+
/** Concrete semver, or `"latest"` to refresh from npm. Omit to ensure present without upgrading. */
|
|
20
21
|
version?: string;
|
|
21
22
|
}
|
|
22
23
|
|
|
24
|
+
function isLatestVersionAlias(version: string): boolean {
|
|
25
|
+
return version.trim().toLowerCase() === 'latest';
|
|
26
|
+
}
|
|
27
|
+
|
|
23
28
|
export interface InstalledPlugin {
|
|
24
29
|
/** npm package name; doubles as the plugin id used everywhere else. */
|
|
25
30
|
name: string;
|
|
@@ -229,7 +234,8 @@ export const pluginService = {
|
|
|
229
234
|
const pkgJson = JSON.parse(
|
|
230
235
|
await fs.readFile(path.join(finalPath, 'package.json'), 'utf-8'),
|
|
231
236
|
);
|
|
232
|
-
|
|
237
|
+
const wantsLatest = version !== undefined && isLatestVersionAlias(version);
|
|
238
|
+
if (!version || (!wantsLatest && pkgJson.version === version)) {
|
|
233
239
|
console.log(
|
|
234
240
|
`[plugins] ${packageName}${version ? `@${version}` : ''} is already installed.`,
|
|
235
241
|
);
|