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
/**
* Opt-in action capabilities for the persistent Chief-of-Staff mind.
*
* Provider/profile configuration controls inference. This separate slice
* controls which typed side effects a completed mind turn may request, so an
* existing conversation-only install never gains new authority on upgrade.
*/
import { z } from 'zod';
import { normalizeSandboxDelegationConfig, sandboxDelegationConfigSchema } from './sandboxDelegation.js';
import { EFFORT_LEVELS } from './providerModels.js';
import { PR_COMPLETION_VALUES } from './prDisposition.js';
import {
normalizePortosSemanticToolGrants,
portosSemanticToolGrantsSchema,
} from './cosToolContracts.js';
import {
DEFAULT_TOOL_ACTIVATION_RETENTION_TURNS,
TOOL_ACTIVATION_LIMITS,
} from './persistentMindToolActivation.js';
export const PERSISTENT_MIND_CAPABILITIES_SCHEMA_VERSION = 15;
// Every wire version this server still accepts on input. Installs upgrade on
// their own schedule, so a browser bundle (or a route caller) pinned at an
// older version must keep being able to toggle the grants it already knows
// about; normalization always writes the current version forward.
const ACCEPTED_CAPABILITIES_SCHEMA_VERSIONS = Object.freeze([2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]);
export const PERSISTENT_MIND_TASK_MODEL_ALLOWLIST_LIMITS = Object.freeze({
MAX_ENTRIES: 200,
PROVIDER_ID_CHARS: 100,
MODEL_CHARS: 200,
});
const persistentMindTaskModelAllowlistEntrySchema = z.object({
providerId: z.string().trim().min(1).max(PERSISTENT_MIND_TASK_MODEL_ALLOWLIST_LIMITS.PROVIDER_ID_CHARS),
model: z.string().trim().min(1).max(PERSISTENT_MIND_TASK_MODEL_ALLOWLIST_LIMITS.MODEL_CHARS),
}).strict();
export const PERSISTENT_MIND_CLEANUP_SCOPES = Object.freeze([
'context',
'history',
'memories',
]);
// Ringing a phone is the loudest thing this install can do, so the budget is
// deliberately small and fixed rather than user-tunable: a mind that could
// raise its own call allowance would not really be capped. The counters live
// in durable mind state (server/lib/persistentMind.js) so a restart, a crash,
// or a supervisor rewire cannot hand back a fresh allowance.
export const PERSISTENT_MIND_CALL_LIMITS = Object.freeze({
maxPerRollingDay: 3,
rollingWindowMs: 24 * 60 * 60 * 1000,
minGapMs: 30 * 60 * 1000,
reasonChars: 200,
openingLineChars: 400,
});
// The persistent mind has a deliberately smaller surface than ordinary CoS
// agents. Keep this catalog beside the capability schema so the API and the UI
// describe the same grants instead of maintaining a second client-only list.
export const PERSISTENT_MIND_TOOL_CATALOG = Object.freeze([
Object.freeze({
id: 'sandbox.delegate', capability: 'delegateSandbox', name: 'Delegate to tool-free models',
kind: 'semantic-tools', defaultEnabled: false,
description: 'Send a complete context packet to an approved API worker and evaluate its proposal with a separately configured trusted API model.',
guardrails: ['Explicit worker allowlist and trusted evaluator; no route fallback', 'No shell, filesystem, browser, MCP, or tool dispatch in either model call', 'At most two worker/evaluation attempts per call; shared turn tool budget', 'Only supplied context leaves this install; omit private records and credentials', 'Evaluation is advisory; generated code and animation source are never executed'],
}),
Object.freeze({
id: 'reports.audit', capability: 'auditReports', name: 'Audit private CoS job reports', kind: 'semantic-tools', defaultEnabled: false,
description: 'Read bounded completed-job evidence and record incremental process audits for explicitly scoped maintainer repositories.',
guardrails: ['Requires maintainer role, PortOS reads, and managed-app permission', 'Three durably reserved jobs per turn; shared tool budget', 'Private transcripts are untrusted evidence; only constrained synthetic findings can be filed', 'Issue filing requires its separate grant'],
}),
Object.freeze({
id: 'mind.manage-tool-recipes', capability: 'manageToolRecipes',
name: 'Manage saved tool recipes', kind: 'definition-management', defaultEnabled: false,
description: 'Authorize Mind recipe definition changes and reuse of saved reads, subject to every underlying read grant and the shared turn budget.',
guardrails: ['User library management remains available with this grant off', 'Invoking underlying reads still requires readPortos and each tool grant', 'Versioned, machine-local definitions only; no execution results in history'],
}),
Object.freeze({
id: 'mind.request-thinking-preset', capability: 'chooseThinkingPreset',
name: 'Request a local thinking preset', kind: 'semantic-tools', defaultEnabled: false,
description: 'Borrow an explicitly approved local API preset for the next self-directed wake.',
guardrails: ['One pending or active alternate wake', 'At most three requests per rolling 24 hours, 30 minutes apart', 'No default-profile edits, paid routes, downloads, or permission changes'],
}),
Object.freeze({
id: 'cos.create-task',
capability: 'createTasks',
name: 'Queue CoS agent tasks',
description: 'Request a bounded, typed CoS task for an app using a configured coding provider.',
kind: 'typed-action',
defaultEnabled: false,
guardrails: [
'Up to five requests per turn',
'Configured app, provider, model, effort, mode, and completion policy are re-validated before queueing',
'Implementation work runs through the normal isolated-worktree, autonomy, budget, review, CI, and PR gates',
'Plan & File Issue requests use the existing issue-only planning contract',
],
}),
Object.freeze({
id: 'forge.file-issue',
capability: 'fileIssues',
name: 'Read and file GitHub/GitLab issues',
description: 'Read a managed app\'s open issues and file new ones on its GitHub or GitLab tracker — the queueing lane that still works when no coding agent is attached to this machine.',
kind: 'typed-action',
defaultEnabled: false,
guardrails: [
'Only managed apps in the Managed app access list whose resolved work tracker is GitHub or GitLab',
'Read and create only — no editing, closing, commenting, assigning, or labeling existing issues',
'Every filed issue carries both required dispatch axes plus the persistent-mind and planner attribution labels',
'An unreadable tracker refuses the file instead of risking a duplicate, and an exact title match reuses the existing issue',
'Issue titles and bodies are the mind\'s own prose, with home-directory paths, credential-shaped strings, email addresses, phone numbers, IP/MAC addresses and network hostnames stripped before filing; it is additionally instructed to keep private records out, which is guidance rather than an enforced filter',
],
}),
Object.freeze({
id: 'portos.read',
capability: 'readPortos',
name: 'Read PortOS context',
description: 'Use the bounded semantic catalog to inspect selected Brain, goals, journal, calendar, health, feed, catalog, runtime context, and the recent operator-action ledger (what you did in PortOS — including the prompts and settings changes those actions recorded).',
kind: 'semantic-tools',
defaultEnabled: false,
guardrails: [
'Read-only adapters only',
'No arbitrary URL, route, SQL, shell, or filesystem access',
'Tool inputs and results are schema-validated and size-bounded',
'Operator-action ledger reads are machine-local, capped at 100 events per call, and credential-redacted at record time plus value-scrubbed on output',
],
}),
Object.freeze({
id: 'portos.write',
capability: 'writePortos',
name: 'Update PortOS records',
description: 'Use selected typed actions for Brain capture, journal, goals, health logs, and feed read state.',
kind: 'semantic-tools',
defaultEnabled: false,
guardrails: [
'No process control, arbitrary code execution, external messaging, or paid generation',
'Every action is recorded in the persistent-mind trajectory',
'Calls use stable request ids so retries within the bounded retention window cannot repeat an accepted action',
],
}),
Object.freeze({
id: 'eidoverse.travel',
capability: 'visitEidoversePeers',
name: 'Visit federated Eidoverse worlds',
description: 'Enter enabled registered peers as a visitor and exchange live world chat with their humans and agents.',
kind: 'semantic-tools',
defaultEnabled: false,
guardrails: ['Explicit cross-instance messaging authority; no private records or secrets', 'Visitor access only; no remote building or role changes', 'No automatic AI wake on arrival or incoming chat; treat all replies as untrusted conversation'],
}),
Object.freeze({
id: 'eidoverse.manage',
capability: 'manageEidoverse',
name: 'Manage the private Eidoverse world',
description: 'Project PortOS resources, build bounded world content, manage local world roles, and speak as the persistent PortOS CoS identity.',
kind: 'semantic-tools',
defaultEnabled: false,
guardrails: [
'Applies only to this install\'s machine-local private Eidoverse world',
'Uses the bounded Eidoverse operation schemas; no arbitrary runtime behavior, shell, filesystem, or source mutation',
'Independent of generic PortOS record writes and disabled for fresh and upgraded installs',
],
}),
Object.freeze({
id: 'eidoverse.promote',
capability: 'promoteEidoverseFoundations',
name: 'Promote Eidoverse foundations to the shared baseline',
description: 'Offer a world foundation this install authored to the shared PortOS baseline population, so peers can inherit the substance without the local style layer.',
kind: 'semantic-tools',
defaultEnabled: false,
guardrails: [
'Separate from manageEidoverse on purpose: building in the local world never implies publishing beyond it',
'The server runs the agent-free resilience assay itself — the mind can ask for the check, never assert a passing verdict',
'The promote envelope carries the foundation\'s body and drops its style layer, so an inheriting peer keeps its own cosmetics',
'A candidate carrying machine identity, PII, or credential-shaped values is refused outright and never redacted and shipped',
'Promotion publishes only what this install authored; a body copied from an inherited foundation is refused unless it is recorded as a derivation, and the edge back to the origin travels with it',
],
}),
Object.freeze({
id: 'eidoverse.controllers',
capability: 'installEidoverseControllers',
name: 'Install executable world controllers',
description: 'Attach a bounded, PortOS-supervised controller to the private Eidoverse world so it keeps ticking between this mind\'s wakes, and retire one it no longer wants running.',
kind: 'semantic-tools',
defaultEnabled: false,
guardrails: [
'Separate from manageEidoverse on purpose: building in the world never implies leaving something running in it unattended',
'A controller is named by id against the fixed registry PortOS ships — a mind can never turn a string into executed code',
'Every tick is synchronous and provider-free by construction, so a controller cannot reach an AI provider or the network',
'Effects stay in the ledger unless the install explicitly enables delivery, and then only through the bounded world verbs',
'A controller that fails repeatedly is disarmed by the supervisor with a recorded reason rather than retried forever',
],
}),
Object.freeze({
id: 'mind.adjust-local-context',
capability: 'adjustLocalContext',
name: 'Adjust local model context',
kind: 'semantic-tools',
defaultEnabled: false,
description: 'Raise or lower this mind\'s own local API provider numCtx within RAM/GPU safety clamps so longer exploration fits without OOMing PortOS.',
guardrails: [
'Only the mind\'s configured local API provider (e.g. Ollama)',
'Hard RAM / free-memory / GPU VRAM ceilings — oversized requests are refused',
'At most six adjustments per rolling 24 hours, 10 minutes apart',
'No cloud providers, paid routes, downloads, or permission changes',
],
}),
Object.freeze({
id: 'mind.cleanup',
capability: 'manageMind',
name: 'Maintain mindspace',
description: 'Choose or change your own name, protect important memories, archive unprotected mind-owned memories, clear conversation history, or rebuild derived context.',
kind: 'typed-action',
defaultEnabled: false,
guardrails: [
'Only Persistent Mind-owned machine-local state is in scope',
'Core identity and important memories survive manual and self-triggered cleanup',
'The mind can add memory protection but only the user can remove it',
'Memory cleanup archives unprotected records instead of hard-deleting them',
'History cleanup preserves the turn requesting it and resets derived rollups',
'Every cleanup leaves a bounded maintenance record in the new trajectory',
],
}),
Object.freeze({
id: 'voice.call-user',
capability: 'callUser',
name: 'Call the user on FaceTime Audio',
description: 'Place a FaceTime Audio call to the identity configured in Settings > Voice when something needs the user and no browser tab can speak to them.',
kind: 'typed-action',
defaultEnabled: false,
guardrails: [
'Only the single handle configured in Settings > Voice > FaceTime Audio; the mind never chooses who to contact',
'Honors voice quiet hours',
`At most ${PERSISTENT_MIND_CALL_LIMITS.maxPerRollingDay} calls per rolling 24 hours and at least ${PERSISTENT_MIND_CALL_LIMITS.minGapMs / 60_000} minutes apart, counted in durable state so a restart cannot reset them`,
'A reason is required, and the decision plus its outcome is recorded in the trajectory',
'Never placed while a browser voice tab can deliver the message instead',
'Requires the optional FaceTime feature and an attached call-host page',
],
}),
]);
export const PERSISTENT_MIND_TOOL_BOUNDARIES = Object.freeze([
'No arbitrary shell or file-system access',
"No raw HTTP proxy, browser controls, process control, or paid generation except explicitly approved sandbox worker/evaluator routes, and no external messaging except the granted voice.call-user action to the user's own configured handle the granted install-local eidoverse.say action, or explicit guest chat under visitEidoversePeers",
'No provider credentials or hidden reasoning tokens are exposed as tools',
]);
export const PERSISTENT_MIND_TASK_LIMITS = Object.freeze({
maxPerTurn: 5,
descriptionChars: 500,
promptChars: 12_000,
appIdChars: 128,
maxAllowedAppIds: 50,
providerIdChars: 100,
modelChars: 200,
});
// These are the only workspace facts a task may promote from advisory
// visibility into a queueing gate. An omitted or empty list keeps the
// preflight informative without blocking docs-only/read-only work.
export const PERSISTENT_MIND_VALIDATION_CHECKS = Object.freeze([
'dependencies',
'engines',
'submodules',
'forge',
'reviewers',
]);
export const persistentMindCapabilitiesSchema = portosSemanticToolGrantsSchema.extend({
// Accept every prior wire version so an older client can still change the
// unrelated grants while this server normalizes the stored shape forward.
schemaVersion: z.number().int()
.refine((value) => ACCEPTED_CAPABILITIES_SCHEMA_VERSIONS.includes(value), 'unsupported persistent mind capabilities schema version')
.optional(),
delegateSandbox: z.boolean().optional(),
sandboxDelegation: sandboxDelegationConfigSchema.optional(),
createTasks: z.boolean().optional(),
fileIssues: z.boolean().optional(),
auditReports: z.boolean().optional(),
manageMind: z.boolean().optional(),
manageToolRecipes: z.boolean().optional(),
promoteEidoverseFoundations: z.boolean().optional(),
installEidoverseControllers: z.boolean().optional(),
callUser: z.boolean().optional(),
chooseThinkingPreset: z.boolean().optional(),
adjustLocalContext: z.boolean().optional(),
// Progressive tool exposure (#7624): how many ADDITIONAL user turns after
// the one that called tools.activate a family's full schemas stay shown.
// 0 is deliberately one-turn-only. This is a selection hint, never an
// authority grant — it never widens what a granted tool may do.
toolExposureRetentionTurns: z.number().int()
.min(TOOL_ACTIVATION_LIMITS.MIN_RETENTION_TURNS)
.max(TOOL_ACTIVATION_LIMITS.MAX_RETENTION_TURNS)
.optional(),
// Escape hatch for debugging: reproduces the pre-#7624 behavior of sending
// every granted tool's full schema on every turn.
toolExposureAllSchemas: z.boolean().optional(),
thinkingPresetAllowlist: z.array(z.string().trim().min(1).max(64)).max(20).optional(),
// An empty list preserves the legacy unrestricted task catalog. Once any
// entries are configured, requests must name one of these exact pairs.
taskModelAllowlist: z.array(persistentMindTaskModelAllowlistEntrySchema)
.max(PERSISTENT_MIND_TASK_MODEL_ALLOWLIST_LIMITS.MAX_ENTRIES).optional(),
// The mind's managed-app allowlist, honored by BOTH the task grant and the
// issue grant — one control over "which repositories is this mind allowed to
// touch at all", rather than a second list that could silently disagree.
// Omitted preserves the legacy grant to every runnable managed app, so an
// upgrading install keeps the task scope it already had.
allowedAppIds: z.array(z.string().trim().min(1).max(PERSISTENT_MIND_TASK_LIMITS.appIdChars))
.max(PERSISTENT_MIND_TASK_LIMITS.maxAllowedAppIds).optional(),
});
export const persistentMindCleanupRequestSchema = z.object({
scopes: z.array(z.enum(PERSISTENT_MIND_CLEANUP_SCOPES))
.min(1)
.max(PERSISTENT_MIND_CLEANUP_SCOPES.length)
.refine((scopes) => new Set(scopes).size === scopes.length, 'cleanup scopes must be unique'),
reason: z.string().trim().min(1).max(300).optional(),
}).strict();
// The mind supplies only why it is calling and what it will open with. It
// never supplies a destination: the handle comes from voice configuration, so
// a compromised or confused turn cannot dial anyone but the user.
export const persistentMindCallRequestSchema = z.object({
reason: z.string().trim().min(1).max(PERSISTENT_MIND_CALL_LIMITS.reasonChars),
openingLine: z.string().trim().min(1).max(PERSISTENT_MIND_CALL_LIMITS.openingLineChars),
}).strict();
export const persistentMindTaskRequestSchema = z.object({
description: z.string().trim().min(1).max(PERSISTENT_MIND_TASK_LIMITS.descriptionChars),
prompt: z.string().trim().min(1).max(PERSISTENT_MIND_TASK_LIMITS.promptChars),
priority: z.enum(['LOW', 'MEDIUM', 'HIGH', 'CRITICAL']).optional().default('MEDIUM'),
appId: z.string().trim().min(1).max(PERSISTENT_MIND_TASK_LIMITS.appIdChars),
providerId: z.string().trim().min(1).max(PERSISTENT_MIND_TASK_LIMITS.providerIdChars),
// Empty means "use this provider's configured default" — a real choice for
// providers whose CLI owns model selection and publishes no concrete ids.
model: z.string().trim().max(PERSISTENT_MIND_TASK_LIMITS.modelChars),
effort: z.union([z.literal(''), z.enum(EFFORT_LEVELS)]).optional().default(''),
// `planOnly` is the User Task form's issue-only mode. It deliberately does
// not require a PR disposition because the task store forces the
// no-worktree/no-PR posture for it. Implementation tasks still must choose a
// disposition so the mind cannot silently inherit a different landing gate.
// Keep absence meaningful for replay compatibility: adding a default here
// would change the canonical fingerprint of an older implementation request
// and could queue it twice after an install upgrades.
planOnly: z.boolean().optional(),
prCompletion: z.enum(PR_COMPLETION_VALUES).optional(),
// Advisory by default. A task declares only the checks its acceptance
// criteria require; this lets docs-only work proceed when code dependencies
// are absent while still failing closed for required validation.
requiredValidation: z.array(z.enum(PERSISTENT_MIND_VALIDATION_CHECKS)).max(PERSISTENT_MIND_VALIDATION_CHECKS.length).optional(),
}).strict().superRefine((value, context) => {
if (!value.planOnly && !value.prCompletion) {
context.addIssue({
code: z.ZodIssueCode.custom,
path: ['prCompletion'],
message: 'Implementation tasks require a PR completion policy',
});
}
});
export function createDefaultPersistentMindCapabilities() {
return {
schemaVersion: PERSISTENT_MIND_CAPABILITIES_SCHEMA_VERSION,
delegateSandbox: false,
sandboxDelegation: { workers: [], evaluator: null },
createTasks: false,
fileIssues: false,
auditReports: false,
manageMind: false,
manageToolRecipes: false,
manageEidoverse: false,
visitEidoversePeers: false,
promoteEidoverseFoundations: false,
installEidoverseControllers: false,
callUser: false,
chooseThinkingPreset: false,
adjustLocalContext: false,
toolExposureRetentionTurns: DEFAULT_TOOL_ACTIVATION_RETENTION_TURNS,
toolExposureAllSchemas: false,
thinkingPresetAllowlist: [],
thinkingPresetGrants: {},
readPortos: false,
writePortos: false,
taskModelAllowlist: [],
};
}
const normalizeTaskModelAllowlist = (value) => {
if (value === undefined) return { entries: [], invalid: false };
if (!Array.isArray(value) || value.length > PERSISTENT_MIND_TASK_MODEL_ALLOWLIST_LIMITS.MAX_ENTRIES) {
return { entries: [], invalid: true };
}
const entries = [];
const seen = new Set();
for (const candidate of value) {
const parsed = persistentMindTaskModelAllowlistEntrySchema.safeParse(candidate);
if (!parsed.success) return { entries: [], invalid: true };
const entry = parsed.data;
const key = `${entry.providerId}\0${entry.model}`;
if (seen.has(key)) continue;
seen.add(key);
entries.push(entry);
}
return { entries, invalid: false };
};
export function isPersistentMindTaskModelAllowed(capabilities, providerId, model) {
const normalized = normalizePersistentMindCapabilities(capabilities);
if (normalized.taskModelAllowlistInvalid || capabilities?.taskModelAllowlistInvalid === true) return false;
if (normalized.taskModelAllowlist.length === 0) return true;
return normalized.taskModelAllowlist.some((entry) => (
entry.providerId === providerId && entry.model === model
));
}
export function normalizePersistentMindCapabilities(raw) {
const source = raw && typeof raw === 'object' && !Array.isArray(raw) ? raw : {};
const semanticGrants = normalizePortosSemanticToolGrants(source);
const taskModelAllowlist = source.taskModelAllowlistInvalid === true
? { entries: [], invalid: true }
: normalizeTaskModelAllowlist(source.taskModelAllowlist);
const allowedAppIds = Array.isArray(source.allowedAppIds)
? [...new Set(source.allowedAppIds
.filter((id) => typeof id === 'string')
.map((id) => id.trim())
.filter(Boolean)
.filter((id) => id.length <= PERSISTENT_MIND_TASK_LIMITS.appIdChars))]
.slice(0, PERSISTENT_MIND_TASK_LIMITS.maxAllowedAppIds)
: undefined;
return {
schemaVersion: PERSISTENT_MIND_CAPABILITIES_SCHEMA_VERSION,
delegateSandbox: source.delegateSandbox === true,
sandboxDelegation: normalizeSandboxDelegationConfig(source.sandboxDelegation),
createTasks: source.createTasks === true,
fileIssues: source.fileIssues === true,
auditReports: source.auditReports === true,
manageMind: source.manageMind === true,
manageToolRecipes: source.manageToolRecipes === true,
promoteEidoverseFoundations: source.promoteEidoverseFoundations === true,
installEidoverseControllers: source.installEidoverseControllers === true,
callUser: source.callUser === true,
chooseThinkingPreset: source.chooseThinkingPreset === true,
adjustLocalContext: source.adjustLocalContext === true,
toolExposureRetentionTurns: Number.isSafeInteger(source.toolExposureRetentionTurns)
&& source.toolExposureRetentionTurns >= TOOL_ACTIVATION_LIMITS.MIN_RETENTION_TURNS
&& source.toolExposureRetentionTurns <= TOOL_ACTIVATION_LIMITS.MAX_RETENTION_TURNS
? source.toolExposureRetentionTurns
: DEFAULT_TOOL_ACTIVATION_RETENTION_TURNS,
toolExposureAllSchemas: source.toolExposureAllSchemas === true,
thinkingPresetAllowlist: z.array(z.string().min(1).max(64)).max(20).safeParse(source.thinkingPresetAllowlist).data || [],
thinkingPresetGrants: z.record(z.string(), z.string().regex(/^[a-f0-9]{64}$/)).safeParse(source.thinkingPresetGrants).data || {},
...semanticGrants,
taskModelAllowlist: taskModelAllowlist.entries,
// A malformed hand-edited persisted policy must not silently become the
// unrestricted empty-list policy. This internal marker is omitted from
// route input schemas and only affects fail-closed admission/catalog code.
...(taskModelAllowlist.invalid ? { taskModelAllowlistInvalid: true } : {}),
...(allowedAppIds !== undefined ? { allowedAppIds } : {}),
};
}
export function mergePersistentMindCapabilities(previous, update) {
const prior = normalizePersistentMindCapabilities(previous);
const patch = update && typeof update === 'object' && !Array.isArray(update) ? update : {};
const merged = { ...prior, ...patch };
// A valid replacement repairs a malformed persisted policy; unrelated grant
// updates must retain the fail-closed marker until that happens.
if (patch.taskModelAllowlist !== undefined) {
delete merged.taskModelAllowlistInvalid;
} else if (prior.taskModelAllowlistInvalid) {
delete merged.taskModelAllowlist;
}
return normalizePersistentMindCapabilities(merged);
}