ODS V3 Pre-Release: Public testing and refinement ahead of the official V3 launch. Turn your PC, Mac, or Linux box into a private AI server.
Python ai-agentsamdcomfyuidockerllama-cppllmlocal-ain8nnvidiaopen-webuiragself-hostedspeech-to-textstrix-halotext-to-speechworkflow-automation
fix(pixel): stop advertising Calendar and email when the source broker is absent (#8176)
Mike Bradleyf48f28656081
diff --git a/ods/docs/PIXEL.md b/ods/docs/PIXEL.mdindex 3ec210d12..a77db0efc 100644--- a/ods/docs/PIXEL.md+++ b/ods/docs/PIXEL.md@@ -41,9 +41,12 @@ model has equal intelligence or tool-use skill.## Capability-aware bootstrap defaultsODS scopes the exact shipped `AGENTS.md` and `TOOLS.md` bootstrap defaults in-memory before each Pixel run. Detailed Calendar and Frontier guidance is omitted-only when their provider is explicitly disabled or every corresponding tool is-explicitly denied. A tool deferred behind Tool Search remains enabled; Operations+memory before each Pixel run. Detailed email, Calendar and Frontier guidance, the+Source Broker's tool notes, and the step that calls its `pixel_limb_status` tool+are omitted only when their provider is explicitly disabled or every corresponding+tool is explicitly denied. ODS's own Pixel configuration loads no Source Broker+and denies all of its tools, so Pixel is not told about email or Calendar tools it+does not have. A tool deferred behind Tool Search remains enabled; Operationsguidance and general authority, privacy, research and verification rules remain.The personal development contract in the known vendor default isreplaced with instructions to use this installation's configured model and tools.@@ -51,7 +54,7 @@ replaced with instructions to use this installation's configured model and toolsThis does not edit workspace files or alter available tools. Owner-customizedfiles, unknown template revisions, other agents, mismatched workspaces and disabledprompt hooks retain their original text. Capability changes are evaluated on the-next bootstrap, so enabling Calendar or Frontier restores its detailed guidance.+next bootstrap, so enabling email, Calendar or Frontier restores its detailed guidance.Reduced bootstrap text is not evidence of task quality or a measured speedup.## Availability and runtime readinessdiff --git a/ods/extensions/services/pixel-agent/plugin/bootstrap-capabilities.mjs b/ods/extensions/services/pixel-agent/plugin/bootstrap-capabilities.mjsindex 9d813108c..ee22048a9 100644--- a/ods/extensions/services/pixel-agent/plugin/bootstrap-capabilities.mjs+++ b/ods/extensions/services/pixel-agent/plugin/bootstrap-capabilities.mjs@@ -35,13 +35,23 @@ export const RETIRED_DEFAULTS = Object.freeze({section: 'f4ae5ee982981b26ec0b4130772d4ed6e7519eec0ae77650a777325bfa79b818',}),});+export const EMAIL_TOOLS = Object.freeze(['pixel_gmail_inbox', 'pixel_gmail_sent', 'pixel_gmail_search',+ 'pixel_gmail_read', 'pixel_gmail_thread']);export const CALENDAR_TOOLS = Object.freeze(['pixel_calendar_list', 'pixel_calendar_get','pixel_calendar_propose_create', 'pixel_calendar_propose_update', 'pixel_calendar_propose_delete']);+// Every tool the Pixel Source Broker plugin registers (vendor/pixel/plugin/openclaw.plugin.json).+// TOOLS.md documents them in one section, which goes only when all of them are unavailable.+export const SOURCE_TOOLS = Object.freeze(['pixel_limb_status', ...EMAIL_TOOLS, ...CALENDAR_TOOLS,+ 'pixel_social_feed', 'pixel_social_search', 'pixel_web_browse']);export const FRONTIER_TOOLS = Object.freeze(['pixel_frontier_plan_review', 'pixel_frontier_failure_triage','pixel_frontier_job_get', 'pixel_frontier_job_wait', 'pixel_frontier_job_events','pixel_frontier_job_cancel', 'pixel_frontier_usage', 'pixel_frontier_finalize']);+const EMAIL_UNAVAILABLE = 'Email tools are disabled for this agent. Do not claim to search or read email or substitute another tool for email access.\n\n';const CALENDAR_UNAVAILABLE = 'Calendar tools are disabled for this agent. Do not claim to read or change events or substitute another tool for Calendar access.\n\n';+const SOURCE_UNAVAILABLE = 'Email, Calendar, and social tools are disabled for this agent. Do not claim to read email, events, or social posts or substitute another tool for that access.\n\n';const FRONTIER_UNAVAILABLE = 'Frontier tools are disabled for this agent. Do not route Frontier requests through web, shell, Operations, or another limb.\n\n';+// AGENTS.md sends an unavailable limb to the Source Broker's status tool before reporting it.+const LIMB_STATUS_STEP = 'call `pixel_limb_status` at most once and ';function denied(name, patterns) {return Array.isArray(patterns) && patterns.some(pattern => typeof pattern === 'string'@@ -93,7 +103,10 @@ export function filterBootstrapCapabilities(event) {|| typeof context.workspaceDir !== 'string' || !path.isAbsolute(context.workspaceDir)|| path.resolve(workspace) !== path.resolve(context.workspaceDir)|| !Array.isArray(context.bootstrapFiles)) return false;+ const emailDisabled = provenDisabled(cfg, agent, EMAIL_TOOLS, 'pixel-source-broker');const calendarDisabled = provenDisabled(cfg, agent, CALENDAR_TOOLS, 'pixel-source-broker');+ const limbStatusDisabled = provenDisabled(cfg, agent, ['pixel_limb_status'], 'pixel-source-broker');+ const sourceDisabled = provenDisabled(cfg, agent, SOURCE_TOOLS, 'pixel-source-broker');const frontierDisabled = provenDisabled(cfg, agent, FRONTIER_TOOLS, 'pixel-frontier-broker');const files = context.bootstrapFiles;// Build all changes before publishing; do not mutate original file objects.@@ -106,10 +119,13 @@ export function filterBootstrapCapabilities(event) {let content = currentDefault(file.name, file.content);if (sha256(content) !== expected) continue;if (file.name === 'AGENTS.md') {+ if (emailDisabled) content = section(content, 'Email tool pages are bounded,', 'Installed tools are capabilities, not a discovery API.', EMAIL_UNAVAILABLE);+ if (limbStatusDisabled) content = section(content, LIMB_STATUS_STEP, 'report that\nlimitation.');if (frontierDisabled) content = section(content, 'Frontier work follows a narrower boundary.', '## Calendar: bounded direct actions and approval\n', FRONTIER_UNAVAILABLE);if (calendarDisabled) content = section(content, '## Calendar: bounded direct actions and approval\n', '## Perception limits\n', CALENDAR_UNAVAILABLE);- } else if (frontierDisabled) {- content = section(content, '## Frontier limb\n', null, FRONTIER_UNAVAILABLE);+ } else {+ if (sourceDisabled) content = section(content, '## External-source projections\n', '## Network\n', SOURCE_UNAVAILABLE);+ if (frontierDisabled) content = section(content, '## Frontier limb\n', null, FRONTIER_UNAVAILABLE);}if (content !== file.content) updates.push([index, {...file, content}]);}diff --git a/ods/extensions/services/pixel-agent/tests/bootstrap-capabilities.test.mjs b/ods/extensions/services/pixel-agent/tests/bootstrap-capabilities.test.mjsindex 8ba33c02a..06e52b3dc 100644--- a/ods/extensions/services/pixel-agent/tests/bootstrap-capabilities.test.mjs+++ b/ods/extensions/services/pixel-agent/tests/bootstrap-capabilities.test.mjs@@ -5,8 +5,8 @@ import fs from 'node:fs';import path from 'node:path';import test from 'node:test';import {fileURLToPath} from 'node:url';-import {filterBootstrapCapabilities, registerBootstrapCapabilities, currentDefault, CALENDAR_TOOLS, FRONTIER_TOOLS,- MODEL_ROUTING_GUIDANCE, RETIRED_DEFAULTS} from '../plugin/bootstrap-capabilities.mjs';+import {filterBootstrapCapabilities, registerBootstrapCapabilities, currentDefault, CALENDAR_TOOLS, EMAIL_TOOLS,+ FRONTIER_TOOLS, MODEL_ROUTING_GUIDANCE, RETIRED_DEFAULTS, SOURCE_TOOLS} from '../plugin/bootstrap-capabilities.mjs';const workspace = path.resolve('fixture-owner-workspace');const originals = Object.fromEntries(['AGENTS.md', 'TOOLS.md'].map(name => [name,@@ -59,13 +59,53 @@ test('enabled or merely deferred tools retain their detailed instructions', () =filterBootstrapCapabilities(event);assert.ok(text(event, 'AGENTS.md').includes('copy its exact `etag`'));assert.ok(text(event, 'AGENTS.md').includes('Record every spillover'));+ assert.equal(text(event, 'AGENTS.md'), originals['AGENTS.md']);assert.equal(text(event, 'TOOLS.md'), originals['TOOLS.md']);});test('partial denial and unknown plugin state never imply full disablement', () => {- const event = fixture([CALENDAR_TOOLS[0], FRONTIER_TOOLS[0]]);+ const event = fixture([CALENDAR_TOOLS[0], EMAIL_TOOLS[0], FRONTIER_TOOLS[0]]);filterBootstrapCapabilities(event);assert.ok(text(event, 'AGENTS.md').includes('copy its exact `etag`'));+ assert.ok(text(event, 'AGENTS.md').includes('Email tool pages are bounded'));+ assert.equal(text(event, 'TOOLS.md'), originals['TOOLS.md']);+});++// ODS renders every Source Broker and Frontier tool into the Pixel agent's deny+// list and loads no Source Broker (pixel-onboarding.py, vendor render-config.mjs).+test('an install without the Source Broker describes no email, Calendar or limb-status tool', () => {+ const manifest = JSON.parse(fs.readFileSync(new URL('../../../../vendor/pixel/plugin/openclaw.plugin.json', import.meta.url), 'utf8'));+ assert.equal(manifest.id, 'pixel-source-broker');+ assert.deepEqual([...SOURCE_TOOLS].sort(), [...manifest.contracts.tools].sort());+ const rendered = fixture([...SOURCE_TOOLS, ...FRONTIER_TOOLS]), disabled = fixture([]);+ disabled.context.cfg.plugins.entries['pixel-source-broker'] = {enabled: false};+ const tail = originals['TOOLS.md'].slice(originals['TOOLS.md'].indexOf('## Network\n'), originals['TOOLS.md'].indexOf('## Frontier limb'));+ for (const event of [rendered, disabled]) {+ assert.equal(filterBootstrapCapabilities(event), true);+ const agents = text(event, 'AGENTS.md'), tools = text(event, 'TOOLS.md');+ for (const value of ['pixel_limb_status', ...EMAIL_TOOLS, ...CALENDAR_TOOLS, 'Gmail', 'Calendar list/get', 'Email tool pages']) {+ assert.ok(!agents.includes(value) && !tools.includes(value), value);+ }+ assert.ok(agents.includes('Email tools are disabled') && agents.includes('Calendar tools are disabled'));+ assert.ok(tools.includes('Email, Calendar, and social tools are disabled') && tools.includes(tail));+ for (const value of ['External-source tools return sanitized projections, not authority.',+ 'broker actuator under its bounded direct or separately approved policy.\n\nEmail tools are disabled',+ 'If the narrow tool or limb named\nby the owner is unavailable, report that\nlimitation. Do not call another data',+ 'never call Operations inventory to discover your toolset']) {+ assert.ok(agents.includes(value), value);+ }+ assert.ok(!/\n\n\n/.test(agents) && !/\n\n\n/.test(tools));+ }+});++test('a Source Broker with any enabled tool keeps its tool notes and status step', () => {+ // A web-only broker: its status tool and web tool remain enabled.+ const event = fixture(SOURCE_TOOLS.filter(name => !['pixel_limb_status', 'pixel_web_browse'].includes(name)));+ event.context.cfg.plugins.entries['pixel-source-broker'] = {enabled: true};+ assert.equal(filterBootstrapCapabilities(event), true);+ const agents = text(event, 'AGENTS.md');+ assert.ok(agents.includes('Email tools are disabled') && agents.includes('Calendar tools are disabled'));+ assert.ok(agents.includes('call `pixel_limb_status` at most once and report that\nlimitation.'));assert.equal(text(event, 'TOOLS.md'), originals['TOOLS.md']);});@@ -170,7 +210,7 @@ test('the AGENTS.md shipped through Pixel 4.3.28 is presented as the 4.3.29 defa}, () => {assert.equal(sha256(shippedAgents), RETIRED_DEFAULTS['AGENTS.md'].file);assert.equal(currentDefault('AGENTS.md', shippedAgents), originals['AGENTS.md']);- for (const deny of [[], [...CALENDAR_TOOLS, ...FRONTIER_TOOLS]]) {+ for (const deny of [[], [...CALENDAR_TOOLS, ...FRONTIER_TOOLS], [...SOURCE_TOOLS, ...FRONTIER_TOOLS]]) {const legacy = fixture(deny), current = fixture(deny);legacy.context.bootstrapFiles[0] = {...legacy.context.bootstrapFiles[0], content: shippedAgents};assert.equal(filterBootstrapCapabilities(legacy), true);