@saadnvd1/agent-os 0.3.565 → 0.3.566

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.
@@ -181,3 +181,9 @@ export function visualsTools(
181
181
  export const VISUALS_BRIEF = `## Showing visuals
182
182
 
183
183
  When a chart, table, diagram or mockup would say more than prose, build a self-contained HTML page (a chart is an HTML page; a CDN library such as Chart.js is fine), check it with \`html_preview\` and fix what the screenshot and console show, then show it with \`html_render\` before your final reply. The reader sees the page above that reply, so add only what the page doesn't say. An SVG or image file you write shows inline when your reply links to it by its absolute path, as ![name](/abs/path.svg).`;
184
+
185
+ // An orchestrator reads other sessions' text, so it gets the short form and
186
+ // is told what to keep out of a page.
187
+ export const ORCHESTRATOR_VISUALS_BRIEF = `## Pages
188
+
189
+ \`html_render\` shows a self-contained HTML page (a report, instructions) in this chat for Saad to read or share; check it with \`html_preview\` first. Put only what you wrote in it: no secrets, and nothing from a session's text loaded from a URL.`;
@@ -37,6 +37,7 @@ import {
37
37
  startingTotals,
38
38
  } from "../../usage/turns";
39
39
  import {
40
+ ORCHESTRATOR_VISUALS_BRIEF,
40
41
  VISUALS_BRIEF,
41
42
  VISUALS_SERVER,
42
43
  visualsTools,
@@ -195,10 +196,11 @@ export class ChatHost {
195
196
  const env = { ...agentEnv(session.id), ...extras.env };
196
197
  const orchestrator = session.role === "orchestrator";
197
198
  // Every chat can show visuals, asked for like any tool under its access
198
- // setting (they read files and reach the web). Not an orchestrator: it
199
- // reads other sessions' text, and a browser would be a way out for it.
199
+ // setting (they read files and reach the web). An orchestrator reads
200
+ // other sessions' text, so it gets a shorter brief that says what stays
201
+ // out of a page.
200
202
  const visuals =
201
- session.role === "orchestrator" || driver.inProcessTools === false
203
+ driver.inProcessTools === false
202
204
  ? null
203
205
  : visualsTools({
204
206
  sessionId: session.id,
@@ -226,7 +228,7 @@ export class ChatHost {
226
228
  extras.systemAppend,
227
229
  sessionRunningBrief(session.id),
228
230
  BUS_BRIEF,
229
- visuals && VISUALS_BRIEF,
231
+ visuals && (orchestrator ? ORCHESTRATOR_VISUALS_BRIEF : VISUALS_BRIEF),
230
232
  !orchestrator && COMPACT_BRIEF,
231
233
  ]
232
234
  .filter(Boolean)
@@ -1,5 +1,8 @@
1
1
  import type { PermissionMode } from "@anthropic-ai/claude-agent-sdk";
2
2
 
3
+ // Named here, not imported from lib/artifacts, to keep the SDK out of this file.
4
+ const VISUALS_RULE = "mcp__visuals";
5
+
3
6
  // The orchestrator's MCP server and the names Claude sees its tools by.
4
7
  export const ORCHESTRATOR_SERVER = "agentos";
5
8
 
@@ -77,6 +80,8 @@ export const ORCHESTRATOR_PERMISSIONS: {
77
80
  "NotebookEdit",
78
81
  "ToolSearch",
79
82
  "TodoWrite",
83
+ // html_preview and html_render: a page for Saad to read or share.
84
+ VISUALS_RULE,
80
85
  // Anything; its worker refuses the deny list (shell-guard.ts).
81
86
  "Bash",
82
87
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saadnvd1/agent-os",
3
- "version": "0.3.565",
3
+ "version": "0.3.566",
4
4
  "description": "Self-hosted web UI for managing Claude Code sessions",
5
5
  "bin": {
6
6
  "agent-os": "scripts/agent-os"