email: one database per account, and the agent only knew about one
`OFFICER_EMAIL_DB` points at a single account's sqlite file, chosen by `findEmailAccountName` as the most recently synced. that is the right guess for "what did X say yesterday" and a silent lie for anything meaning ALL my mail: the agent searches one mailbox and reports as though it searched every one, with nothing available to tell it the others exist. the layout stopped being one file per user when several addresses became possible — DATA_PATH/<owner>/email_accounts/<address>/emails.db — and the reference an agent reads was still describing the old shape. so `OFFICER_EMAIL_ACCOUNTS_DIR` is handed to the mcp tool env alongside it. the directory rather than a list, because listing it is discovery the agent can do itself; deriving the path from a convention would mean documenting the convention anyway, and then having two things to keep in step. the skill now leads with the multi-account layout, names `attachment_cache` as the entry that is not an account, and says to state which accounts were actually covered. checked against the live tree, which has exactly those two entries. the index is unchanged at 608 characters — the whole point of the split is that the body can grow to meet the truth without any conversation paying for it.
This commit is contained in:
@@ -161,6 +161,13 @@ function generateMcpConfig(): string {
|
||||
env: {
|
||||
PI_TOOLS_DIRS: hostToolsDirs,
|
||||
OFFICER_EMAIL_DB: join(userRoot, emailDbRel),
|
||||
// The PARENT, because `OFFICER_EMAIL_DB` is one account and an owner may have several.
|
||||
//
|
||||
// `findEmailAccountName` picks the most recently synced, which is the right guess for a single
|
||||
// question and a silent lie for "search all my email" — the agent gets one mailbox and no way to
|
||||
// learn the others exist. Handing it the directory makes the rest discoverable by listing it,
|
||||
// rather than by deriving a path from a convention it would have to be told anyway.
|
||||
OFFICER_EMAIL_ACCOUNTS_DIR: join(userRoot, 'email_accounts'),
|
||||
MCP_TOOLS_LOG: join(userRoot, 'logs', 'mcp-tools.log'),
|
||||
OFFICER_API_URL,
|
||||
OFFICER_AUTH_TOKEN,
|
||||
|
||||
Reference in New Issue
Block a user