Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: trim the persistent mind tools drawer
Adam Eivy2fd20c2228bb
diff --git a/client/src/components/cos/PersistentMindRecipeLibrary.jsx b/client/src/components/cos/PersistentMindRecipeLibrary.jsxindex 4c3a8440de..ad6e894374 100644--- a/client/src/components/cos/PersistentMindRecipeLibrary.jsx+++ b/client/src/components/cos/PersistentMindRecipeLibrary.jsx@@ -174,7 +174,7 @@ export default function PersistentMindRecipeLibrary() {<h2 className="text-base font-semibold text-port-text">Saved tool recipes</h2><button type="button" className={buttonClass} onClick={() => onSelect('new')}>New recipe</button></div>- <p className="text-sm text-port-text-muted">Manage reusable read definitions and their history with Mind grants off. The Mind can reuse recipes when recipe management and every underlying read grant are enabled. Nothing executes when you save or validate.</p>+ <p className="text-sm text-port-text-muted">Reusable reads you can edit with Mind grants off. Saving or validating does not run them. The mind can use a recipe only when recipe management and the underlying read grants are on.</p>{error && <Banner tone="error" title="Recipe library unavailable">{error} <button type="button" className={buttonClass} onClick={load}>Retry library</button></Banner>}{loading ? <p role="status" className="text-sm text-port-text-muted">Loading recipes…</p> : !recipes.length && !error ? <p className="text-sm text-port-text-muted">No saved recipes. Create one from the editable example.</p> : null}<ul className="space-y-2">diff --git a/client/src/components/cos/PersistentMindSandboxControls.jsx b/client/src/components/cos/PersistentMindSandboxControls.jsxindex 9719122a71..533a766fa9 100644--- a/client/src/components/cos/PersistentMindSandboxControls.jsx+++ b/client/src/components/cos/PersistentMindSandboxControls.jsx@@ -55,8 +55,7 @@ export default function PersistentMindSandboxControls({ capabilities, disabled,};return <section className="rounded border border-port-border p-4 space-y-3" aria-labelledby={`${id}-heading`}><h3 id={`${id}-heading`} className="font-semibold text-port-text">Tool-free model delegation</h3>- <p className="text-sm text-port-text-muted">Let the mind outsource coding, text, or animation source without queueing a CoS agent. Workers receive only the context packet the mind supplies. A trusted API model checks every criterion; neither model can use OS tools or execute the result.</p>- <p className="text-xs text-port-text-muted">Approving a route permits its provider calls and transmission of supplied context. Choose free workers as desired; the evaluator may use paid quota. Evaluation is advisory. Keep credentials and private records out of context.</p>+ <p className="text-sm text-port-text-muted">Let the mind send a context packet to an approved API model and have a different model check the result. Neither model gets tools or runs the output. Leave credentials and private records out of the packet.</p><label htmlFor={`${id}-enabled`} className="flex gap-2 text-sm text-port-text"><input id={`${id}-enabled`} type="checkbox" checked={enabled} disabled={disabled || saving} onChange={(event) => setEnabled(event.target.checked)} /> Allow tool-free delegation</label>diff --git a/client/src/components/cos/PersistentMindTaskAccessControls.jsx b/client/src/components/cos/PersistentMindTaskAccessControls.jsxindex b926118333..34a956daa1 100644--- a/client/src/components/cos/PersistentMindTaskAccessControls.jsx+++ b/client/src/components/cos/PersistentMindTaskAccessControls.jsx@@ -1,4 +1,5 @@import { useEffect, useId, useState } from 'react';+import { Link } from 'react-router';import * as api from '../../services/api';import toast from '../ui/Toast';@@ -25,67 +26,25 @@ const normalizeCapabilities = (value) => ({});const OPTIONS = [- { key: 'auditReports', label: 'Allow private CoS process audits', hint: 'Review at most three completed jobs per turn for selected maintainer apps. Requires PortOS reads; synthetic issue filing requires its separate grant. Raw transcripts stay private.' },- {- key: 'manageToolRecipes',- label: 'Allow mind to manage saved tool recipes',- hint: 'Definition authority only; underlying reads still require bounded PortOS read access. Mind authoring and invocation arrive in a later phase. You can manage the library below with this grant off.',- },- {- key: 'readPortos',- label: 'Allow bounded PortOS reads',- hint: 'Lets the mind inspect the selected Brain, goals, journal, calendar, health, feed, catalog, and runtime adapters.',- },- {- key: 'writePortos',- label: 'Allow bounded PortOS updates',- hint: 'Lets the mind use typed Brain, journal, goals, health-log, and feed-state actions. Process control, browser actions, messaging, and paid generation stay excluded.',- },- {- key: 'createTasks',- label: 'Allow mind to queue CoS agent tasks',- hint: 'Queues typed tasks through isolated worktrees, capacity, budget, review, CI, and landing-policy gates.',- },- {- key: 'fileIssues',- label: 'Allow mind to read and file GitHub/GitLab issues',- hint: 'Lets the mind read an authorized app\'s open issues and file new ones with the required dispatch labels. This is the queueing lane that still works when no coding agent is attached to this machine — no editing, closing, or commenting on existing issues.',- },- {- key: 'visitEidoversePeers',- label: 'Allow guest travel and chat with federated worlds',- hint: 'Lets the mind visit enabled registered peers and exchange live chat with their humans and agents. Messages cross instances; private records and secrets must stay local.',- },- {- key: 'manageEidoverse',- label: 'Allow private Eidoverse world management',- hint: 'Lets the mind project PortOS resources, apply bounded world-building and role operations, and speak as the persistent CoS identity. This does not grant generic PortOS record writes.',- },- {- key: 'promoteEidoverseFoundations',- label: 'Allow promoting Eidoverse foundations to the shared baseline',- hint: 'Lets the mind offer a world foundation this install authored to the shared PortOS baseline, so peers can inherit the substance without your style layer. Separate from world management on purpose: building locally never implies publishing. The server re-runs the agent-free resilience assay itself and refuses a payload carrying machine identity, PII, or credentials.',- },- {- key: 'installEidoverseControllers',- label: 'Allow installing executable world controllers',- hint: 'Lets the mind attach a bounded, PortOS-supervised controller to your private world so it keeps ticking between wakes, and retire one it no longer wants. Controllers are named by id against the fixed registry PortOS ships — a mind can never point one at code you did not install — and every tick is synchronous, so a controller cannot reach an AI provider or the network. A controller speaks or builds only when its install explicitly enables delivery.',- },- {- key: 'manageMind',- label: 'Allow mind to clean up its mindspace',- hint: 'Lets the mind archive only its own memories, forget older trajectory history, or rebuild derived context. Cleanup remains bounded and auditable.',- },- {- key: 'adjustLocalContext',- label: 'Allow mind to adjust local model context (numCtx)',- hint: 'Lets the mind raise or lower its own local API provider context window within RAM/GPU safety clamps. Cloud providers stay out of reach; oversized requests are refused so PortOS is not OOMed.',- },- {- key: 'callUser',- label: 'Allow mind to call you on FaceTime Audio',- hint: 'Lets the mind ring the handle configured in Settings > Voice when nothing on screen can reach you. Honors quiet hours, never dials while a browser tab can speak, and is capped at 3 calls per 24 hours at least 30 minutes apart.',- },+ { group: 'work', key: 'createTasks', label: 'Allow mind to queue CoS agent tasks', hint: 'Queue a task on an authorized app. Budget, review, CI, and landing policy still apply. Model choice is the allowlist below, or every configured coding model when that list is empty.' },+ { group: 'work', key: 'fileIssues', label: 'Allow mind to read and file GitHub/GitLab issues', hint: 'Read and file issues on authorized trackers. No edits, comments, or closes.' },+ { group: 'work', key: 'auditReports', label: 'Allow private CoS process audits', hint: 'Review up to three finished jobs per turn. Filing a finding needs the issue grant.' },+ { group: 'work', key: 'manageToolRecipes', label: 'Allow mind to manage saved tool recipes', hint: 'Lets the mind edit recipes. You can edit the library with this off. Reads still need their own grants.' },+ { group: 'records', key: 'readPortos', label: 'Allow bounded PortOS reads', hint: 'Brain, goals, journal, calendar, health, feed, catalog, and runtime.' },+ { group: 'records', key: 'writePortos', label: 'Allow bounded PortOS updates', hint: 'Typed updates to Brain, journal, goals, health logs, and feed state.' },+ { group: 'records', key: 'manageMind', label: 'Allow mind to clean up its mindspace', hint: 'Archive its own memories, trim history, or rebuild context.' },+ { group: 'records', key: 'adjustLocalContext', label: 'Allow mind to adjust local model context (numCtx)', hint: 'Change this mind\'s local context window inside RAM and GPU limits.' },+ { group: 'records', key: 'callUser', label: 'Allow mind to call you on FaceTime Audio', hint: 'Calls the handle in Settings → Voice. Quiet hours apply, at most 3 calls per day.' },+ { group: 'world', key: 'manageEidoverse', label: 'Allow private Eidoverse world management', hint: 'Build and speak in this install\'s private world.' },+ { group: 'world', key: 'visitEidoversePeers', label: 'Allow guest travel and chat with federated worlds', hint: 'Visit enabled peers and chat. Private records stay on this install.' },+ { group: 'world', key: 'promoteEidoverseFoundations', label: 'Allow promoting Eidoverse foundations to the shared baseline', hint: 'Offer a foundation this install authored. The server rechecks it before it is shared.' },+ { group: 'world', key: 'installEidoverseControllers', label: 'Allow installing executable world controllers', hint: 'Run a controller PortOS already ships. It cannot call a provider or the network.' },+];++const GROUPS = [+ { id: 'work', title: 'Work' },+ { id: 'records', title: 'Records and reach' },+ { id: 'world', title: 'Eidoverse' },];/** What each grant can actually do with one managed app, for its row's sub-label. */@@ -163,32 +122,35 @@ export default function PersistentMindTaskAccessControls({};return (- <div className="space-y-4">- {OPTIONS.map((option) => {- const id = `${idPrefix}-${option.key}`;- return (- <div key={option.key} className="flex items-start justify-between gap-4">- <div>- <label htmlFor={id} className="text-sm text-port-text">{option.label}</label>- <p className="mt-0.5 text-xs text-port-text-muted">{option.hint}</p>- </div>- <input- id={id}- type="checkbox"- checked={draft[option.key]}- disabled={disabled || saving}- onChange={(event) => save(option.key, event.target.checked)}- className="mt-1 h-4 w-4 accent-port-accent disabled:opacity-50"- />- </div>- );- })}+ <div className="space-y-5">+ {GROUPS.map((group) => (+ <div key={group.id} className="space-y-3">+ <h3 className="text-xs font-semibold uppercase tracking-wide text-port-text-muted">{group.title}</h3>+ {OPTIONS.filter((option) => option.group === group.id).map((option) => {+ const id = `${idPrefix}-${option.key}`;+ return (+ <div key={option.key} className="flex items-start justify-between gap-4">+ <div className="min-w-0">+ <label htmlFor={id} className="text-sm text-port-text">{option.label}</label>+ <p className="mt-0.5 text-xs text-port-text-muted">{option.hint}</p>+ </div>+ <input+ id={id}+ type="checkbox"+ checked={draft[option.key]}+ disabled={disabled || saving}+ onChange={(event) => save(option.key, event.target.checked)}+ className="mt-1 h-4 w-4 shrink-0 accent-port-accent disabled:opacity-50"+ />+ </div>+ );+ })}+ </div>+ ))}{managedApps && (<div className="border-t border-port-border pt-4">- <div>- <p className="text-sm text-port-text">Managed app access</p>- <p className="mt-0.5 text-xs text-port-text-muted">Choose which configured apps the task and issue grants may target. One list covers both. Existing installs start with every runnable app allowed.</p>- </div>+ <p className="text-sm text-port-text">Managed app access</p>+ <p className="mt-0.5 text-xs text-port-text-muted">Apps the task and issue grants may use. Existing installs start with every runnable app allowed.</p>{apps.length > 0 ? (<div className="mt-3 space-y-3">{apps.map((app) => {@@ -196,9 +158,13 @@ export default function PersistentMindTaskAccessControls({const checked = allowedAppIds ? allowedAppIds.includes(app.id) : app.granted !== false;return (<div key={app.id} className="flex items-start justify-between gap-4">- <div>+ <div className="min-w-0"><label htmlFor={id} className="text-sm text-port-text">{app.name}</label>- <p className="mt-0.5 text-xs text-port-text-muted">{managedAppLanes(app)}</p>+ <p className="mt-0.5 text-xs text-port-text-muted">+ {managedAppLanes(app)}+ {' · '}+ <Link to={`/apps/${encodeURIComponent(app.id)}/automation`} aria-label={`${app.name} automation`} className="text-port-accent hover:underline">Automation</Link>+ </p></div><inputid={id}@@ -206,7 +172,7 @@ export default function PersistentMindTaskAccessControls({checked={checked}disabled={disabled || saving || (!draft.createTasks && !draft.fileIssues)}onChange={(event) => saveAllowedAppIds(app.id, event.target.checked)}- className="mt-1 h-4 w-4 accent-port-accent disabled:opacity-50"+ className="mt-1 h-4 w-4 shrink-0 accent-port-accent disabled:opacity-50"/></div>);@@ -215,23 +181,9 @@ export default function PersistentMindTaskAccessControls({) : (<p className="mt-3 rounded border border-dashed border-port-border p-3 text-xs text-port-text-muted">No runnable managed apps are currently configured.</p>)}- {!draft.createTasks && !draft.fileIssues && <p className="mt-3 text-xs text-port-text-muted">Enable the task or issue capability above before selecting managed apps.</p>}+ {!draft.createTasks && !draft.fileIssues && <p className="mt-3 text-xs text-port-text-muted">Turn on task queueing or issue filing before changing this list.</p>}</div>)}- <div className="rounded border border-port-border bg-port-bg/40 px-3 py-2 text-xs text-port-text-muted">- <p className="font-medium text-port-text">Typed authority only</p>- <p className="mt-1">Every tool has a closed input schema, explicit side-effect policy, stable request id, and normalized result. Raw PortOS routes are never accepted as tool arguments.</p>- </div>- <div className="rounded border border-port-border bg-port-bg/40 px-3 py-2 text-xs text-port-text-muted">- <p className="font-medium text-port-text">Task landing policy stays authoritative</p>- <p className="mt-1">A task can run code review then merge, merge when CI is green, or leave open for human review. The selected per-task landing policy is never widened by this grant.</p>- </div>- <p className="text-xs text-port-text-muted">- An empty model list allows every currently configured coding model. Add exact provider/model pairs below to restrict task creation to a subscription or local-only lane.- </p>- <p className="text-xs text-port-text-muted">- All grants default off. CoS autonomy, capacity, daily budgets, task review defaults, CI, and the tool-specific validation remain authoritative.- </p></div>);}diff --git a/client/src/components/cos/PersistentMindTaskModelAllowlistControls.jsx b/client/src/components/cos/PersistentMindTaskModelAllowlistControls.jsxindex a632dfcea4..1ea1d21273 100644--- a/client/src/components/cos/PersistentMindTaskModelAllowlistControls.jsx+++ b/client/src/components/cos/PersistentMindTaskModelAllowlistControls.jsx@@ -112,7 +112,7 @@ export default function PersistentMindTaskModelAllowlistControls({<div className="flex flex-wrap items-start justify-between gap-3"><div><h3 id={`${idPrefix}-heading`} className="text-sm font-semibold text-port-text">Task model allowlist</h3>- <p className="mt-1 text-xs leading-relaxed text-port-text-muted">Limit the models the mind may choose when it queues agent tasks. This does not change the model used by the mind itself.</p>+ <p className="mt-1 text-xs leading-relaxed text-port-text-muted">Models the mind may queue tasks on. Empty means every enabled coding model. This does not change the mind's own model. Effort is chosen per task.</p></div><buttontype="button"@@ -125,9 +125,7 @@ export default function PersistentMindTaskModelAllowlistControls({</div>{error && <p role="alert" className="mt-3 rounded border border-port-warning/30 bg-port-warning/10 px-3 py-2 text-xs text-port-warning">{error}</p>}{policyInvalid && <p className="mt-3 rounded border border-port-warning/30 bg-port-warning/10 px-3 py-2 text-xs text-port-warning">The saved policy is invalid, so task model selection is currently blocked. Add a valid model pair to repair it.</p>}- {!policyInvalid && entries.length === 0 ? (- <p className="mt-3 text-xs text-port-text-muted">No restriction configured — all enabled coding-provider models remain available.</p>- ) : !policyInvalid && (+ {!policyInvalid && entries.length > 0 && (<div className="mt-3 space-y-2">{entries.map((entry, index) => {const provider = providerById.get(entry.providerId);@@ -168,7 +166,7 @@ export default function PersistentMindTaskModelAllowlistControls({})}</div>)}- <p className="mt-3 text-[11px] leading-relaxed text-port-text-muted">Only exact provider/model pairs are accepted at queue time. A model removed from its provider is rejected until you remove it here.</p>+ {entries.length > 0 && <p className="mt-3 text-[11px] leading-relaxed text-port-text-muted">Queueing accepts only these exact pairs. Remove a model here after it leaves its provider.</p>}</section>);}diff --git a/client/src/components/cos/PersistentMindToolExposureControls.jsx b/client/src/components/cos/PersistentMindToolExposureControls.jsxindex 11c2259314..3482b96264 100644--- a/client/src/components/cos/PersistentMindToolExposureControls.jsx+++ b/client/src/components/cos/PersistentMindToolExposureControls.jsx@@ -59,12 +59,12 @@ export default function PersistentMindToolExposureControls({<div className="space-y-4 border-t border-port-border pt-4"><div><p className="text-sm text-port-text">Progressive tool exposure</p>- <p className="mt-0.5 text-xs text-port-text-muted">Full tool schemas cost context. Only the small always-on core is shown by default; everything else is a one-line index until the mind calls tools.activate for its family. This changes only what is shown — every capability grant above still applies.</p>+ <p className="mt-0.5 text-xs text-port-text-muted">Most schemas stay as a one-line index until the mind activates that family. Grants above still decide what it may call.</p></div><div className="flex items-start justify-between gap-4"><div><label htmlFor={retentionId} className="text-sm text-port-text">Retention window (extra turns)</label>- <p className="mt-0.5 text-xs text-port-text-muted">How many additional user turns an activated family stays fully expanded after the turn that activated it. 0 is one-turn-only.</p>+ <p className="mt-0.5 text-xs text-port-text-muted">Extra turns a family stays expanded. 0 keeps only the activating turn.</p></div><inputid={retentionId}@@ -84,8 +84,8 @@ export default function PersistentMindToolExposureControls({</div><div className="flex items-start justify-between gap-4"><div>- <label htmlFor={allSchemasId} className="text-sm text-port-text">Send every schema on every turn (debug escape hatch)</label>- <p className="mt-0.5 text-xs text-port-text-muted">Restores the pre-progressive-exposure behavior: every granted tool's full schema, every turn. Use this only to debug a routing problem — it costs the most context.</p>+ <label htmlFor={allSchemasId} className="text-sm text-port-text">Send every schema on every turn</label>+ <p className="mt-0.5 text-xs text-port-text-muted">Debug only. Sends every granted schema on each turn.</p></div><inputid={allSchemasId}diff --git a/client/src/pages/PersistentMindTools.jsx b/client/src/pages/PersistentMindTools.jsxindex 10c141eccb..557a57dc90 100644--- a/client/src/pages/PersistentMindTools.jsx+++ b/client/src/pages/PersistentMindTools.jsx@@ -1,6 +1,5 @@import { useCallback, useEffect, useRef, useState } from 'react';-import { CheckCircle2, LockKeyhole, RefreshCw, ShieldCheck } from 'lucide-react';-import { Link } from 'react-router';+import { LockKeyhole, RefreshCw, ShieldCheck } from 'lucide-react';import * as api from '../services/api';import BrailleSpinner from '../components/BrailleSpinner';import Banner from '../components/ui/Banner';@@ -39,7 +38,6 @@ export default function PersistentMindTools({ onCapabilitiesChange, onSavingChan}, [load]);const tools = Array.isArray(data?.tools) ? data.tools : [];- const taskCatalog = data?.taskCatalog;const managedApps = data?.managedApps;const grantedCount = tools.filter((tool) => tool.granted === true).length;const handleCapabilitiesSavingChange = (saving) => {@@ -51,7 +49,6 @@ export default function PersistentMindTools({ onCapabilitiesChange, onSavingChansetData((current) => current ? {...current,capabilities,- taskCatalog: capabilities.createTasks ? current.taskCatalog : null,managedApps: (capabilities.createTasks || capabilities.fileIssues) && current.managedApps? current.managedApps.map((app) => ({...app,@@ -69,48 +66,19 @@ export default function PersistentMindTools({ onCapabilitiesChange, onSavingChan})),} : current);onCapabilitiesChange?.(capabilities);- // A grant the page has no catalog for yet needs a real reload; turning both- // off leaves nothing to fetch.- if ((capabilities.createTasks && !data?.taskCatalog) || (capabilities.fileIssues && !data?.managedApps)) load();+ // The shared app roster arrives only after a task or issue grant is on.+ if ((capabilities.createTasks || capabilities.fileIssues) && !data?.managedApps) load();else if (!capabilities.createTasks && !capabilities.fileIssues) setLoading(false);};return (<div className="space-y-4">- <PersistentMindRecipeLibrary />{error && <Banner tone="error" title="Tools unavailable">{error}. The last loaded state is preserved; retry when the connection recovers.</Banner>}{loading && !data ? (<div className="flex justify-center py-12"><BrailleSpinner text="Loading persistent mind tools" /></div>) : data ? (<>- <details className="rounded border border-port-border bg-port-card p-4">- <summary className="cursor-pointer text-base font-semibold text-port-text">Executable tools ({data.semanticTools?.length || 0})</summary>- <p className="mt-1 text-xs text-port-text-muted">The exact semantic actions available to this mind. Expand a tool to inspect its arguments.</p>- <div className="mt-3 grid gap-2 md:grid-cols-2">- {(data.semanticTools || []).map((tool) => (- <details key={tool.name} className="min-w-0 rounded border border-port-border p-2 text-xs">- <summary className="cursor-pointer break-words font-medium text-port-text">- {tool.name} · {tool.granted ? 'Granted' : 'Disabled'}- {tool.family && (- <span className={`ml-2 rounded-full border px-2 py-0.5 text-[10px] font-normal normal-case ${tool.family === 'core' ? 'border-port-accent/40 text-port-accent' : 'border-port-border text-port-text-muted'}`}>- {tool.family === 'core' ? 'core' : `${tool.family} family`}- </span>- )}- </summary>- <p className="mt-2 text-port-text-muted">{tool.description}</p>- {tool.recipe && (- <div className="mt-2 rounded border border-port-border bg-port-bg p-2 text-port-text-muted">- <p>Saved recipe · Persistent Mind library · revision {tool.recipe.revision}</p>- <p className="mt-1">Read actions: {tool.recipe.underlyingTools?.join(', ') || 'unavailable'}</p>- {!tool.granted && tool.recipe.disabledReason && <p className="mt-1 text-port-warning">{tool.recipe.disabledReason}</p>}- </div>- )}- <pre className="mt-2 max-h-48 overflow-auto whitespace-pre-wrap break-words text-port-text-muted">{JSON.stringify(tool.input_schema, null, 2)}</pre>- </details>- ))}- </div>- </details><section aria-labelledby="tools-summary-heading" className="rounded border border-port-border bg-port-card p-4"><div className="flex flex-wrap items-start justify-between gap-3"><div>@@ -119,17 +87,13 @@ export default function PersistentMindTools({ onCapabilitiesChange, onSavingChanAccess inventory</h2><p className="mt-1 text-sm text-port-text-muted">- {grantedCount} of {tools.length} persistent-mind capabilities granted. Changes apply to the next eligible wake.+ {grantedCount} of {tools.length} persistent-mind capabilities granted. Changes apply on the next wake.</p></div><button type="button" onClick={load} disabled={loading} className="inline-flex min-h-10 items-center gap-1.5 rounded border border-port-border px-3 text-sm text-port-text-muted hover:border-port-accent hover:text-port-accent disabled:opacity-50"><RefreshCw size={15} className={loading ? 'animate-spin motion-reduce:animate-none' : ''} aria-hidden="true" /> Refresh</button></div>- </section>-- <section aria-labelledby="authority-controls-heading" className="rounded border border-port-border bg-port-card p-4">- <h2 id="authority-controls-heading" className="text-sm font-semibold uppercase tracking-wide text-port-text-muted">Authority controls</h2><div className="mt-4"><PersistentMindTaskAccessControlscapabilities={data.capabilities}@@ -139,7 +103,7 @@ export default function PersistentMindTools({ onCapabilitiesChange, onSavingChanonSavingChange={handleCapabilitiesSavingChange}/></div>- <div className="mt-4">+ <div className="mt-4 border-t border-port-border pt-4"><PersistentMindTaskModelAllowlistControlscapabilities={data.capabilities}disabled={capabilitiesSaving}@@ -150,12 +114,14 @@ export default function PersistentMindTools({ onCapabilitiesChange, onSavingChanonSavingChange={handleCapabilitiesSavingChange}/></div>- <PersistentMindSandboxControls- capabilities={data.capabilities}- disabled={capabilitiesSaving}- onSaved={updateCapabilities}- onSavingChange={handleCapabilitiesSavingChange}- />+ <div className="mt-4">+ <PersistentMindSandboxControls+ capabilities={data.capabilities}+ disabled={capabilitiesSaving}+ onSaved={updateCapabilities}+ onSavingChange={handleCapabilitiesSavingChange}+ />+ </div><PersistentMindToolExposureControlscapabilities={data.capabilities}disabled={capabilitiesSaving}@@ -164,82 +130,69 @@ export default function PersistentMindTools({ onCapabilitiesChange, onSavingChan/></section>- {taskCatalog && (- <section aria-labelledby="task-catalog-heading" className="rounded border border-port-border bg-port-card p-4">- <h2 id="task-catalog-heading" className="text-sm font-semibold uppercase tracking-wide text-port-text-muted">Available task filing choices</h2>- <p className="mt-1 text-sm text-port-text-muted">These are the current choices the mind receives when it uses the typed task action. Repository paths and credentials are never included. Use Managed app access above to change which apps are authorized.</p>- <div className="mt-4 grid gap-4 lg:grid-cols-2">- <div>- <h3 className="text-xs font-semibold uppercase tracking-wide text-port-text-muted">Target apps</h3>- <ul className="mt-2 space-y-2 text-sm text-port-text">- {(managedApps || []).map((app) => (- <li key={app.id} className="rounded border border-port-border px-3 py-2">- <Link to={`/apps/${encodeURIComponent(app.id)}/automation`} className="text-port-accent hover:underline">{app.name}</Link>- <span className={`ml-2 rounded-full border px-2 py-0.5 text-[11px] ${app.granted === false ? 'border-port-border text-port-text-muted' : 'border-port-success/40 text-port-success'}`}>{app.granted === false ? 'Not authorized' : 'Authorized'}</span>- <span className="ml-2 text-xs text-port-text-muted">{app.planOnly ? 'Implementation or Plan & File Issue' : 'Implementation delivery'}</span>- </li>- ))}- </ul>- </div>- <div>- <h3 className="text-xs font-semibold uppercase tracking-wide text-port-text-muted">Coding providers, models, and effort</h3>- <ul className="mt-2 space-y-2 text-sm text-port-text">- {(taskCatalog.providers || []).map((provider) => (- <li key={provider.id} className="rounded border border-port-border px-3 py-2">- <div>{provider.name}</div>- {provider.models?.length ? provider.models.map((model) => (- <div key={model.id} className="mt-1 text-xs text-port-text-muted">- {model.id} · {model.efforts?.length ? model.efforts.join(', ') : 'provider default effort'}- </div>- )) : <div className="mt-1 text-xs text-port-text-muted">Provider default model and effort</div>}- </li>- ))}- </ul>- </div>- </div>- </section>- )}+ <PersistentMindRecipeLibrary />- <section aria-labelledby="tools-heading" className="space-y-3">- <h2 id="tools-heading" className="text-sm font-semibold uppercase tracking-wide text-port-text-muted">Granted capabilities</h2>- {tools.map((tool) => (- <article key={tool.id} className="rounded border border-port-border bg-port-card p-4">- <div className="flex flex-wrap items-start justify-between gap-3">- <div className="flex min-w-0 items-start gap-3">- <span className={`mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded ${tool.granted ? 'bg-port-success/15 text-port-success' : 'bg-port-border/50 text-port-text-muted'}`}>- {tool.granted ? <CheckCircle2 size={19} aria-hidden="true" /> : <LockKeyhole size={18} aria-hidden="true" />}- </span>- <div className="min-w-0">+ <details className="rounded border border-port-border bg-port-card p-4">+ <summary className="cursor-pointer text-sm font-semibold text-port-text">Limits and schemas</summary>+ <div className="mt-4 space-y-4">+ <section aria-labelledby="tools-heading" className="space-y-2">+ <h2 id="tools-heading" className="text-xs font-semibold uppercase tracking-wide text-port-text-muted">Grant limits</h2>+ {tools.map((tool) => (+ <article key={tool.id} className="rounded border border-port-border p-3">+ <div className="flex flex-wrap items-start justify-between gap-2"><h3 className="text-sm font-semibold text-port-text">{tool.name}</h3>- <p className="mt-1 text-sm text-port-text-muted">{tool.description}</p>+ <span className={`rounded-full border px-2 py-0.5 text-xs font-medium ${tool.granted ? 'border-port-success/40 text-port-success' : 'border-port-border text-port-text-muted'}`}>+ {tool.granted ? 'Granted' : 'Off by default'}+ </span></div>- </div>- <span className={`rounded-full border px-2.5 py-1 text-xs font-medium ${tool.granted ? 'border-port-success/40 text-port-success' : 'border-port-border text-port-text-muted'}`}>- {tool.granted ? 'Granted' : 'Off by default'}- </span>- </div>+ {tool.description && <p className="mt-1 text-xs text-port-text-muted">{tool.description}</p>}+ {Array.isArray(tool.guardrails) && tool.guardrails.length > 0 && (+ <ul className="mt-2 space-y-1 text-xs text-port-text-muted">+ {tool.guardrails.map((guardrail) => <li key={guardrail}>{guardrail}</li>)}+ </ul>+ )}+ </article>+ ))}+ </section>- {Array.isArray(tool.guardrails) && tool.guardrails.length > 0 && (- <div className="mt-4 rounded border border-port-border bg-port-bg/40 px-3 py-2">- <p className="text-xs font-semibold uppercase tracking-wide text-port-text-muted">Guardrails</p>- <ul className="mt-2 space-y-1 text-xs text-port-text-muted">- {tool.guardrails.map((guardrail) => <li key={guardrail}>• {guardrail}</li>)}- </ul>- </div>- )}- </article>- ))}- </section>+ <section aria-labelledby="semantic-tools-heading">+ <h2 id="semantic-tools-heading" className="text-xs font-semibold uppercase tracking-wide text-port-text-muted">Executable tools ({data.semanticTools?.length || 0})</h2>+ <div className="mt-2 grid gap-2 md:grid-cols-2">+ {(data.semanticTools || []).map((tool) => (+ <details key={tool.name} className="min-w-0 rounded border border-port-border p-2 text-xs">+ <summary className="cursor-pointer break-words font-medium text-port-text">+ {tool.name} · {tool.granted ? 'Granted' : 'Disabled'}+ {tool.family && (+ <span className={`ml-2 rounded-full border px-2 py-0.5 text-[10px] font-normal normal-case ${tool.family === 'core' ? 'border-port-accent/40 text-port-accent' : 'border-port-border text-port-text-muted'}`}>+ {tool.family === 'core' ? 'core' : `${tool.family} family`}+ </span>+ )}+ </summary>+ <p className="mt-2 text-port-text-muted">{tool.description}</p>+ {tool.recipe && (+ <div className="mt-2 rounded border border-port-border bg-port-bg p-2 text-port-text-muted">+ <p>Saved recipe · revision {tool.recipe.revision}</p>+ <p className="mt-1">Reads: {tool.recipe.underlyingTools?.join(', ') || 'unavailable'}</p>+ {!tool.granted && tool.recipe.disabledReason && <p className="mt-1 text-port-warning">{tool.recipe.disabledReason}</p>}+ </div>+ )}+ <pre className="mt-2 max-h-48 overflow-auto whitespace-pre-wrap break-words text-port-text-muted">{JSON.stringify(tool.input_schema, null, 2)}</pre>+ </details>+ ))}+ </div>+ </section>- <section aria-labelledby="boundaries-heading" className="rounded border border-port-border bg-port-card p-4">- <h2 id="boundaries-heading" className="flex items-center gap-2 text-sm font-semibold text-port-text">- <LockKeyhole size={16} className="text-port-warning" aria-hidden="true" />- Always outside the persistent mind's authority- </h2>- <ul className="mt-3 grid gap-2 text-sm text-port-text-muted sm:grid-cols-3">- {(data.boundaries || []).map((boundary) => <li key={boundary} className="rounded border border-port-border px-3 py-2">{boundary}</li>)}- </ul>- </section>+ <section aria-labelledby="boundaries-heading">+ <h2 id="boundaries-heading" className="flex items-center gap-2 text-xs font-semibold uppercase tracking-wide text-port-text-muted">+ <LockKeyhole size={14} className="text-port-warning" aria-hidden="true" />+ Always refused+ </h2>+ <ul className="mt-2 space-y-1 text-xs text-port-text-muted">+ {(data.boundaries || []).map((boundary) => <li key={boundary}>{boundary}</li>)}+ </ul>+ </section>+ </div>+ </details></>) : null}</div>diff --git a/client/src/pages/PersistentMindTools.test.jsx b/client/src/pages/PersistentMindTools.test.jsxindex 5427ed7a8c..bf05dec93e 100644--- a/client/src/pages/PersistentMindTools.test.jsx+++ b/client/src/pages/PersistentMindTools.test.jsx@@ -117,9 +117,9 @@ describe('PersistentMindTools', () => {));expect(await screen.findByText(/persistent-mind capabilities granted/)).toHaveTextContent('1 of 1');expect(screen.getByText('Granted')).toBeInTheDocument();- expect(await screen.findByText('Available task filing choices')).toBeInTheDocument();+ expect(screen.queryByText('Coding providers, models, and effort')).not.toBeInTheDocument();expect(screen.getAllByText(/Implementation or Plan & File Issue/)).not.toHaveLength(0);- expect(screen.getByText('gpt-5 · low, high')).toBeInTheDocument();+ expect(screen.getByRole('link', { name: 'Example App automation' })).toHaveAttribute('href', '/apps/example-app/automation');expect(api.getPersistentMindTools).toHaveBeenCalledTimes(2);});@@ -190,7 +190,7 @@ describe('PersistentMindTools', () => {{ silent: true },));expect(secondApp).not.toBeChecked();- expect(screen.getByRole('link', { name: 'Example App' })).toHaveAttribute('href', '/apps/example-app/automation');+ expect(screen.getByRole('link', { name: 'Example App automation' })).toHaveAttribute('href', '/apps/example-app/automation');});it('does not let a stale catalog refresh restore a revoked grant', async () => {@@ -218,7 +218,7 @@ describe('PersistentMindTools', () => {}));await waitFor(() => expect(toggle).not.toBeChecked());- expect(screen.queryByText('Available task filing choices')).not.toBeInTheDocument();+ expect(screen.queryByText('Stale App')).not.toBeInTheDocument();});it('grants issue filing independently and scopes it with the shared managed-app roster', async () => {diff --git a/docs/API_TOOL_CONTRACT.md b/docs/API_TOOL_CONTRACT.mdindex 3fabc51318..12f120c528 100644--- a/docs/API_TOOL_CONTRACT.md+++ b/docs/API_TOOL_CONTRACT.md@@ -77,9 +77,10 @@ the same registry as the HTTP and Persistent Mind paths.### Persistent Mind authority inventory`GET /api/cos/mind/tools` remains a separate authority view. It reports the-Persistent Mind capability schema, boundaries, task catalog, grant state, and-current saved recipe descriptors;-it is not the generic semantic catalog. Persistent Mind execution uses the+Persistent Mind capability schema, boundaries, grant state, managed-app roster,+and current saved recipe descriptors. Coding-provider catalogs stay on the+wake-time task prompt, not this settings view.+It is not the generic semantic catalog. Persistent Mind execution uses thesame registry internally and has a five-call semantic/tool budget plus afive-task-per-turn budget. No new authority is implied by the broader HTTPinventory.diff --git a/docs/features/cos-enhancement.md b/docs/features/cos-enhancement.mdindex 172c0d9ec2..2798fd0592 100644--- a/docs/features/cos-enhancement.md+++ b/docs/features/cos-enhancement.md@@ -119,12 +119,12 @@ non-empty list is applied to both the model choices sent to the mind and theserver-side queue admission check, which supports subscription-specific orlocal-only task lanes. A removed or malformed allowlist fails closed.-`GET /api/cos/mind/tools` returns the authority inventory and, when task access is-granted, the same redacted task catalog used in the mind prompt. This keeps the-Mind Tools UI and the model-facing contract discoverable without granting the-mind arbitrary shell, filesystem, or general API access. Broader PortOS APIs-remain governed by their own authenticated route contracts and are not silently-made callable by enabling task filing.+`GET /api/cos/mind/tools` returns the authority inventory and the managed-app+roster. It does not list coding providers, models, or effort levels — the mind+still receives that redacted catalog in its wake-time task prompt, and Mind+Tools restricts models only through the task-model allowlist. Broader PortOS+APIs remain governed by their own authenticated route contracts and are not+silently made callable by enabling task filing.## Persistent Mind phone callsdiff --git a/server/routes/cosMindRoutes.js b/server/routes/cosMindRoutes.jsindex a6328a237a..7f04b0daaf 100644--- a/server/routes/cosMindRoutes.js+++ b/server/routes/cosMindRoutes.js@@ -65,7 +65,7 @@ import {previewPersistentMindBundle,} from '../services/persistentMindBundle.js';import { resolvePersistentMindImageCapability } from '../services/persistentMindImageCapability.js';-import { readPersistentMindTaskCatalog } from '../services/persistentMindTaskCapability.js';+import { inspectPersistentMindRuntime } from '../services/persistentMindRuntime.js';import { readPersistentMindVisibility } from '../services/persistentMindVisibility.js';import {@@ -345,8 +345,7 @@ router.get('/mind/tools', asyncHandler(async (_req, res) => {? import('../services/persistentMindManagedApps.js').then(({ readPersistentMindManagedApps }) => readPersistentMindManagedApps()): null;- const [taskCatalog, recipes, roster] = await Promise.all([- capabilities.createTasks ? readPersistentMindTaskCatalog() : null,+ const [recipes, roster] = await Promise.all([readCosToolRecipeCatalog({ scope: 'mind' }),managedApps,]);@@ -355,9 +354,10 @@ router.get('/mind/tools', asyncHandler(async (_req, res) => {schemaVersion: PERSISTENT_MIND_CAPABILITIES_SCHEMA_VERSION,capabilities,boundaries: PERSISTENT_MIND_TOOL_BOUNDARIES,- // Providers and readiness only: the apps the mind may target come from the- // roster, so the page never shows two lists that could disagree.- taskCatalog: taskCatalog && { providers: taskCatalog.providers, providerReadiness: taskCatalog.providerReadiness },+ // The coding-provider catalog stays on the wake-time task prompt. This+ // settings view configures grants and the allowlist; it does not list+ // every provider, model, and effort. Apps come from the one shared roster.+ taskCatalog: null,managedApps: roster && roster.map(({ id, name, planOnly, forge, fullName, granted }) => ({id, name, planOnly, forge, fullName, granted,})),diff --git a/server/routes/cosMindRoutes.test.js b/server/routes/cosMindRoutes.test.jsindex 22a20348a6..234a421357 100644--- a/server/routes/cosMindRoutes.test.js+++ b/server/routes/cosMindRoutes.test.js@@ -354,12 +354,12 @@ describe('persistent mind routes', () => {expect.objectContaining({ id: 'mind.cleanup', capability: 'manageMind', granted: false, defaultEnabled: false }),expect.objectContaining({ id: 'voice.call-user', capability: 'callUser', granted: false, defaultEnabled: false }),]),- // Providers only: the apps live on the one shared roster, so the page- // cannot render two managed-app lists that disagree.- taskCatalog: { providers: [{ id: 'codex' }] },+ // Coding providers stay off this settings payload. The page configures+ // grants and the model allowlist; the wake-time prompt still gets the catalog.+ taskCatalog: null,managedApps: [{ id: 'demo-app', name: 'Demo App', planOnly: true, forge: 'github', granted: true }],});- expect(res.body.taskCatalog.apps).toBeUndefined();+ expect(mocks.readPersistentMindTaskCatalog).not.toHaveBeenCalled();// The roster never leaks a filesystem path to the browser.expect(res.body.managedApps[0].repoPath).toBeUndefined();expect(res.body.tools.find((tool) => tool.id === 'cos.create-task').guardrails).toEqual(expect.arrayContaining([