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

Merge pull request #8582 from atomantic/claim/issue-8551

[._.]/b5c9513cb9f7
diff --cc server/lib/socketEventContracts.js
index e2c808a33f,b834e0af9d..bf7a4b54d7
--- a/server/lib/socketEventContracts.js
+++ b/server/lib/socketEventContracts.js
@@@ -25,25 -25,12 +25,30 @@@ const input = (schema, summary) => Obje
payloadSchema: zodToOpenApiSchema(schema),
});
+const loomRunSnapshot = (production) => Object.freeze({
+ direction: 'server-to-client',
+ summary: 'Revisioned public FableLoom run snapshot after an authoritative transition; no runtime handles.',
+ payloadSchema: {
+ type: 'object',
+ required: ['id', 'loomId', 'status', 'revision', 'createdAt', 'updatedAt', ...(production ? ['episodeId', 'attempt', 'assets', 'summary'] : [])],
+ properties: {
+ id: { type: 'string' },
+ loomId: { type: 'string' },
+ ...(production ? { episodeId: { type: 'string' }, attempt: { type: 'integer' }, assets: { type: 'array', items: { type: 'object' } }, summary: { type: 'object' } } : {}),
+ status: { type: 'string', enum: production ? ['in_progress', 'completed', 'failed', 'canceled'] : ['running', 'canceling', 'completed', 'paused', 'failed', 'canceled'] },
+ revision: { type: 'integer' },
+ createdAt: { type: 'string' },
+ updatedAt: { type: 'string' },
+ },
+ },
+});
+
export const SOCKET_EVENT_CONTRACTS = Object.freeze({
+ 'portos:auto-update:changed': {
+ direction: 'server-to-client',
+ summary: 'Invalidate updater status after runtime, configuration or external git ref changes.',
+ payloadSchema: { type: 'object', properties: {}, additionalProperties: false },
+ },
'brain:changed': {
direction: 'server-to-client',
summary: 'Invalidate Brain summary/settings after a persisted change.',