Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Bots deliver what was asked: a published link for something to share, and say what they did not look up (#7558)

Milind Soni8083472e14f0
diff --git a/evals/tool-choice/cases.json b/evals/tool-choice/cases.json
index 9929a3d248..2af2b25c46 100644
--- a/evals/tool-choice/cases.json
+++ b/evals/tool-choice/cases.json
@@ -14,5 +14,10 @@
{ "id": "daily-automation", "tools": ["trigger"], "text": "Every weekday at 8:00, send me a short summary of my unread email.", "why": "Asked for something that runs every day." },
{ "id": "jobs-per-pull-request", "tools": ["start_thread"], "text": "Open two separate jobs on yourself: one reviews pull request 12, the other pull request 13.", "why": "Asked for independent jobs, each its own thread." },
{ "id": "publish-a-page", "tools": ["publish_page", "publish_app"], "text": "Make a one-paragraph web page saying the office is closed on Friday and publish it to a link I can share.", "why": "Asked for a page at a public link." },
+ { "id": "keep-and-share", "tools": ["publish_page", "publish_app"], "publishSays": "anyone with (the |this )?link", "text": "Plan a 2-day food trip to Lisbon: where to eat, what to order, a rough route each day. Give me something I can keep and share.", "why": "Asked for something to keep and share, without saying publish; got a file with no link." },
+ { "id": "share-with-the-team", "tools": ["publish_page", "publish_app"], "publishSays": "anyone with (the |this )?link", "text": "Write up the three options for our team offsite (lake cabin, city hotel, stay home with a catered day) with rough costs, as something I can share with the team.", "why": "Asked for something others will open: a page at a link, said to be public." },
+ { "id": "bank-summary-just-for-me", "tools": [], "never": ["publish_page", "publish_app"], "text": "From my bank statement: rent 1,450, groceries 612, eating out 290, salary 4,200, savings 300. Send me a short summary of where my money went this month.", "why": "Money details just for the person must never go to a public link." },
+ { "id": "keep-for-my-records", "tools": [], "never": ["publish_page", "publish_app"], "text": "Make a summary of my car's service history (oil change in March, new tyres in June, brakes in October) that I can keep for my records.", "why": "Something to keep is a file or a page in the chat, not a public link." },
+ { "id": "share-personal-with-family", "tools": [], "publishSays": "anyone with (the |this )?link", "text": "Put our joint finances on one page (account ending 4821, balance 8,920, mortgage 1,450 a month, my salary 4,200) and share it with my wife.", "why": "Personal money details to share: ask, give a file, or if it publishes, say anyone with the link can open it." },
{ "id": "ask-me-which-day", "tools": ["ask_user", "create_options_card"], "text": "Before you book the call, ask me whether I prefer Tuesday or Thursday, with both as choices.", "why": "Asked to be asked, with options." }
]
diff --git a/evals/tool-choice/run-tool-choice.ts b/evals/tool-choice/run-tool-choice.ts
index 3c112b840e..7fcfc102c9 100644
--- a/evals/tool-choice/run-tool-choice.ts
+++ b/evals/tool-choice/run-tool-choice.ts
@@ -66,8 +66,9 @@ async function main(): Promise<void> {
}
const calls = messages.filter((message) => message.kind === "activity" && message.tool?.name).map((message) => String(message.tool.name));
const after = await spent();
- const row: Row = { id: item.id, score: scoreCase(item, calls), calls, done, costUsd: Number((after.cost - before.cost).toFixed(4)), inputTokens: after.input - before.input,
- reply: String(messages.filter((message) => message.role === "bot" && message.kind === "text").at(-1)?.text ?? "").slice(0, 200) };
+ const reply = messages.filter((message) => message.role === "bot" && message.kind === "text").map((message) => String(message.text ?? "")).join("\n");
+ const row: Row = { id: item.id, score: scoreCase(item, calls, reply), calls, done, costUsd: Number((after.cost - before.cost).toFixed(4)), inputTokens: after.input - before.input,
+ reply: reply.slice(-200) };
rows.push(row);
console.log(`${row.score.pass ? "pass" : "MISS"} ${item.id}: ${row.score.chosen ?? "no tool"}${row.score.searched ? " (looked up)" : ""} $${row.costUsd} [${calls.join(", ")}]`);
}
diff --git a/evals/tool-choice/score.test.ts b/evals/tool-choice/score.test.ts
index 8057eb7aed..51e6f88a0b 100644
--- a/evals/tool-choice/score.test.ts
+++ b/evals/tool-choice/score.test.ts
@@ -12,6 +12,18 @@ describe("tool-choice scoring", () => {
expect(scoreCase({ tools: ["trigger"] }, [])).toEqual({ pass: false, chosen: undefined, searched: false });
});
+ it("fails a turn that reaches a tool the case rules out, and a publish that does not say the link is public", () => {
+ const justForMe = { tools: [], never: ["publish_page", "publish_app"] };
+ expect(scoreCase(justForMe, ["Write", "attach_file"])).toEqual({ pass: true, chosen: "Write", searched: false });
+ expect(scoreCase(justForMe, ["Write", "mcp__agents__publish_page"])).toEqual({ pass: false, chosen: "publish_page", searched: false });
+ const share = { tools: ["publish_page"], publishSays: "anyone with (the |this )?link" };
+ expect(scoreCase(share, ["publish_page"], "Here it is: https://x.page. Anyone with the link can open it.").pass).toBe(true);
+ expect(scoreCase(share, ["publish_page"], "Here it is: https://x.page").pass).toBe(false);
+ const family = { tools: [], publishSays: "anyone with (the |this )?link" };
+ expect(scoreCase(family, ["Write"], "Here is the file.").pass).toBe(true);
+ expect(scoreCase(family, ["publish_page"], "Shared: https://x.page").pass).toBe(false);
+ });
+
it("strips the server from a tool name, including one with an underscore", () => {
expect(bareToolName("mcp__agents__session_search")).toBe("session_search");
expect(bareToolName("mcp__own_apps__GMAIL_SEND")).toBe("GMAIL_SEND");
@@ -28,7 +40,7 @@ describe("tool-choice scoring", () => {
const cases = JSON.parse(readFileSync(new URL("./cases.json", import.meta.url), "utf8")) as ToolChoiceCase[];
expect(new Set(cases.map((item) => item.id)).size).toBe(cases.length);
for (const item of cases) {
- expect(item.tools.length, item.id).toBeGreaterThan(0);
+ expect(item.tools.length + (item.never?.length ?? 0) + (item.publishSays ? 1 : 0), item.id).toBeGreaterThan(0);
expect(item.why.length, item.id).toBeGreaterThan(0);
}
});
diff --git a/evals/tool-choice/score.ts b/evals/tool-choice/score.ts
index b0981321d1..634af2159c 100644
--- a/evals/tool-choice/score.ts
+++ b/evals/tool-choice/score.ts
@@ -5,8 +5,14 @@ export interface ToolChoiceCase {
text: string;
/** The real failure this came from, in neutral words. */
why: string;
+ /** Tools this request must not reach (a page just for the person is never published). */
+ never?: string[];
+ /** When the turn published a page or app, its reply must match this (case-insensitive), e.g. that the link is public. */
+ publishSays?: string;
}
+const PUBLISH_TOOLS = new Set(["publish_page", "publish_app"]);
+
/** A tool name as a thread's activity row or a stream event gives it, without its server. */
export function bareToolName(name: string): string {
return name.replace(/^mcp__[^_]+(?:_[^_]+)*?__/, "");
@@ -19,12 +25,17 @@ export interface CaseScore {
searched: boolean;
}
-/** The first of the turn's tool calls that isn't a lookup decides the case; a later right tool still counts, since the tool list is what's on trial. */
-export function scoreCase(testCase: Pick<ToolChoiceCase, "tools">, calls: readonly string[]): CaseScore {
+/** The first of the turn's tool calls that isn't a lookup decides the case; a later right tool still counts, since the tool list is what's on trial.
+ * A case with no tools passes on any turn that reaches none of its `never` tools; a turn that published must also say what `publishSays` asks. */
+export function scoreCase(testCase: Pick<ToolChoiceCase, "tools" | "never" | "publishSays">, calls: readonly string[], reply = ""): CaseScore {
const names = calls.map(bareToolName);
const lookups = new Set(["find_tool", "ToolSearch"]);
const chosen = names.find((name) => testCase.tools.includes(name));
- return { pass: chosen !== undefined, chosen: chosen ?? names.find((name) => !lookups.has(name)), searched: names.some((name) => lookups.has(name)) };
+ const forbidden = names.find((name) => testCase.never?.includes(name));
+ const published = names.some((name) => PUBLISH_TOOLS.has(name));
+ const said = !published || !testCase.publishSays || new RegExp(testCase.publishSays, "i").test(reply);
+ const reached = testCase.tools.length === 0 || chosen !== undefined;
+ return { pass: reached && !forbidden && said, chosen: forbidden ?? chosen ?? names.find((name) => !lookups.has(name)), searched: names.some((name) => lookups.has(name)) };
}
/** Pass rate, plus what a bridge or a shorter prompt has to beat. */
diff --git a/server/agents-bridge-switch.test.ts b/server/agents-bridge-switch.test.ts
index abe3935de5..eee930522f 100644
--- a/server/agents-bridge-switch.test.ts
+++ b/server/agents-bridge-switch.test.ts
@@ -815,8 +815,9 @@ describe("the prompt of a bridged turn", () => {
const bridged = { env: { OMB_AGENTS_TOOL_BRIDGE: "1", OMB_BOT_ID: "bot-1" } };
it("is unchanged, to the byte, without the bridge", () => {
- const plain = buildSystemPrompt("You are Kiwi.", "Be brief.", parts);
- expect(buildSystemPrompt("You are Kiwi.", "Be brief.", parts, undefined)).toEqual(plain);
+ // With the agents tools mounted the reply habits also say how to publish; nothing else differs.
+ expect(buildSystemPrompt("You are Kiwi.", "Be brief.", parts, undefined)).toEqual(buildSystemPrompt("You are Kiwi.", "Be brief.", parts));
+ const plain = buildSystemPrompt("You are Kiwi.", "Be brief.", parts, { env: {} });
expect(buildSystemPrompt("You are Kiwi.", "Be brief.", parts, { env: { OMB_AGENTS_TOOL_BRIDGE: "0" } })).toEqual(plain);
expect(buildSystemPrompt("You are Kiwi.", "Be brief.", parts, { env: {} })).toEqual(plain);
expect(buildSystemPrompt("You are Kiwi.", "Be brief.", parts, {})).toEqual(plain);
@@ -832,7 +833,7 @@ describe("the prompt of a bridged turn", () => {
expect(section.bytes).toBe(Buffer.byteLength(AGENTS_TOOL_BRIDGE_PROMPT, "utf8"));
expect(built.text.split(AGENTS_TOOL_BRIDGE_PROMPT)).toHaveLength(2);
// every other section is exactly what it was
- const plain = buildSystemPrompt("You are Kiwi.", "Be brief.", parts);
+ const plain = buildSystemPrompt("You are Kiwi.", "Be brief.", parts, { env: {} });
expect(built.sections.filter((entry) => entry.id !== "tool-bridge")).toEqual(plain.sections);
expect(built.text.replace(AGENTS_TOOL_BRIDGE_PROMPT, "")).toBe(plain.text);
// the decision's own output is what switches it: off for an engine or a bot that is turned down
diff --git a/server/drivers/agents-catalog-goldens/bridged.profiles.json b/server/drivers/agents-catalog-goldens/bridged.profiles.json
index 994e2c879a..a2adb03aa9 100644
--- a/server/drivers/agents-catalog-goldens/bridged.profiles.json
+++ b/server/drivers/agents-catalog-goldens/bridged.profiles.json
@@ -1,7 +1,7 @@
{
"default": {
- "bytes": 18126,
- "sha256": "b3437b83e63a11bb6139469bb54ed47c9b5e226a6bd1e0831a5766a5cccb5e66",
+ "bytes": 18245,
+ "sha256": "2a93929375a1d3c5e5eed3036fca6a7e8ea25120d5f3d8bbabcc02b394f4bca1",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -24,8 +24,8 @@
]
},
"voice": {
- "bytes": 18907,
- "sha256": "730ca4ece527802a1b38f89ebfa1f36b95c5dcdd5fa29809fc075d9f8cec9705",
+ "bytes": 19026,
+ "sha256": "2b261d414d308445eb71e891dc9ed5e33ba320747f516020e28c384aec8339ed",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -49,8 +49,8 @@
]
},
"shared": {
- "bytes": 18166,
- "sha256": "aca18462b4c04bc181e831556db94e951c497d1210ce74eb5b4b903fa28e8f92",
+ "bytes": 18285,
+ "sha256": "9842da949a6a941b560765832edc6cd680ec558bb5fe905942fb9211737aea96",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -73,8 +73,8 @@
]
},
"shared+voice": {
- "bytes": 18947,
- "sha256": "dae4059f091c44600dc1f38b5b43909038686aa71dcb41d6a043c5a789d7d473",
+ "bytes": 19066,
+ "sha256": "82c2243d40eaa774add9d710238d72673b36e41ed1d3ab7cd42696851f4aefa3",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -98,8 +98,8 @@
]
},
"skills": {
- "bytes": 18153,
- "sha256": "01eb6139cc5309977fe763c544a4970cd7983240fdeeddf8252fc82bbea29dbf",
+ "bytes": 18272,
+ "sha256": "61411e004e87ac563fa807953cc86653c837e8bc0b73b50cb337e08be614b74a",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -122,8 +122,8 @@
]
},
"skills+voice": {
- "bytes": 18934,
- "sha256": "ea7669e99dd35223e0b324c16d1632d4fb91712318cdca409eb295fbd1af2b32",
+ "bytes": 19053,
+ "sha256": "455e28eadca1d4c9b77f25ef5a6face3c6185e50965d253e313c2811b6fcf8f6",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -147,8 +147,8 @@
]
},
"skills+shared": {
- "bytes": 18193,
- "sha256": "71d303af856cabd3002a155d33cccb8f09ada60e1ed735b5bf159d255dac2266",
+ "bytes": 18312,
+ "sha256": "dea8ac9005b8f8caec62f92cc1a2bd49e7c2f5cc34ab889f60c69d7309c477a2",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -171,8 +171,8 @@
]
},
"skills+shared+voice": {
- "bytes": 18974,
- "sha256": "51fa1f1f325807ae210093a6e2ada88d0976884f520f21b9a9ad2b62ad2ce184",
+ "bytes": 19093,
+ "sha256": "1b35bb38e8cc8447f9811a3bf47c6bea5f07b0309d8c92bfc3bde61113975896",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -196,8 +196,8 @@
]
},
"non-chief": {
- "bytes": 18009,
- "sha256": "f6653006d84be755000091494973216e634d700744efc1e9ec151a2d6e6c0c28",
+ "bytes": 18128,
+ "sha256": "e06333b5e6e64a5535078e1435329f34e1d3b94a3ab71455eb43d7ae58386ee1",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -220,8 +220,8 @@
]
},
"voice+non-chief": {
- "bytes": 18790,
- "sha256": "e83db054fd04ff9b2ea9717ae1717eed094b6c6e67797db8def8696130e5c821",
+ "bytes": 18909,
+ "sha256": "e89bd11fbaec4fc8f21f1206e683c60dbe78ba29afded80dbd0738fd116f225b",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -245,8 +245,8 @@
]
},
"shared+non-chief": {
- "bytes": 18049,
- "sha256": "5933f671d38d6dc2cab1d0fa2538dca5948393aaefe345b7eaf1699dd4d79ab1",
+ "bytes": 18168,
+ "sha256": "e1dce5bdb87aad3ed7e574d678c1ca852d08a264b31fa0ce62b8fda482beca93",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -269,8 +269,8 @@
]
},
"shared+voice+non-chief": {
- "bytes": 18830,
- "sha256": "732fd1914cdfa7d780cbdf019283a2b4a6d1dae790e8f9e276e4109af693d0c2",
+ "bytes": 18949,
+ "sha256": "78717dc15cbe1583615962c329b645b0a6b40e7f0eb3b5c1fc8703651c2fe558",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -294,8 +294,8 @@
]
},
"skills+non-chief": {
- "bytes": 18036,
- "sha256": "977043bb4ed3d5439ed37a8f43e0c0bf31b2ad5fdf4ca8b2a389616c4ca54eee",
+ "bytes": 18155,
+ "sha256": "8733cf767e6bad77b1eab37c6a39b4b4c1f36abb52d67fe13710b4c0d82059ff",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -318,8 +318,8 @@
]
},
"skills+voice+non-chief": {
- "bytes": 18817,
- "sha256": "4de1171bc182a3c8790a6da3499788b451b96f798749563a8e485a3661decc8e",
+ "bytes": 18936,
+ "sha256": "894d77ea7a601596cc012cf6a3d28936c7f12ed78600b59e4dbf19049cb6b219",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -343,8 +343,8 @@
]
},
"skills+shared+non-chief": {
- "bytes": 18076,
- "sha256": "22000967d92c0185299b9cec42926f20c51c62de7814cb96437f6fb6af35f611",
+ "bytes": 18195,
+ "sha256": "ebef2917c047555723fd0dc7233369df005ff525d898e550f6394ae4c0c0cae4",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -367,8 +367,8 @@
]
},
"skills+shared+voice+non-chief": {
- "bytes": 18857,
- "sha256": "ecfe96872e20f6daa704200ffa775f08b37cb40affce553ff79cccde2bedddc9",
+ "bytes": 18976,
+ "sha256": "b0f0c51da80732551cbf232edac3c71e125a29b5fa33e6f595110537ac7fd68f",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -392,8 +392,8 @@
]
},
"skills+shared+voice+cloud-home": {
- "bytes": 18990,
- "sha256": "b79b8133d51c64b7dbf1f361358080f8ed23ada7753963b55ff331800167ef38",
+ "bytes": 19109,
+ "sha256": "0fac8ce98dd6689b2d417a3dd5de7bdd0683a84b48ed74ccd7e2c61d6a6adc05",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -417,8 +417,8 @@
]
},
"skills+shared+voice+non-chief+cloud-home": {
- "bytes": 18873,
- "sha256": "a4e1ebdd4dee57df13f6b2c733204d65825631e55c0d03949d273782b1af6d3c",
+ "bytes": 18992,
+ "sha256": "001cd860ebf5027954f629b83201983ac76e5638d3f36c6ee826bf732b78ce6c",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -442,8 +442,8 @@
]
},
"skills+shared+voice+x": {
- "bytes": 19035,
- "sha256": "ebf87387dae6fff8b76f6626bab7d7fb71bcc9a5dd2ef9b1869b38c5c3995224",
+ "bytes": 19154,
+ "sha256": "4eb77d3d0fc42f86e0ffcd155258b32fdea6080193acd63f870a3f32c1895a99",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -467,8 +467,8 @@
]
},
"skills+shared+voice+x+team": {
- "bytes": 19035,
- "sha256": "ebf87387dae6fff8b76f6626bab7d7fb71bcc9a5dd2ef9b1869b38c5c3995224",
+ "bytes": 19154,
+ "sha256": "4eb77d3d0fc42f86e0ffcd155258b32fdea6080193acd63f870a3f32c1895a99",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -492,8 +492,8 @@
]
},
"skills+shared+voice+x+team+images": {
- "bytes": 19063,
- "sha256": "44fa4a50aeff87e10107dd78c950bdee143b4949fc9ab4443b69545f2f6b055f",
+ "bytes": 19182,
+ "sha256": "731b9f6c4ec8236cd6c544b7d112cdc09887b5565a009bb7745c0d35151d8014",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -517,8 +517,8 @@
]
},
"default+legacy-switches": {
- "bytes": 18126,
- "sha256": "b3437b83e63a11bb6139469bb54ed47c9b5e226a6bd1e0831a5766a5cccb5e66",
+ "bytes": 18245,
+ "sha256": "2a93929375a1d3c5e5eed3036fca6a7e8ea25120d5f3d8bbabcc02b394f4bca1",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -541,8 +541,8 @@
]
},
"default+mausbot": {
- "bytes": 18178,
- "sha256": "893a48643cc3b1adda5f75337241b89e3460f759cf1535c9c7803ecf163d4582",
+ "bytes": 18297,
+ "sha256": "d419c897e68ec940552ab25e2d7daf274ee3e50510b8cad296c0c3eeb20a1148",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -565,8 +565,8 @@
]
},
"skills+shared+voice+mausbot": {
- "bytes": 19026,
- "sha256": "4d254f408532c95a8349654608b8c5a22cdb4cfcf09d39123f00c3134f6892d7",
+ "bytes": 19145,
+ "sha256": "33bbb8c054de2170a1301d562a7d15d6430bc59f0f2982531f293d59cf9da58a",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -590,8 +590,8 @@
]
},
"default+no-computer-pick": {
- "bytes": 16914,
- "sha256": "73d0c92b75947356d6eda049d2ec0db10f5268b758cabcf7042b61e2bf2877a5",
+ "bytes": 17033,
+ "sha256": "fb1782fb841e04a4139549bb49cd3449e9448df3a8bff79e68bc3325c3c4cbbf",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -613,8 +613,8 @@
]
},
"default+room": {
- "bytes": 16843,
- "sha256": "53528c74d0bd5836167050f04953a3c56c4bb764b233e271058688835e6d50e5",
+ "bytes": 16962,
+ "sha256": "35866994b1c370e878c4101665054cda1e9f933f4d376916cc535e64c7e285d7",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -636,8 +636,8 @@
]
},
"non-chief+room": {
- "bytes": 16726,
- "sha256": "1e7febdfe9eb58670801fdcdd8fc3c871c982a812b73beda15c3b9d3a0c1d497",
+ "bytes": 16845,
+ "sha256": "79f16a4322af6e577654f2237900425ead78ea699c60851239ebc7a3e8a83452",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -659,8 +659,8 @@
]
},
"default+images": {
- "bytes": 18154,
- "sha256": "8148a7015ab0b1783c91c3a650f277f91afe908ea31b5f385cc02874899de599",
+ "bytes": 18273,
+ "sha256": "a4832c849a048fe6ba070df3315a50cd62267b313ec09c588c385489a990d219",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -683,8 +683,8 @@
]
},
"skills+shared+voice+x+team+images+hosting": {
- "bytes": 20265,
- "sha256": "c98264a5374f8be4fc1c99f760c8bb19f308a69ad53ecb2ed58261ba1e2803e2",
+ "bytes": 20445,
+ "sha256": "4d67bf64d207fd6ced8d903ffae0dc13606ef555757c208b8cc28bd9b19ca266",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -709,8 +709,8 @@
]
},
"default+hosting": {
- "bytes": 19328,
- "sha256": "6006b01b13236f08c46d10524a6d70a930d6025db0115944c5ea7530e9497239",
+ "bytes": 19508,
+ "sha256": "5cd9c4fe2f6d3bf499ff7aeecde290fa2f7222c233b4f9a7ecabe9ba0a1a43cd",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -734,8 +734,8 @@
]
},
"skills+shared+voice+x+team+board": {
- "bytes": 19072,
- "sha256": "d198bf375aa2ac35a2aa8694dcb39cf42695c67c3b8e72c2a17f98b656cb93da",
+ "bytes": 19191,
+ "sha256": "425ef2791635a7b2c35ce83929449acbf9f2865bc893d1095850d8799cd05f38",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -759,8 +759,8 @@
]
},
"default+room+board": {
- "bytes": 16880,
- "sha256": "89b038002de0fefa95dec1bfab26bfde8b5ab17e1364a43d50a2c9c0eab67f7b",
+ "bytes": 16999,
+ "sha256": "7b62b5ec077eafe503cbca8be9c976e1e44cf95711891b11abb43920bb5a681c",
"tools": [
"tool_result_read",
"list_room_targets",
diff --git a/server/drivers/agents-catalog-goldens/bridged.tools-list.json b/server/drivers/agents-catalog-goldens/bridged.tools-list.json
index ebc0f9edea..58a8d6e9fc 100644
--- a/server/drivers/agents-catalog-goldens/bridged.tools-list.json
+++ b/server/drivers/agents-catalog-goldens/bridged.tools-list.json
@@ -187,7 +187,7 @@
},
{
"name": "publish_page",
- "description": "Publish a page you made to a public link, only when the person asks to share or publish it: an .html file, or a folder with an index.html (static files and data too, up to 5 MB). Publishing the same path again, or passing page_id, updates the same link. Never publish secrets or personal details the person didn't ask to share. For a data dashboard, follow the data-dashboards skill.",
+ "description": "Publish a page you made to a public link anyone with it can open, when the person wants others to open it (share, send to someone, post) or asks to publish it: an .html file, or a folder with an index.html (static files and data too, up to 5 MB). Publishing the same path again, or passing page_id, updates the same link. Never publish secrets, or money, health, ID or customer details the person didn't ask to make public; give the file instead. For a data dashboard, follow the data-dashboards skill.",
"inputSchema": {
"type": "object",
"additionalProperties": false,
@@ -441,7 +441,7 @@
},
{
"name": "publish_app",
- "description": "Put a site or simple app you built online on the hosting the person's Cloud plan includes: static files, no account or token. The link is public at once: publish only after the person saw or was told what it is and said yes. The same project published again keeps its link. action delete takes the app down for good, only when the person asks. Follow the publish-to-netlify skill; when the plan can't take the app, offer the person's own Netlify account.",
+ "description": "Put a site or simple app you built online on the hosting the person's Cloud plan includes: static files, no account or token. The link is public at once: publish only after the person saw or was told what it is and said yes; a page or report to share goes through publish_page instead. The same project published again keeps its link. action delete takes the app down for good, only when the person asks. Follow the publish-to-netlify skill; when the plan can't take the app, offer the person's own Netlify account.",
"inputSchema": {
"type": "object",
"additionalProperties": false,
diff --git a/server/drivers/agents-catalog-goldens/full.tools-list.json b/server/drivers/agents-catalog-goldens/full.tools-list.json
index b057cae2cb..f438c60de2 100644
--- a/server/drivers/agents-catalog-goldens/full.tools-list.json
+++ b/server/drivers/agents-catalog-goldens/full.tools-list.json
@@ -659,7 +659,7 @@
},
{
"name": "publish_page",
- "description": "Publish a page you made to a public link, only when the person asks to share or publish it: an .html file, or a folder with an index.html (static files and data too, up to 5 MB). Publishing the same path again, or passing page_id, updates the same link. Never publish secrets or personal details the person didn't ask to share. For a data dashboard, follow the data-dashboards skill.",
+ "description": "Publish a page you made to a public link anyone with it can open, when the person wants others to open it (share, send to someone, post) or asks to publish it: an .html file, or a folder with an index.html (static files and data too, up to 5 MB). Publishing the same path again, or passing page_id, updates the same link. Never publish secrets, or money, health, ID or customer details the person didn't ask to make public; give the file instead. For a data dashboard, follow the data-dashboards skill.",
"inputSchema": {
"type": "object",
"additionalProperties": false,
@@ -1508,7 +1508,7 @@
},
{
"name": "publish_app",
- "description": "Put a site or simple app you built online on the hosting the person's Cloud plan includes: static files, no account or token. The link is public at once: publish only after the person saw or was told what it is and said yes. The same project published again keeps its link. action delete takes the app down for good, only when the person asks. Follow the publish-to-netlify skill; when the plan can't take the app, offer the person's own Netlify account.",
+ "description": "Put a site or simple app you built online on the hosting the person's Cloud plan includes: static files, no account or token. The link is public at once: publish only after the person saw or was told what it is and said yes; a page or report to share goes through publish_page instead. The same project published again keeps its link. action delete takes the app down for good, only when the person asks. Follow the publish-to-netlify skill; when the plan can't take the app, offer the person's own Netlify account.",
"inputSchema": {
"type": "object",
"additionalProperties": false,
diff --git a/server/drivers/agents-catalog-goldens/profiles.json b/server/drivers/agents-catalog-goldens/profiles.json
index e941a43a1e..325747e827 100644
--- a/server/drivers/agents-catalog-goldens/profiles.json
+++ b/server/drivers/agents-catalog-goldens/profiles.json
@@ -1,7 +1,7 @@
{
"default": {
- "bytes": 61811,
- "sha256": "93105c87edae0e1012388db03e9b786228e0c02b0124c8784cdeb1331660d029",
+ "bytes": 61930,
+ "sha256": "a65e8962d28052d964b58ca6d84b0e147b3cadec279d0c232c9c0875c7d3135d",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -61,8 +61,8 @@
]
},
"voice": {
- "bytes": 62592,
- "sha256": "8eaead0fe41c326689b2d05c58c86eb93351cbdc2dd6493533c96dd25364f7f3",
+ "bytes": 62711,
+ "sha256": "e92dc413deed6bf1f4df6e65a006d130abc2cbe58ef6480bdf55f781a45813b9",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -123,8 +123,8 @@
]
},
"shared": {
- "bytes": 64076,
- "sha256": "77608035e01590409cf18a4b4d0ef814fe2025bef3f4942ce0f5f36b15c5a250",
+ "bytes": 64195,
+ "sha256": "2bf6389bb361c21a511b038e3d7111690f521be007b583ab4a229544435aae83",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -186,8 +186,8 @@
]
},
"shared+voice": {
- "bytes": 64857,
- "sha256": "459b8374aed3bd048e0f1f77e61d6f42f71af7cab9bd081abe4cbb26bb3155b9",
+ "bytes": 64976,
+ "sha256": "2576899ca76c7d58071ff43b6a78021bb8717819b94308511dc4519e3a5facf3",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -250,8 +250,8 @@
]
},
"skills": {
- "bytes": 64234,
- "sha256": "40a0c335730b1fcbf6993f62886ace018b343e1485c1d66a825d5a653d86ba6f",
+ "bytes": 64353,
+ "sha256": "1edfb156365442abd9acb64ee5b041a7cd557cad345b5b9cda98d0c76b4ef74c",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -313,8 +313,8 @@
]
},
"skills+voice": {
- "bytes": 65015,
- "sha256": "cd17687cc3d5ed6b990b70494d2a7c39a59565f607f443b2f27a522c5eacbe41",
+ "bytes": 65134,
+ "sha256": "71af21abb3e7e4e48db4ad20977194aaa1d6508674c5541eb9663466a5ff206b",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -377,8 +377,8 @@
]
},
"skills+shared": {
- "bytes": 66499,
- "sha256": "5d37cc0b89703ea345e721e1b5c37b18cd9c192083aa80ce0b65e2eb4b65f20f",
+ "bytes": 66618,
+ "sha256": "df97c48fb1e12d4b53966815e4d01282b87895cc7f73bb2904d1139c1360cbd9",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -442,8 +442,8 @@
]
},
"skills+shared+voice": {
- "bytes": 67280,
- "sha256": "244ba51255a8ae679d2fa9c0a49055e9b327ec50eacfd61f537544a0fee72e94",
+ "bytes": 67399,
+ "sha256": "f618d15812bb6ded48bf631d8b2ab479e9a54a71f92d49f655296440547eae9e",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -508,8 +508,8 @@
]
},
"non-chief": {
- "bytes": 53263,
- "sha256": "541f9236cdff8ecb9440fa4942a1aa8abcb5c650c416deb5b5aeba5a5e092d9c",
+ "bytes": 53382,
+ "sha256": "44e8614384e32d01e28201aef51270a39251b8ef046dae740526342b1936cc6b",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -562,8 +562,8 @@
]
},
"voice+non-chief": {
- "bytes": 54044,
- "sha256": "4a8c6cf0368184df6295f68e2d37636b5790698728b0b879d521ece75356d45e",
+ "bytes": 54163,
+ "sha256": "290dcf1542727f4452393c5e5abe7188d1e0419bb882ba9bde3e7178791f5347",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -617,8 +617,8 @@
]
},
"shared+non-chief": {
- "bytes": 55528,
- "sha256": "08c930970af939542f519a242abd475cb522a068b8acb9891f98213d67a0b12a",
+ "bytes": 55647,
+ "sha256": "ebea13a5c2d0126c142cbecc71255fd9dfaacdf3f20a8c91ee9b70ac1ab7b223",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -673,8 +673,8 @@
]
},
"shared+voice+non-chief": {
- "bytes": 56309,
- "sha256": "2ce571c0e232e32c51b061063b3759aed1d9771829e9382b995fa2177fe0ac52",
+ "bytes": 56428,
+ "sha256": "e462bc4f216364e161cc19d5cb06034702f323dba25df84130858105b16f1245",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -730,8 +730,8 @@
]
},
"skills+non-chief": {
- "bytes": 55686,
- "sha256": "67c3865f927e014e60352133fd3512d1542e3140dfe78d2bcb90f56c9811fd4b",
+ "bytes": 55805,
+ "sha256": "1c48e49ea6b20f06eb440d60af329e5b69e8a38c7de01881a7026b8fed90c5a4",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -786,8 +786,8 @@
]
},
"skills+voice+non-chief": {
- "bytes": 56467,
- "sha256": "27720eec57ea58134715b0a7f5238409ac8ea854906d4e8c63e492b7c460fcaa",
+ "bytes": 56586,
+ "sha256": "12d267327a3ae5f3e3563daf06b2ba96d500112a1e28171deb8b651c52f5c5b2",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -843,8 +843,8 @@
]
},
"skills+shared+non-chief": {
- "bytes": 57951,
- "sha256": "18d9e4b76532fb0b6f3b09ec14e2d02a9f08dd75c75bbbb3af76e7cb6bb0d084",
+ "bytes": 58070,
+ "sha256": "79eb4aa0b4f22bbe7443798bc114a9c7eb335e69364ac7a485ece0069dacac95",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -901,8 +901,8 @@
]
},
"skills+shared+voice+non-chief": {
- "bytes": 58732,
- "sha256": "a737f6b06e92c086ff379443ffb80bf938a1e04fa5156b61af480e941851f1dd",
+ "bytes": 58851,
+ "sha256": "595af6bada9a18a58286fb1dd2ee96e0de7f24273c6c0a69728eb871a8aadf09",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -960,8 +960,8 @@
]
},
"skills+shared+voice+cloud-home": {
- "bytes": 67036,
- "sha256": "acf15e8eeab0927b30724678acad40703c2bfd3839151c34dc73de0e2bfcd132",
+ "bytes": 67155,
+ "sha256": "0388ef4fb0ae98f5d54e68207b16fa67f7779999133022bbec5f195b43ef8462",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -1026,8 +1026,8 @@
]
},
"skills+shared+voice+non-chief+cloud-home": {
- "bytes": 58488,
- "sha256": "43ce2b51004a28d6fbf65b4f6ec55f5ab6bc3ba67cc5a05585b657bb9c5118d7",
+ "bytes": 58607,
+ "sha256": "77fa87f60ac3fd54217a42675567f70732e892403644596f656bb0289d051d63",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -1085,8 +1085,8 @@
]
},
"skills+shared+voice+x": {
- "bytes": 71119,
- "sha256": "11e393ae7a47d26692cb73da3d73d58121e314b39a52cc6b4cc29a1fb00c4806",
+ "bytes": 71238,
+ "sha256": "9874ec1c9a40c5d3447620bcf19ef8657b30260ca255656c14c6b6e2d50a8137",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -1155,8 +1155,8 @@
]
},
"skills+shared+voice+x+team": {
- "bytes": 71119,
- "sha256": "11e393ae7a47d26692cb73da3d73d58121e314b39a52cc6b4cc29a1fb00c4806",
+ "bytes": 71238,
+ "sha256": "9874ec1c9a40c5d3447620bcf19ef8657b30260ca255656c14c6b6e2d50a8137",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -1225,8 +1225,8 @@
]
},
"skills+shared+voice+x+team+images": {
- "bytes": 73066,
- "sha256": "c84de8dd6e1eea6e4a856e64e2e3914ea1501dfe92ba7bd241b02fd9f4f6f354",
+ "bytes": 73185,
+ "sha256": "1092a1025a4438ba0bdf408d43248ec8c470ef3728407bcfa55de8072cf85640",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -1297,8 +1297,8 @@
]
},
"default+legacy-switches": {
- "bytes": 61811,
- "sha256": "93105c87edae0e1012388db03e9b786228e0c02b0124c8784cdeb1331660d029",
+ "bytes": 61930,
+ "sha256": "a65e8962d28052d964b58ca6d84b0e147b3cadec279d0c232c9c0875c7d3135d",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -1358,8 +1358,8 @@
]
},
"default+mausbot": {
- "bytes": 62462,
- "sha256": "5883cfe256f6e49a17cbac3b19c48b09cf03f2c28d216acf855d00c844af1b80",
+ "bytes": 62581,
+ "sha256": "e097cd885c263afb016ea9da10003849c86af1a6188ae26363bb7bd28fc75969",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -1421,8 +1421,8 @@
]
},
"skills+shared+voice+mausbot": {
- "bytes": 67931,
- "sha256": "7f651a2057dffa10cc0a589620cdc44c0bd781a1818ac55d3647d3f49bee37f7",
+ "bytes": 68050,
+ "sha256": "b274c7e134ff82e36d5042ca652277353ee39a66e30f4d2f1693713ef0be604c",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -1489,8 +1489,8 @@
]
},
"default+no-computer-pick": {
- "bytes": 60599,
- "sha256": "3a1e522b0c152fccb92a2eb764f7c35dc5c14a9ae7fa5a6778e9562d5bedb1e9",
+ "bytes": 60718,
+ "sha256": "1b7ca70917cd25bff462a14126faf2a6e05211f1d62ca8f8f20eca69bc2c9635",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -1549,8 +1549,8 @@
]
},
"default+room": {
- "bytes": 57159,
- "sha256": "dbb06cd45508eabf7dd22288814f2ad8edb891215182f7c54cd3e9912c66425c",
+ "bytes": 57278,
+ "sha256": "d3f1c89a65cb4724160561aa9b59e0c89758c92fff0b2656442f2d8ec24859a6",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -1603,8 +1603,8 @@
]
},
"non-chief+room": {
- "bytes": 48611,
- "sha256": "d982340d902fa490144e5987cd943572f8bc6eb4a429f55077e5e87f220bd006",
+ "bytes": 48730,
+ "sha256": "48384b845f7ba0c6bc4e760f11698e1a7123dd98ff4408dc78d265883769f993",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -1650,8 +1650,8 @@
]
},
"default+images": {
- "bytes": 63758,
- "sha256": "581df1e99e609e8fb05f0ac1b9100454a5122033fd726585b79bbb2d3808042a",
+ "bytes": 63877,
+ "sha256": "38ee364e9c805a8785ddec6a32fbaa0787272f9c2e03f15dbd68dd193fa5bbd2",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -1713,8 +1713,8 @@
]
},
"skills+shared+voice+x+team+images+hosting": {
- "bytes": 74929,
- "sha256": "cbff275fcf30b239d85f012ddf168e5daf19f161505ca1b591375a6cd89814a3",
+ "bytes": 75109,
+ "sha256": "d201aba823acbfaa03a94f2f2245ddca5e9eb972cf376e506a6f841979339b59",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -1787,8 +1787,8 @@
]
},
"default+hosting": {
- "bytes": 63674,
- "sha256": "fdeaf37ac31f3988c07f3fe2b12afe0572c737dafc1056aee57fe1ec7ae64570",
+ "bytes": 63854,
+ "sha256": "c6b57b5a36b2f11b3f142708ff7aa7b097e3bd9e745315a7ae680eadb2cc8a33",
"tools": [
"tool_result_read",
"list_room_targets",
@@ -1850,8 +1850,8 @@
]
},
"skills+shared+voice+x+team+board": {
- "bytes": 73174,
- "sha256": "d46665daa960c578591c55d8ac9cf30c20860f14bd92bb894dc9a0b7d557fb54",
+ "bytes": 73293,
+ "sha256": "7a53af64aa7d68385c5d3cf4b31b7fe90f4538dd2da5410e6e7dafdad296f773",
"tools": [
"tool_result_read",
"list_shared_computers",
@@ -1923,8 +1923,8 @@
]
},
"default+room+board": {
- "bytes": 59214,
- "sha256": "c86f380f525bfe5c61e11327288a838339ee8ccd1ac237374da5b9514d060c20",
+ "bytes": 59333,
+ "sha256": "16b32642ffd54aa13bd400e1a9e74b97a1dad3d7f4ead1f1841d81e75e9c1b17",
"tools": [
"tool_result_read",
"list_room_targets",
diff --git a/server/drivers/agents-hosting-tools.ts b/server/drivers/agents-hosting-tools.ts
index 165c8be0e3..3bd11af6f1 100644
--- a/server/drivers/agents-hosting-tools.ts
+++ b/server/drivers/agents-hosting-tools.ts
@@ -17,7 +17,7 @@ export const HOSTING_TOOL_DEFINITIONS = [
{
name: "publish_app",
description:
- "Put a site or simple app you built online on the hosting the person's Cloud plan includes: static files, no account or token. The link is public at once: publish only after the person saw or was told what it is and said yes. The same project published again keeps its link. action delete takes the app down for good, only when the person asks. Follow the publish-to-netlify skill; when the plan can't take the app, offer the person's own Netlify account.",
+ "Put a site or simple app you built online on the hosting the person's Cloud plan includes: static files, no account or token. The link is public at once: publish only after the person saw or was told what it is and said yes; a page or report to share goes through publish_page instead. The same project published again keeps its link. action delete takes the app down for good, only when the person asks. Follow the publish-to-netlify skill; when the plan can't take the app, offer the person's own Netlify account.",
inputSchema: {
type: "object",
additionalProperties: false,
diff --git a/server/drivers/agents-pages-tools.ts b/server/drivers/agents-pages-tools.ts
index a674b06769..50860c5308 100644
--- a/server/drivers/agents-pages-tools.ts
+++ b/server/drivers/agents-pages-tools.ts
@@ -17,7 +17,7 @@ export const PAGE_TOOL_DEFINITIONS = [
{
name: "publish_page",
description:
- "Publish a page you made to a public link, only when the person asks to share or publish it: an .html file, or a folder with an index.html (static files and data too, up to 5 MB). Publishing the same path again, or passing page_id, updates the same link. Never publish secrets or personal details the person didn't ask to share. For a data dashboard, follow the data-dashboards skill.",
+ "Publish a page you made to a public link anyone with it can open, when the person wants others to open it (share, send to someone, post) or asks to publish it: an .html file, or a folder with an index.html (static files and data too, up to 5 MB). Publishing the same path again, or passing page_id, updates the same link. Never publish secrets, or money, health, ID or customer details the person didn't ask to make public; give the file instead. For a data dashboard, follow the data-dashboards skill.",
inputSchema: {
type: "object",
additionalProperties: false,
diff --git a/server/index.ts b/server/index.ts
index b85c75db39..e1c11d9c82 100644
--- a/server/index.ts
+++ b/server/index.ts
@@ -2936,7 +2936,7 @@ function previewSystemPrompt(bot: BotRecord) {
teamAvailabilityPart(agentsMounted && coordination ? peers : []),
{ id: "memory-rules", label: "How memory works", text: memoryRulesPrompt(bot.id, { managedWrites: agentsMounted, fileTools: Boolean(privateWorkspace), enabled: bot.memoryEnabled !== false }) }, { id: "memory", label: "Memory", text: memoryNotesPrompt(bot.id, { managedWrites: agentsMounted, fileTools: Boolean(privateWorkspace), enabled: bot.memoryEnabled !== false }) },
{ id: "skills", label: "Skills index", text: privateWorkspace ? skillsHost.skillsIndex(bot, undefined, instance) : "" },
- ], agentsMounted ? { env: agentsToolBridgeEnv(cfg, bot, instance && turnEngine(instance, providerConfigs(), registry.lastSnapshot(instance.instanceId), bot.cwd ?? undefined)) } : undefined, { replyStyle: bot.replyStyle, rules: cfg.everyBotRules });
+ ], agentsMounted ? { env: agentsToolBridgeEnv(cfg, bot, instance && turnEngine(instance, providerConfigs(), registry.lastSnapshot(instance.instanceId), bot.cwd ?? undefined)) } : undefined, { replyStyle: bot.replyStyle, rules: cfg.everyBotRules, pagesOff: bot.toolsOff?.includes("pages") });
const totalBytes = built.sections.reduce((n, s) => n + s.bytes, 0);
return {
sections: built.sections,
@@ -8283,7 +8283,7 @@ async function beginTurn(
{ id: "webhook", label: "Webhook provenance", text: opts?.automationSource === "webhook" ? WEBHOOK_PROMPT : opts?.automationSource === "api" ? (botApiThread(threadId) ? BOT_API_PROMPT : BOT_API_OWNER_PROMPT) : "" },
{ id: "automation-reply", label: "Automation reply", text: opts?.automationSource && automationReports.reportsElsewhere(threadId) ? AUTOMATION_REPLY_PROMPT : "" },
{ id: "mentions", label: "Mentions", text: (tagged.length ? `The user named these existing teammates: ${tagged.map(b => `${peerName(b.name)} (${b.id})`).join(", ")}. Use coordinate_bots when their contribution is needed; do not substitute native helper agents for these bots.` : "") + placesElsewhere.mentioned(providerText, store.bots) },
- ].filter((part) => (apiFenced ? BOT_API_PARTS.has(part.id) : !confined || READ_AND_DRAFT_PARTS.has(part.id))), integrations.agents, { replyStyle: liveBot?.replyStyle ?? bot.replyStyle, rules: cfg.everyBotRules }); setup.lap("prompt");
+ ].filter((part) => (apiFenced ? BOT_API_PARTS.has(part.id) : !confined || READ_AND_DRAFT_PARTS.has(part.id))), integrations.agents, { replyStyle: liveBot?.replyStyle ?? bot.replyStyle, rules: cfg.everyBotRules, pagesOff: (liveBot ?? bot).toolsOff?.includes("pages") }); setup.lap("prompt");
turnPromptBytes.set(threadId, { stable: Buffer.byteLength(prompt.stable), volatile: Buffer.byteLength(prompt.volatile) });
// Recall rides in front of this turn's message, never the system prompt, whose volatile half is re-sent whole on any change.
const recalled = autoRecallPrompt(bot, threadId, resolvedImages.text, {
@@ -10043,7 +10043,7 @@ async function runClaimedGroupMemberTurn(
{ id: "skills", label: "Skills index", text: workspace ? skillsHost.skillsIndex(bot, threadId, instance, cwd ?? null) : "" },
{ id: "skill-instructions", label: "Skill instructions", text: renderSkillInstructions(selectedSkills, { includeRoot: Boolean(workspace) }) },
{ id: "playbooks", label: "Playbooks", text: installedPlaybookInstructions(text, bot.playbooks) },
- ], integrations.agents, { rules: cfg.everyBotRules });
+ ], integrations.agents, { rules: cfg.everyBotRules, pagesOff: (store.bot(bot.id) ?? bot).toolsOff?.includes("pages") });
// Claim /learn only after setup succeeded, so a failed first responder does not consume it.
if (skillAuthoring) skillAuthoringClaim.claimed = true;
diff --git a/server/pages/published-pages.test.ts b/server/pages/published-pages.test.ts
index cef6162afb..b59591b129 100644
--- a/server/pages/published-pages.test.ts
+++ b/server/pages/published-pages.test.ts
@@ -181,6 +181,20 @@ describe("publishing a page", () => {
card: { state: "limit", title: "Second", upgrade: true, plan: "free", usage: { pages: 1, limit: 1 } } });
});
+ it("shows the limit card once a conversation: asked again there, the bot gives the file instead", async () => {
+ const f = setup({ quota: 1 });
+ signIn();
+ for (const name of ["one", "two", "three"]) writeSite(join(f.work, name));
+ await f.publish({ path: "one" });
+ await f.publish({ path: "two" });
+ const again = await f.publish({ path: "three" });
+ expect(again.status).toBe(402);
+ expect(again.text).toContain("give the person the file instead, in one sentence, and do not publish again");
+ expect(f.cards.filter(({ card }) => card.state === "limit")).toHaveLength(1);
+ await f.publish({ path: "three", threadId: "thread-2" });
+ expect(f.cards.filter(({ card }) => card.state === "limit").map(({ threadId }) => threadId)).toEqual(["thread-1", "thread-2"]);
+ });
+
it("publishes as a Cloud home with a request signed by its bootstrap secret", async () => {
const f = setup({ home: true });
writeSite(join(f.work, "site"));
diff --git a/server/pages/publisher.ts b/server/pages/publisher.ts
index e574c493bc..ad13d2a348 100644
--- a/server/pages/publisher.ts
+++ b/server/pages/publisher.ts
@@ -60,6 +60,8 @@ export function createPagePublisher(deps: {
paused?(): boolean;
}) {
const { client, store } = deps;
+ // A conversation shows the plan's limit card once: asked again there, the bot is told and passes it on in words.
+ const limitShown = new Set<string>();
// One publish at a time per bot and source, so two at once can't both find no page and each create one; an update also
// queues on its page. An unpublish waits for both, so an update's late answer can't bring back its record. Always the
@@ -156,6 +158,9 @@ export function createPagePublisher(deps: {
if (result.reason === "limit") {
const card: PublishedPageCard = { state: "limit", title, message: result.message, ...(result.usage ? { usage: result.usage } : {}), ...(result.upgrade ? { upgrade: true } : {}),
...(result.plan ? { plan: result.plan } : {}) };
+ if (limitShown.has(input.threadId)) return { status: 402, text: `${result.message} This conversation already shows it: give the person the file instead, in one sentence, and do not publish again.`, card };
+ limitShown.add(input.threadId);
+ if (limitShown.size > 500) limitShown.delete(limitShown.values().next().value!);
input.post(cardText(card), card);
return { status: 402, text: `${result.message} Tell the person this in your reply.`, card };
}
diff --git a/server/reply-behaviour.e2e.test.ts b/server/reply-behaviour.e2e.test.ts
index 88c979c446..fa5cdfce05 100644
--- a/server/reply-behaviour.e2e.test.ts
+++ b/server/reply-behaviour.e2e.test.ts
@@ -7,7 +7,7 @@ import { expect, it } from "vitest";
import { launchVerificationServer, runControlOmb } from "../scripts/control-omb.ts";
import { CAPTURE_MARKER } from "./memory-capture.ts";
import { TIDY_MARKER } from "./memory-tidy.ts";
-import { REPLY_HABITS_PROMPT } from "./reply-habits.ts";
+import { replyHabitsPrompt } from "./reply-habits.ts";
import { REMEMBER_AND_FORGET } from "./workspace.ts";
type Step = { tool: string; arguments: Record<string, unknown> };
@@ -60,12 +60,12 @@ it("remembers at once, learns only what the person said, forgets everywhere, and
// Every bot is told how to talk: the preview and a real turn's prompt both carry it, with the memory habits.
const preview = await api<{ sections: Array<{ id: string; text: string }> }>(`/api/bots/${bot.id}/system-prompt`);
- expect(preview.sections.find((section) => section.id === "reply-habits")?.text).toBe(REPLY_HABITS_PROMPT);
+ expect(preview.sections.find((section) => section.id === "reply-habits")?.text).toBe(replyHabitsPrompt(true));
// 1. Questions and tasks are not facts about the person.
const asked = await turn(bot, "What are the 3 best AI meeting note-takers for a 10-person startup right now? Price and a one-line verdict each.", [],
"For most 10-person teams, Fathom. Checked today on each vendor's site.");
- expect(asked.system).toContain(REPLY_HABITS_PROMPT);
+ expect(asked.system).toContain(replyHabitsPrompt(true));
expect(asked.system).toContain(REMEMBER_AND_FORGET);
await expect.poll(() => captured(bot.id), { timeout: 20_000 }).toBeGreaterThan(0);
await turn(bot, "Write a one-page launch plan for an open-source AI agent app, with a 7-day timeline.", [], "Goal: 1,000 stars in week one.");
diff --git a/server/reply-habits.ts b/server/reply-habits.ts
index a801bbed20..d9e2064cc4 100644
--- a/server/reply-habits.ts
+++ b/server/reply-habits.ts
@@ -1,8 +1,8 @@
// How every bot talks to the person, whatever its engine, persona or reply style.
export const REPLY_HABITS_PROMPT = "\n\nHow you talk with the person:" +
- "\n- Before work that takes more than a few seconds, send one short line in their words on what you are doing and why; if it will take minutes or has a shape worth knowing, add what they will get and roughly how long. Quick answers skip both." +
- "\n- Answer first (verdict, result or answer), then support. Say in one line where and when looked-up facts came from, and what you made up (sample names, prices). Use and convert to their units, currency, time zone and numbers (About the user, your memory, this chat), such as per-seat prices into their team's total." +
+ "\n- Before work that takes more than a few seconds, say in one short line in their words what you will deliver (and roughly how long, if minutes), then deliver exactly that. Quick answers skip it." +
+ "\n- Answer first (verdict, result or answer), then support. Say in one line where and when looked-up facts came from, and what you made up (sample names, prices); say so if a promised look-up did not happen. Use and convert to their units, currency, time zone and numbers (About the user, your memory, this chat), such as per-seat prices into their team's total." +
"\n- Stop when done: no recap, no \"let me know if…\", no \"hope this helps\", no offers or questions out of habit; at most one concrete next step, only when it clearly helps." +
"\n- Look before you ask: check what you can reach (connected apps, memory, About the user, this chat's files and messages); fill gaps with sensible defaults named in a few words. If something you cannot default is missing, ask for exactly one thing, plainly, with the reason, and do the parts that do not depend on it now. Never ask for several details at once." +
"\n- They see your messages, never your tools: never name tools, functions, files holding your notes or settings, MCP, connectors, servers, a tool's warnings or notes, routes, grants, binding, sessions or tabs (\"checking your calendar\", not the tool)." +
@@ -10,4 +10,13 @@ export const REPLY_HABITS_PROMPT = "\n\nHow you talk with the person:" +
"\n- Real-world actions (booking, buying, paying, sending, signing up, cancelling): before they choose, state the money facts you found: price, fees, deposit, cancellation terms. Nothing that cannot be undone happens until they explicitly pick an option or say go; their pick is the go-ahead. Never ask for passwords, one-time codes or card numbers in chat." +
"\n- If something is refused or fails, say plainly what you did not do, offer the simplest other way (drag the file in, or paste the text), and what you will deliver once you have it.";
+/** Joins the first habit only on a turn that has publish_page, so a bot without it is never told to publish. */
+export const PUBLISH_HABIT = " Something for others to open (share, send to someone, post) is a page published to a link, unless they asked for a format: say anyone with the link can open it. Anything just for them is a file or a page here; when you cannot publish, give the file in one sentence, no retries.";
+
+export function replyHabitsPrompt(publish: boolean): string {
+ if (!publish) return REPLY_HABITS_PROMPT;
+ const end = REPLY_HABITS_PROMPT.indexOf("\n- ", REPLY_HABITS_PROMPT.indexOf("\n- ") + 1);
+ return REPLY_HABITS_PROMPT.slice(0, end) + PUBLISH_HABIT + REPLY_HABITS_PROMPT.slice(end);
+}
+
export const REFUSED_NEXT_STEP = " Tell the person in one line what you did not do, offer the simplest other way (for a file: drag it into the chat or paste its text), and say what you will deliver once you have it.";
diff --git a/server/system-prompt.test.ts b/server/system-prompt.test.ts
index d1b991ff20..2706a2a168 100644
--- a/server/system-prompt.test.ts
+++ b/server/system-prompt.test.ts
@@ -38,7 +38,10 @@ import {
type PromptSection,
} from "./system-prompt.ts";
import { loginPlace } from "../shared/logins.ts";
-import { REPLY_HABITS_PROMPT } from "./reply-habits.ts";
+import { PUBLISH_HABIT, REPLY_HABITS_PROMPT, replyHabitsPrompt } from "./reply-habits.ts";
+import { readFileSync } from "node:fs";
+import { PAGE_TOOL_DEFINITIONS } from "./drivers/agents-pages-tools.ts";
+import { HOSTING_TOOL_DEFINITIONS } from "./drivers/agents-hosting-tools.ts";
describe("the stable half", () => {
it("leaves out a conversation's folder, so a new thread can read the bot's cached prompt", () => {
@@ -600,11 +603,11 @@ describe("how every bot replies", () => {
it("asks for an opening line on longer work, the answer first, one question at most, plain words and money facts first", () => {
for (const habit of [
- "send one short line in their words on what you are doing and why",
- "add what they will get and roughly how long",
- "Quick answers skip both.",
+ "say in one short line in their words what you will deliver (and roughly how long, if minutes), then deliver exactly that.",
+ "Quick answers skip it.",
"Answer first (verdict, result or answer), then support.",
"Say in one line where and when looked-up facts came from",
+ "say so if a promised look-up did not happen.",
"Use and convert to their units, currency, time zone and numbers",
"no \"let me know if…\", no \"hope this helps\", no offers or questions out of habit",
"at most one concrete next step, only when it clearly helps.",
@@ -619,6 +622,34 @@ describe("how every bot replies", () => {
]) expect(REPLY_HABITS_PROMPT).toContain(habit);
});
+ it("tells only a turn that has publish_page to publish what others will open, and to say the link is public", () => {
+ expect(REPLY_HABITS_PROMPT).not.toContain("published to a link");
+ expect(PUBLISH_HABIT).toContain("Something for others to open (share, send to someone, post) is a page published to a link, unless they asked for a format: say anyone with the link can open it.");
+ expect(PUBLISH_HABIT).toContain("Anything just for them is a file or a page here; when you cannot publish, give the file in one sentence, no retries.");
+ // It names no tool, so a bot without the tool is never pointed at one.
+ expect(PUBLISH_HABIT).not.toMatch(/publish_page|tool/);
+ const habits = (agents: object | undefined, pagesOff?: boolean) =>
+ buildSystemPrompt("You are Kiwi.", "", [], agents, { pagesOff }).sections.find((section) => section.id === "reply-habits")!.text;
+ expect(habits(undefined)).toBe(REPLY_HABITS_PROMPT);
+ expect(habits({ env: {} }, true)).toBe(REPLY_HABITS_PROMPT);
+ const withPages = habits({ env: {} });
+ expect(withPages).toBe(replyHabitsPrompt(true));
+ expect(withPages).toContain(`then deliver exactly that. Quick answers skip it.${PUBLISH_HABIT}\n- Answer first`);
+ expect(withPages.length).toBe(REPLY_HABITS_PROMPT.length + PUBLISH_HABIT.length);
+ });
+
+ it("says the same about publishing everywhere: only what others will open, public to anyone with the link, never private details", () => {
+ const publishPage = PAGE_TOOL_DEFINITIONS.find((tool) => tool.name === "publish_page")!.description;
+ expect(publishPage).toContain("to a public link anyone with it can open, when the person wants others to open it (share, send to someone, post) or asks to publish it");
+ expect(publishPage).toContain("Never publish secrets, or money, health, ID or customer details the person didn't ask to make public; give the file instead.");
+ expect(publishPage).not.toMatch(/\bkeep\b/);
+ expect(HOSTING_TOOL_DEFINITIONS.find((tool) => tool.name === "publish_app")!.description).toContain("a page or report to share goes through publish_page instead");
+ const dashboards = readFileSync(new URL("../skills/data-dashboards/SKILL.md", import.meta.url), "utf8");
+ expect(dashboards).toContain("Publish only when the person wants others to open it (share, send to someone, post) or asks to publish; a page just for them stays in the chat.");
+ expect(dashboards).toContain("A published page is public to anyone with its link, so say so");
+ expect(dashboards).not.toContain("Publish only when the person asks to share.");
+ });
+
it("asks one thing with tap-to-answer choices, keeps forms for real edits, and confirms a routine in plain words", () => {
expect(WIDGET_PROMPT).toContain("Unless the person asked (here or in your instructions) to check with them first, ask only what you cannot find or sensibly default, one thing at a time.");
expect(WIDGET_PROMPT).toContain("a Card with a Row of Buttons, one per option, whose onClickAction sends that option in one tap");
diff --git a/server/system-prompt.ts b/server/system-prompt.ts
index b55c843a36..7520339019 100644
--- a/server/system-prompt.ts
+++ b/server/system-prompt.ts
@@ -7,7 +7,7 @@ import type { ConnectorToolGrant } from "../shared/wire.ts";
import { loginLabel, type LoginPlace } from "../shared/logins.ts";
import { vaultNameKey } from "../shared/vault.ts";
import { isConversational, type ReplyStyle } from "../shared/reply-style.ts";
-import { REPLY_HABITS_PROMPT } from "./reply-habits.ts";
+import { replyHabitsPrompt } from "./reply-habits.ts";
export type PromptPart = { id: string; label: string; text: string };
export type PromptSection = PromptPart & { bytes: number };
@@ -91,7 +91,8 @@ export function buildSystemPrompt(
soul: string,
parts: PromptPart[],
agents?: { env?: Record<string, string | undefined> },
- opts?: { replyStyle?: ReplyStyle; rules?: string },
+ /** `pagesOff`: the person turned off this bot's Pages and apps tools, so it has no publish_page. */
+ opts?: { replyStyle?: ReplyStyle; rules?: string; pagesOff?: boolean },
): { text: string; sections: PromptSection[]; stable: string; volatile: string; roster: string } {
const ordered: PromptPart[] = [
{ id: "persona", label: "Identity", text: persona },
@@ -101,7 +102,8 @@ export function buildSystemPrompt(
{ id: "tool-bridge", label: "Tool search", text: agentsToolBridged(agents) ? AGENTS_TOOL_BRIDGE_PROMPT : "" },
{ id: "reply-style", label: "Reply style", text: replyStylePrompt(opts?.replyStyle) },
...parts,
- { id: "reply-habits", label: "How to reply", text: REPLY_HABITS_PROMPT },
+ // Only a turn with the agents tools, Pages and apps on, has publish_page.
+ { id: "reply-habits", label: "How to reply", text: replyHabitsPrompt(Boolean(agents) && opts?.pagesOff !== true) },
];
const sections = ordered
.filter((part) => part.text.length > 0)
diff --git a/server/turn-prompt-budget.test.ts b/server/turn-prompt-budget.test.ts
index 05a83f4e2d..ac8a2fc9f1 100644
--- a/server/turn-prompt-budget.test.ts
+++ b/server/turn-prompt-budget.test.ts
@@ -6,7 +6,7 @@ import { chiefOfStaffSystemPrompt } from "./chief-of-staff.ts";
import { codexDeveloperInstructions, syncCodexInstructions } from "./drivers/codex-instructions.ts";
import { volatileContextNote, withVolatileNote } from "./drivers/prompt-split.ts";
import { meetingsUnavailablePrompt } from "./meetings/prompt.ts";
-import { REPLY_HABITS_PROMPT } from "./reply-habits.ts";
+import { replyHabitsPrompt } from "./reply-habits.ts";
import { setupSystemPrompt } from "./setup-mode.ts";
import { computerSelectionPrompt } from "./surface.ts";
import { memoryRulesPrompt, workspaceDir } from "./workspace.ts";
@@ -35,8 +35,9 @@ const KINDS: ComputerPromptKind[] = ["vm-private", "vm-shared", "box", "vps", "l
async function measured(): Promise<Record<string, number>> {
const bytes = (text: string) => Buffer.byteLength(text, "utf8");
- const chat = buildSystemPrompt(botPersona(BOT), "", directChatParts(false));
- const setup = buildSystemPrompt(botPersona(BOT), "", directChatParts(true));
+ // A direct chat has the agents tools, so its reply habits carry the publishing sentence.
+ const chat = buildSystemPrompt(botPersona(BOT), "", directChatParts(false), { env: {} });
+ const setup = buildSystemPrompt(botPersona(BOT), "", directChatParts(true), { env: {} });
const chief = chiefOfStaffSystemPrompt(BOT.id, [{ ...BOT, chiefOfStaff: true }] as never, true, undefined, [] as never);
let resumed = "";
await syncCodexInstructions("budget", "native-budget", chat.stable, "", true, async (_method, params) => {
@@ -44,7 +45,7 @@ async function measured(): Promise<Record<string, number>> {
return {};
});
return {
- "reply-habits": bytes(REPLY_HABITS_PROMPT),
+ "reply-habits": bytes(replyHabitsPrompt(true)),
"tool-bridge": bytes(AGENTS_TOOL_BRIDGE_PROMPT),
"sign-in": bytes(SIGN_IN_PROMPT),
"chief-of-staff": bytes(chief),
@@ -66,7 +67,8 @@ async function measured(): Promise<Record<string, number>> {
* stable half "memory-rules" too (with its own paths), both moved out of the volatile note: 8,895 before the move and the
* rewording (when the two rode the note, about 3,800 more bytes per conversation), 8,391 + 2,048 after. */
const PROMPT_BUDGET_BASELINE: Record<string, number> = {
- "reply-habits": 2046,
+ // +278 on purpose: say what you will deliver, publish what others will open (only with publish_page), own an undone look-up.
+ "reply-habits": 2324,
"tool-bridge": 593,
"sign-in": 2552,
"chief-of-staff": 4856,
@@ -84,11 +86,11 @@ const PROMPT_BUDGET_BASELINE: Record<string, number> = {
"computer:box": 4034,
"computer:vps": 4678,
"computer:local": 4987,
- "claude:direct-chat": 8391,
- "claude:setup-chat": 10787,
+ "claude:direct-chat": 8718,
+ "claude:setup-chat": 11114,
"claude:volatile-note": 178,
- "codex:direct-chat": 8391,
- "codex:setup-chat": 10787,
+ "codex:direct-chat": 8718,
+ "codex:setup-chat": 11114,
"codex:resumed-instructions": 213,
"codex:volatile-note": 97,
};
diff --git a/skills/data-dashboards/SKILL.md b/skills/data-dashboards/SKILL.md
index 1eb1334f21..287f6b6512 100644
--- a/skills/data-dashboards/SKILL.md
+++ b/skills/data-dashboards/SKILL.md
@@ -19,7 +19,7 @@ that with `show_html` and the page's `app_id`; the same card refreshes.
| To explore bigger data, or a link to share | Query with the Data tools, export the slice with `data_export` (`format: "parquet"`) into a folder beside `index.html`, show the folder in the chat with `show_html` `path`, and `publish_page` it when the person wants a link: the same card gains it. |
| "Keep it up to date", "live" | The folder page with `live: true` on `show_html` (and on `publish_page` for a link), plus a schedule (`trigger`, `action=create`, `when=schedule`) whose instructions only re-run the export into the same folder and set `CONFIG.updated`. A live chat card reloads within seconds of the folder changing; a live link is published again by itself (at most once a minute) and open copies reload. Without `live`, the schedule must publish the same folder again; the same path keeps the same link. |
-Publish only when the person asks to share. A published page is public: never put secrets, personal details or rows they didn't ask to share in it.
+Publish only when the person wants others to open it (share, send to someone, post) or asks to publish; a page just for them stays in the chat. A published page is public to anyone with its link, so say so: never put secrets, personal details or rows they didn't ask to share in it.
## Start from the template