mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 23:01:09 +02:00
Enables the M1 parallel-reads optimisation on the webapp side. Both
consumers of runPlannerLoop pass an isParallelSafe predicate derived
from the tool catalog:
isParallelSafe: (name) =>
AI_TOOL_CATALOG_BY_NAME.get(name)?.defaultPolicy === 'auto'
Auto-policy tools (list_tasks, get_habits, nutrition_summary, …) run
via Promise.all in batches of 10 when the LLM fans them out in one
round. Propose-policy tools — which surface to the user as Proposal
cards — stay sequential so intent ordering in the inbox is preserved
and pre-execute guardrails can reason about prior-step state.
Tests: 31 existing companion + mission tests pass unchanged; the
parallel path is exercised via the new loop.test.ts cases shipped
with the M1 commit.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
20 lines
670 B
TypeScript
20 lines
670 B
TypeScript
import { defineConfig } from 'drizzle-kit';
|
|
|
|
/**
|
|
* Drizzle config for the unified mana-api.
|
|
*
|
|
* Managed schemas accumulate as modules adopt managed migrations. Each
|
|
* schema's generated SQL lives under `drizzle/{schema}/`. Expand the
|
|
* `schema` array and `schemaFilter` when a new module joins.
|
|
*
|
|
* Currently managed: `research`, `website`.
|
|
*/
|
|
export default defineConfig({
|
|
schema: ['./src/modules/research/schema.ts', './src/modules/website/schema.ts'],
|
|
out: './drizzle',
|
|
dialect: 'postgresql',
|
|
dbCredentials: {
|
|
url: process.env.DATABASE_URL || 'postgresql://mana:devpassword@localhost:5432/mana_platform',
|
|
},
|
|
schemaFilter: ['research', 'website'],
|
|
});
|