Skip to content

feat(facts): optional --text on update + facts confirm#11

Merged
etown merged 1 commit into
bee-computer:mainfrom
quinnypig:feat/facts-confirm
Jun 27, 2026
Merged

feat(facts): optional --text on update + facts confirm#11
etown merged 1 commit into
bee-computer:mainfrom
quinnypig:feat/facts-confirm

Conversation

@quinnypig

Copy link
Copy Markdown
Contributor

What

  • facts update no longer requires --text. When omitted, the CLI reuses the existing fetchText path (already used by the MCP surface): it GETs the fact, reuses the stored text, and PUTs only the fields you passed. So bee facts update <id> --confirmed true now works on its own — no get-then-update dance, no risk of overwriting the fact text.
  • New bee facts confirm <id> — sugar that sets confirmed=true while preserving the existing text.

Why

Confirming a fact previously meant fetching it, then re-sending its text alongside --confirmed true, purely to satisfy a --text requirement the underlying API and MCP surface never imposed. That was an extra round-trip and risked silently rewriting the text.

Notes

  • facts confirm is CLI-only by design: bee_update_fact already supports setting confirmed without text, so no new MCP tool (and no tool-snapshot churn) is warranted.
  • Id-validation order and messages are unchanged. --text supplied still takes the no-fetch path.
  • USAGE, the top-of-file rationale comment, and the README facts section are updated to match.

Tests

Added/updated coverage for: update --confirmed with no --text (fetches & preserves text), and the new confirm subcommand including its id-validation errors. bun run typecheck, bun run build, and bun test all pass locally (302 tests, 0 fail).

Heads-up: verifying locally required working around #10 (a fresh bun install 401s because the lockfile resolves to a private registry). No lockfile changes are included in this PR.

CLI `facts update` no longer forces --text. When --text is omitted it reuses
the existing fetchText path (the same one the MCP surface uses): the current
fact text is fetched and echoed back so only the provided fields change. This
lets `bee facts update <id> --confirmed true` flip the confirmed flag without a
manual get-then-update dance and without risking a text rewrite.

Add `bee facts confirm <id>` as sugar for the common confirm-and-preserve-text
case. It is CLI-only: bee_update_fact already lets MCP callers set confirmed
without supplying text, so a separate MCP tool would churn the tool snapshot
for no new capability.

Update USAGE, the top-of-file divergence comment, tests, and the README facts
section to match.
@etown etown merged commit b5e9acf into bee-computer:main Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants