{"version":3,"file":"task-board.server.cjs","names":["formatTaskSnapshots","activeTaskSnapshots"],"sources":["../../../../../../../../src/extensions/workspaces/sessions/(backend)/resource/_lib/task-board.server.ts"],"sourcesContent":["import type { WithRoot } from '@agimon-ai/doompi-core/extension-file';\nimport type { DoomServerPluginContext } from '@agimon-ai/doompi-core/server-facet';\n\nimport { activeTaskSnapshots, formatTaskSnapshots } from '../../../../../../services/contextContribution';\nimport type { TaskServerScope } from '../../_lib/root.server';\n\nexport default (context: WithRoot<DoomServerPluginContext, TaskServerScope>) => ({\n  name: 'doompi/task-board',\n  kind: 'context' as const,\n  /**\n   * The same bounded projection the Pi facet renders: open work only, one line each.\n   * Dumping the whole TaskDocument put every completed task plus the store's own\n   * version/rev/nextId bookkeeping in the prompt, and an idle board still cost a\n   * paragraph. '' is dropped by the prompt composer.\n   */\n  read: () => {\n    const rendered = formatTaskSnapshots(activeTaskSnapshots(context.root.store.snapshot.tasks));\n    return rendered === '(no active tasks)' ? '' : rendered;\n  },\n});\n"],"mappings":";;AAMA,IAAA,6BAAgB,aAAiE;CAC/E,MAAM;CACN,MAAM;;;;;;;CAON,YAAY;EACV,MAAM,WAAWA,cAAAA,oBAAoBC,cAAAA,oBAAoB,QAAQ,KAAK,MAAM,SAAS,KAAK,CAAC;EAC3F,OAAO,aAAa,sBAAsB,KAAK;CACjD;AACF"}