Skip to content

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

fix: compact scheduled projections and preserve alias editing (#6275)

[._.]/ Adam Eivy54ad80491750
diff --git a/client/src/components/eidoverse/EidoverseObjectLegend.jsx b/client/src/components/eidoverse/EidoverseObjectLegend.jsx
index 76213f076f..443e512596 100644
--- a/client/src/components/eidoverse/EidoverseObjectLegend.jsx
+++ b/client/src/components/eidoverse/EidoverseObjectLegend.jsx
@@ -20,10 +20,13 @@ function AliasField({ resourceKey, value, onChange, busy }) {
);
}
-export default function EidoverseObjectLegend({ objects, districts = [], aliases = {}, onAliasChange, busy, onAssets }) {
+export default function EidoverseObjectLegend({ objects, districts = [], aliases = {}, savedAliases = {}, onAliasChange, busy, onAssets }) {
const groups = new Map();
const currentKeys = new Set((objects || []).map(({ resourceKey }) => resourceKey));
- const unmatchedAliases = Object.entries(aliases).filter(([key]) => !currentKeys.has(key));
+ // Keep a saved field mounted through an empty draft while the user renames
+ // it. A successful save/reset updates savedAliases and releases removed rows.
+ const aliasKeys = new Set([...Object.keys(savedAliases), ...Object.keys(aliases)]);
+ const unmatchedAliases = [...aliasKeys].filter((key) => !currentKeys.has(key));
for (const object of objects || []) {
if (!groups.has(object.districtId)) groups.set(object.districtId, []);
groups.get(object.districtId).push(object);
@@ -64,8 +67,8 @@ export default function EidoverseObjectLegend({ objects, districts = [], aliases
<h4 className="text-sm font-medium text-white">Saved aliases without a current object</h4>
<p className="mt-1 text-xs leading-5 text-gray-400">Kept for objects that may return. Clear an alias to remove it without resetting the world.</p>
<div className="grid gap-3 sm:grid-cols-2">
- {unmatchedAliases.map(([key, value]) => (
- <AliasField key={key} resourceKey={key} value={value} onChange={onAliasChange} busy={busy} />
+ {unmatchedAliases.map((key) => (
+ <AliasField key={key} resourceKey={key} value={aliases[key]} onChange={onAliasChange} busy={busy} />
))}
</div>
</section>
diff --git a/client/src/components/eidoverse/EidoverseWorldDrawer.jsx b/client/src/components/eidoverse/EidoverseWorldDrawer.jsx
index d3473c7e15..884597171a 100644
--- a/client/src/components/eidoverse/EidoverseWorldDrawer.jsx
+++ b/client/src/components/eidoverse/EidoverseWorldDrawer.jsx
@@ -277,6 +277,7 @@ export default function EidoverseWorldDrawer({
objects={projectionSummary.objects}
districts={worldState?.recipe?.districts}
aliases={labelAliasesDraft}
+ savedAliases={design.labelAliases}
onAliasChange={mutateLabelAlias}
busy={busy}
onAssets={() => setActiveTab('appearance')}
diff --git a/client/src/pages/Eidoverse.test.jsx b/client/src/pages/Eidoverse.test.jsx
index 2856d59905..35ccee0648 100644
--- a/client/src/pages/Eidoverse.test.jsx
+++ b/client/src/pages/Eidoverse.test.jsx
@@ -227,7 +227,13 @@ describe('Eidoverse hosted page', () => {
expect(screen.getByLabelText('Display alias for app 0123456789ab')).toHaveValue('Example tower');
expect(screen.getByLabelText('Display alias for app abcdef012345')).toHaveValue('Example tower');
const savedAliases = screen.getByRole('region', { name: 'Saved aliases without a current object' });
- await user.clear(within(savedAliases).getByLabelText('Display alias for agent 0123456789ab'));
+ const absentAlias = within(savedAliases).getByLabelText('Display alias for agent 0123456789ab');
+ await user.clear(absentAlias);
+ expect(absentAlias).toHaveFocus();
+ expect(absentAlias).toBeInTheDocument();
+ await user.type(absentAlias, 'Example renamed beacon');
+ expect(absentAlias).toHaveValue('Example renamed beacon');
+ await user.clear(absentAlias);
await user.click(screen.getByRole('button', { name: 'Save and project' }));
await waitFor(() => expect(api.updateEidoverseWorldConfig).toHaveBeenCalled());
const patch = api.updateEidoverseWorldConfig.mock.calls.at(-1)[0];
diff --git a/docs/features/eidoverse.md b/docs/features/eidoverse.md
index 16d4bb97a3..573847b28e 100644
--- a/docs/features/eidoverse.md
+++ b/docs/features/eidoverse.md
@@ -335,8 +335,8 @@ Search matches and catalog/recipe fallbacks are explicitly called fallbacks.
A retained model whose path differs from the current resolution lock reports
unverified provenance. The link to **Appearance & Assets** uses the existing
asset override, refresh, and reset controls. The legend remains readable with
-floating labels off and on older renderers. Agent projection-tool results keep
-only the operation summary, object count, and presence; the full legend remains
+floating labels off and on older renderers. Agent-tool, scheduled-job, and boot projection results use the service's compact
+response: operation summary, object count, and presence. The full legend remains
in saved projection state for the drawer.
Optional aliases name individual live indicators using stable opaque resource
diff --git a/server/services/autonomousJobs/scriptHandlers.js b/server/services/autonomousJobs/scriptHandlers.js
index cf07c75686..4cc91a4b86 100644
--- a/server/services/autonomousJobs/scriptHandlers.js
+++ b/server/services/autonomousJobs/scriptHandlers.js
@@ -23,7 +23,7 @@ import { runBrainParitySweep } from './brainParitySweep.js'
// store itself. The job remains deterministic and makes no provider call.
async function eidoverseProjection() {
const { projectEidoverseWorld } = await import('../eidoverseWorld.js')
- return projectEidoverseWorld()
+ return projectEidoverseWorld({ compact: true })
}
/**
diff --git a/server/services/cosToolRegistry.js b/server/services/cosToolRegistry.js
index 2c1202f1e4..86c0628a34 100644
--- a/server/services/cosToolRegistry.js
+++ b/server/services/cosToolRegistry.js
@@ -431,13 +431,7 @@ const executeAdapter = async (tool, args, context) => {
if (tool.adapter.kind === 'eidoverse-world') {
const world = await import('./eidoverseWorld.js');
if (tool.adapter.operation === 'status') return world.getEidoverseWorldStatus({ compact: true });
- if (tool.adapter.operation === 'project') {
- const result = await world.projectEidoverseWorld({ signal: context.signal });
- const { objects = [], ...summary } = result.summary || {};
- // The full recipe, aliases, and duplicate saved legend are for the
- // drawer; semantic callers need a bounded operation result.
- return { success: result.success, summary: { ...summary, objectCount: objects.length }, presence: result.presence };
- }
+ if (tool.adapter.operation === 'project') return world.projectEidoverseWorld({ signal: context.signal, compact: true });
if (tool.adapter.operation === 'augment') return world.augmentEidoverseWorld(args.operations, { signal: context.signal });
return world.sayInEidoverseWorld(args.text, { signal: context.signal });
}
diff --git a/server/services/cosToolRegistry.test.js b/server/services/cosToolRegistry.test.js
index 1c1a18626d..8fe1ec3d19 100644
--- a/server/services/cosToolRegistry.test.js
+++ b/server/services/cosToolRegistry.test.js
@@ -238,16 +238,6 @@ describe('cosToolRegistry', () => {
authority: { scope: 'mind', capabilities: { readPortos: true } },
context: { signal },
});
- const objects = Array.from({ length: 78 }, (_, index) => ({
- id: `example-object-${index}`, description: 'Example semantic description. '.repeat(6),
- }));
- mocks.worldProject.mockResolvedValueOnce({
- success: true,
- summary: { operationCount: 2, objects },
- projection: { lastSummary: { objects } },
- design: { labelAliases: { 'app-0123456789ab': 'Example alias' } },
- recipe: { assets: { app: 'store/example-asset' } },
- });
const project = await executeCosToolCall({
call: { requestId: 'world-project', name: 'eidoverse.project', arguments: {} },
authority: { scope: 'mind', capabilities: { readPortos: true, manageEidoverse: true } },
@@ -280,9 +270,7 @@ describe('cosToolRegistry', () => {
expect([status.state, project.state, augment.state, say.state, agentAugment.state])
.toEqual(['completed', 'completed', 'completed', 'completed', 'completed']);
expect(mocks.worldStatus).toHaveBeenCalledWith({ compact: true });
- expect(mocks.worldProject).toHaveBeenCalledWith({ signal });
- expect(project.result).toEqual({ success: true, summary: { operationCount: 2, objectCount: 78 } });
- expect(JSON.stringify(project.result).length).toBeLessThan(4096);
+ expect(mocks.worldProject).toHaveBeenCalledWith({ signal, compact: true });
expect(mocks.worldAugment).toHaveBeenCalledWith(
[{ verb: 'spawn', args: { id: 'example', lib: 'eidoverse/assets/example.glb' } }],
{ signal },
diff --git a/server/services/eidoverseWorld.js b/server/services/eidoverseWorld.js
index 7e98aa5fde..0c90cfc9db 100644
--- a/server/services/eidoverseWorld.js
+++ b/server/services/eidoverseWorld.js
@@ -1636,7 +1636,7 @@ async function recordProjection({ success, summary = null, error = null }) {
});
}
-export async function projectEidoverseWorld({ signal } = {}) {
+export async function projectEidoverseWorld({ signal, compact = false } = {}) {
const run = async () => {
throwIfAborted(signal);
await assertInstalled();
@@ -1672,6 +1672,12 @@ export async function projectEidoverseWorld({ signal } = {}) {
...plan.summary,
};
const projection = await recordProjection({ success: true, summary });
+ // Persist the complete legend for the drawer before selecting the compact
+ // result used by tools, scheduled jobs, and boot reconciliation.
+ if (compact) {
+ const { objects, ...counts } = summary;
+ return { success: true, summary: { ...counts, objectCount: objects.length }, presence: presenceSummary(presence) };
+ }
const appliedConfig = configFromState(await loadState());
return {
success: true,
@@ -1732,7 +1738,7 @@ export async function reconcilePendingEidoverseWorld() {
}
if (!setup.installed) return { reconciled: false, reason: 'not-installed' };
if (setup.runtimeStatus !== 'online') return { reconciled: false, reason: 'runtime-offline' };
- const result = await projectEidoverseWorld();
+ const result = await projectEidoverseWorld({ compact: true });
return { reconciled: true, result };
}
diff --git a/server/services/eidoverseWorld.runtime.test.js b/server/services/eidoverseWorld.runtime.test.js
index 3bb7585efd..76db3c0b23 100644
--- a/server/services/eidoverseWorld.runtime.test.js
+++ b/server/services/eidoverseWorld.runtime.test.js
@@ -701,7 +701,7 @@ describe('Eidoverse private-world lifecycle', () => {
expect(JSON.stringify(metaComp.args.data)).not.toContain(mocks.self.name);
});
- it('round-trips explicit aliases and the object legend across projection and reconnect', async () => {
+ it('keeps scheduled results compact while persisting aliases and the full legend across reconnect', async () => {
mocks.appStatuses = [{ id: 'app-example', name: 'Example private title', overallStatus: 'online' }];
fetch.mockImplementationOnce(async () => Response.json({
sha: 'example-label-build', commitTime: '2026-01-01T00:00:00.000Z',
@@ -712,15 +712,22 @@ describe('Eidoverse private-world lifecycle', () => {
const object = first.summary.objects.find(({ kind }) => kind === 'app');
expect(object).toBeDefined();
await world.updateEidoverseWorldConfig({ labelAliases: { [object.resourceKey]: 'Example tower' } });
- const next = await world.projectEidoverseWorld();
- expect(next.summary.objects.find(({ id }) => id === object.id).name).toBe('Example tower');
- // A legacy renderer remains usable even though it advertises no label capabilities.
- expect(next.design.reconciliation.runtimeVersion.capabilities.objectLabels).toBeNull();
+ const { SCRIPT_HANDLERS } = await import('./autonomousJobs/scriptHandlers.js');
+ const next = await SCRIPT_HANDLERS['eidoverse-projection']();
+ expect(next.summary.objectCount).toBeGreaterThan(0);
+ expect(JSON.stringify(next).length).toBeLessThan(4096);
+ expect(JSON.stringify(next)).not.toContain('Example tower');
+ expect(next).not.toHaveProperty('projection');
+ expect(next).not.toHaveProperty('summary.objects');
await world.closeEidoverseWorldConnections();
const reloaded = await world.getEidoverseWorldStatus();
+ // A legacy renderer remains usable even though it advertises no label capabilities.
+ expect(reloaded.design.reconciliation.runtimeVersion.capabilities.objectLabels).toBeNull();
expect(reloaded.design.labelAliases).toEqual({ [object.resourceKey]: 'Example tower' });
- expect(reloaded.projection.lastSummary.objects).toEqual(next.summary.objects);
- expect(JSON.stringify(next.summary.objects)).not.toContain('Example private title');
+ const savedObjects = reloaded.projection.lastSummary.objects;
+ expect(savedObjects).toHaveLength(next.summary.objectCount);
+ expect(savedObjects.find(({ id }) => id === object.id).name).toBe('Example tower');
+ expect(JSON.stringify(savedObjects)).not.toContain('Example private title');
await world.updateEidoverseWorldConfig({ reset: { scope: 'assets' } });
expect((await world.getEidoverseWorldStatus()).design.labelAliases).toEqual({ [object.resourceKey]: 'Example tower' });
await world.updateEidoverseWorldConfig({ reset: { scope: 'district', districtId: 'apps' } });