@meetopenbot/openbot 1.2.11 → 1.2.13
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/context.js +4 -3
- package/dist/system-prompt.js +3 -2
- package/dist/tools/storage.js +23 -5
- package/package.json +2 -2
package/dist/context.js
CHANGED
|
@@ -101,9 +101,10 @@ export async function buildContext(state, storage, host) {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
// 2.6 Installed Agents
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
const otherAgents = allAgents.filter((agent) => agent.id !== agentId);
|
|
105
|
+
if (otherAgents.length > 0) {
|
|
106
|
+
const catalogs = await loadAgentModelCatalogs(storage, otherAgents.map((agent) => agent.id));
|
|
107
|
+
sections.push(formatInstalledAgentsSection(otherAgents, catalogs));
|
|
107
108
|
}
|
|
108
109
|
// 2.7 Marketplace agents not yet installed
|
|
109
110
|
if (host?.listMarketplaceAgents) {
|
package/dist/system-prompt.js
CHANGED
|
@@ -57,8 +57,9 @@ export const OPENBOT_SYSTEM_PROMPT = [
|
|
|
57
57
|
"- Share the `https://*.trycloudflare.com` URL they print. Quick tunnels change on restart — pass the new one through. If they report a localhost URL, ask them to tunnel it.",
|
|
58
58
|
"",
|
|
59
59
|
"# SPACE VARIABLES",
|
|
60
|
-
"- Secrets live in OpenBot variables, not in chat. Workspace-wide keys: Settings → Variables. Per-space keys: Space menu → Variables (override workspace keys with the same name).",
|
|
61
|
-
"-
|
|
60
|
+
"- Secrets live in OpenBot variables, not in chat. Workspace-wide keys: Settings → Variables. Per-space keys: Space menu → Variables (override workspace keys with the same name for shell commands in that space).",
|
|
61
|
+
"- Provider keys for harness LLM calls (`OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, etc.) are workspace-only — space copies of those names are for app shells only and do not switch coding agents off OpenBot Credits.",
|
|
62
|
+
"- Coding agents inherit merged space variables in their shell environment — including `pnpm dev` subprocesses. Do not ask the human to paste secrets. Only tell a coding agent to write a project `.env` when the scaffold requires it or the app errors about a missing `.env`; otherwise a restarted dev server should pick up keys from the shell (use exact names such as `VITE_*` for Vite).",
|
|
62
63
|
"",
|
|
63
64
|
"# COMMUNICATION & WRITING STYLE",
|
|
64
65
|
"- Be concise, professional, proactive, and polite.",
|
package/dist/tools/storage.js
CHANGED
|
@@ -15,18 +15,34 @@ function displayNameFromChannelId(channelId) {
|
|
|
15
15
|
.join(' ');
|
|
16
16
|
}
|
|
17
17
|
async function emitCreateChannelWidget(ctx, args) {
|
|
18
|
+
const actions = args.state === 'submitted' && args.channelUrl
|
|
19
|
+
? [
|
|
20
|
+
{
|
|
21
|
+
id: 'navigate',
|
|
22
|
+
label: args.channelId ? `Open #${args.channelId}` : 'Open Space',
|
|
23
|
+
variant: 'primary',
|
|
24
|
+
value: { path: args.channelUrl },
|
|
25
|
+
},
|
|
26
|
+
]
|
|
27
|
+
: undefined;
|
|
18
28
|
await ctx.emit({
|
|
19
29
|
type: 'client:ui:widget',
|
|
20
30
|
data: {
|
|
21
31
|
widgetId: args.widgetId,
|
|
22
32
|
kind: 'message',
|
|
23
|
-
title: '
|
|
24
|
-
description: args.channelId
|
|
33
|
+
title: 'Space created',
|
|
34
|
+
description: args.displayName ?? (args.channelId ? `#${args.channelId}` : undefined),
|
|
25
35
|
body: args.body,
|
|
26
|
-
display: 'collapsed',
|
|
36
|
+
display: args.state === 'submitted' ? 'expanded' : 'collapsed',
|
|
27
37
|
state: args.state,
|
|
38
|
+
...(actions ? { actions } : {}),
|
|
39
|
+
metadata: { type: 'space_created', channelId: args.channelId || undefined },
|
|
40
|
+
},
|
|
41
|
+
meta: {
|
|
42
|
+
agentId: ctx.agentId,
|
|
43
|
+
threadId: ctx.threadId ?? ctx.state.threadId,
|
|
44
|
+
parentToolCallId: ctx.toolCallId,
|
|
28
45
|
},
|
|
29
|
-
meta: { agentId: ctx.agentId, threadId: ctx.threadId ?? ctx.state.threadId },
|
|
30
46
|
});
|
|
31
47
|
}
|
|
32
48
|
export const storageTools = {
|
|
@@ -119,10 +135,12 @@ export const storageTools = {
|
|
|
119
135
|
spec: channelSpec,
|
|
120
136
|
initialState: mergedInitial,
|
|
121
137
|
});
|
|
122
|
-
const output = `Created
|
|
138
|
+
const output = `Created #${rawChannelId}. Open it to start working there.`;
|
|
123
139
|
await emitCreateChannelWidget(ctx, {
|
|
124
140
|
widgetId,
|
|
125
141
|
channelId: rawChannelId,
|
|
142
|
+
displayName: displayName,
|
|
143
|
+
channelUrl,
|
|
126
144
|
body: output,
|
|
127
145
|
state: 'submitted',
|
|
128
146
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meetopenbot/openbot",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.13",
|
|
4
4
|
"description": "OpenBot coordinator runtime: ask specialists, route work into Spaces, and track todos.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@ai-sdk/openai": "^4.0.72",
|
|
26
26
|
"ai": "^7.0.111",
|
|
27
27
|
"zod": "^4.3.5",
|
|
28
|
-
"@meetopenbot/plugin-sdk": "^1.2.
|
|
28
|
+
"@meetopenbot/plugin-sdk": "^1.2.4"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/node": "^20.10.1",
|