Commit Graph
93 Commits
Author SHA1 Message Date
HumbleTurtle bf6acaacc8 Merge branch 'search-quality' into agent-coordination-reliability 2026-09-28 22:09:12 -03:00
HumbleTurtleandClaude Opus 5.5 0938b3026e Keep the local index fresh from the change feed and improve ranking
- Track a feed cursor in the local index: reindex takes the head cursor
  before listing and commits it with the snapshot; reads refresh from
  /changes (bounded, throttled) and apply creates, updates, archives,
  restores and hard deletes atomically with the cursor. Existing
  cursorless indexes bootstrap tracking on first read. Failures answer
  locally with explicit freshness warnings; 400 triggers a full
  reindex, 404 falls back to timestamp sync.
- Rank by a weighted score: exact identity (including aliases and
  paths), term coverage including body, intent, bm25, authority, a
  status penalty for superseded/completed records and mild recency.
- Return query-centred FTS5 snippets (never for E2E nodes).
- FTS schema v2: porter stemming, prefix index, title column, rowid
  deletes, two-character terms, domain words no longer stopwords;
  v1 indexes upgrade in place.
- Hyphenated alias/path literals match as adjacent-token phrases and
  rank as exact identity.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 22:09:12 -03:00
HumbleTurtleandClaude Opus 5.5 c6bc28442a Rebind the committed project on login instead of forcing project consent
In a checkout whose private project credential had been revoked, `nap
auth login` refreshed only the account login while the dead project
override kept being selected, and attach fell through to a second,
project-scoped browser consent. Login now proves an OAuth project grant
dead (tombstoned, expired, or refresh rejected; unknown outcomes keep
it), selects the account login for this worktree, and attaches the
project named by .napseer/project.json without another consent. A
still-valid override is kept and reported. Attach takes the same fast
path, and a rejected project grant names the recovery step.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 21:47:36 -03:00
HumbleTurtleandClaude Opus 5.5 7eaaffb63f Make MCP writes retry-safe and coordination state visible to agents
- Send Idempotency-Key on node create/patch/update writes (including bulk,
  link, move, kanban and agent-node tools) and return the key used, so an
  ambiguous failure can be retried without duplicating the write.
- Record a non-secret marker when login renewal is rejected; nap_whoami
  reports auth_required ahead of gateway state, and local-index answers
  carry stale warnings instead of silently serving old memory.
- Add nap_kanban_claim_next: pick and claim in one call, skipping cards
  held by another operation, never replaying an ambiguous claim.
- Add nap_changes_since over /v1/projects/{id}/changes with a
  per-worktree cursor that only advances after a successful read.
- Report real links_count/backlinks_count from indexed edges.
- Accept optional tool_profiles in .napseer/project.json when
  NAPSEER_TOOL_PROFILES is unset.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 21:34:35 -03:00
HumbleTurtle c427e2432a Move private runtime state outside checkouts and isolate worktrees 2026-09-21 13:19:27 -03:00
HumbleTurtle 2a78262754 chore: move CLI source metadata to Gitea 2026-09-17 09:40:02 -03:00
HumbleTurtle 2a4a054549 fix: preserve local memory across failed index rebuilds 2026-09-11 22:07:22 -03:00
HumbleTurtle c179581d58 docs: align agent discovery and project help with configured access 2026-09-10 04:21:04 -03:00
HumbleTurtle cec2f88375 docs: correct the shared user credential storage path 2026-09-10 04:17:19 -03:00
HumbleTurtle 1cedc1b927 fix: make the published stdin bootstrap install the runtime bundle 2026-09-10 04:10:40 -03:00
HumbleTurtle 3dfedd1f35 test: isolate session fixtures from developer project credentials 2026-09-10 03:34:46 -03:00
HumbleTurtle 6c29a318e8 feat: configure agents with durable user sessions and scoped access 2026-09-10 03:29:48 -03:00
HumbleTurtle e8c6a5109e fix: bound MCP request cancellation and recovery 2026-09-05 02:20:58 -03:00
HumbleTurtle f8594bd3d8 feat: add portable project locator 2026-08-27 19:11:33 -03:00
HumbleTurtle 7eace14042 fix: expose local index rebuild command 2026-08-27 00:41:28 -03:00
HumbleTurtle 35acd72e4e feat: add anchor shortcut navigation 2026-08-26 19:20:06 -03:00
HumbleTurtle 6b308d5a49 fix: harden node patch contract diagnostics 2026-08-26 07:59:16 -03:00
HumbleTurtle 66ca3ab9be fix: make memory graph results actionable 2026-08-26 05:09:52 -03:00
HumbleTurtle 4fa36796b4 Optimize concurrent local discovery 2026-08-23 19:48:08 -03:00
HumbleTurtle e283b6b62f feat(mcp): report search projection coverage 2026-08-22 22:45:58 -03:00
HumbleTurtle f47459ba9b perf(mcp): plan and rank memory queries once 2026-08-22 20:15:33 -03:00
HumbleTurtle e410b5d4a5 fix(mcp): align discovery identity guidance 2026-08-22 19:39:39 -03:00
HumbleTurtle 4254cac826 perf(mcp): keep local read flows local 2026-08-22 19:28:41 -03:00
HumbleTurtle 2f61616a6f feat(mcp): add dependency-aware parallel batch 2026-08-22 18:42:31 -03:00
HumbleTurtle cc53da1dc7 fix: align local and server graph depth semantics 2026-08-21 22:42:31 -03:00
HumbleTurtle a9a682dee0 fix: gate hybrid graph reads on complete local indexes 2026-08-21 22:37:05 -03:00
HumbleTurtle 8921b131ef fix: reload MCP launchers when runtime changes 2026-08-21 22:33:56 -03:00
HumbleTurtle 7ca30e690d fix: harden MCP and auth runtime lifecycles 2026-08-19 23:35:13 -03:00
HumbleTurtle 829d54b080 fix: align pruned identity inventory 2026-08-16 04:31:38 -03:00
HumbleTurtle 9429b7039f feat: streamline agent memory surface 2026-08-16 04:29:39 -03:00
HumbleTurtle 5574faace0 Fix account login project creation lifecycle 2026-08-03 01:16:15 -03:00
HumbleTurtle 7ac412a335 Make gateway lifecycle help specific 2026-08-01 04:28:39 -03:00
HumbleTurtle ffbe28798b Serialize gateway log compaction safely 2026-08-01 04:21:56 -03:00
HumbleTurtle 5289965772 Keep CLI log compaction on live inode 2026-08-01 04:20:45 -03:00
HumbleTurtle fccdfd58df Preserve live gateway log during compaction 2026-08-01 04:18:00 -03:00
HumbleTurtle 39adc19510 Allow compatible CLI release upgrades 2026-08-01 04:15:09 -03:00
HumbleTurtle 0e552497b2 Use one relay listener lane by default 2026-08-01 04:03:01 -03:00
HumbleTurtle b555779bef Clear stale worker identity on project attach 2026-08-01 03:59:52 -03:00
HumbleTurtle 463caec13b Remove legacy CLI and MCP aliases 2026-08-01 03:53:02 -03:00
HumbleTurtle bfda22f59b Repair MCP diagnostics and gateway lifecycle 2026-08-01 03:50:28 -03:00
HumbleTurtle ffd31cf568 Fix project attach reload before MCP discovery 2026-07-30 19:57:47 -03:00
HumbleTurtle 5f864eab06 Remove duplicate bootstrap installers 2026-07-30 00:27:22 -03:00
HumbleTurtle a70cb7c46c Release resilient atomic Napseer CLI runtime 2026-07-30 00:21:50 -03:00
HumbleTurtle a88930ce69 fix(auth): reload attached credentials in live MCP 2026-07-21 01:51:38 -03:00
HumbleTurtle 590d10b7da feat(memory): resolve paths in context reads 2026-07-19 15:18:29 -03:00
HumbleTurtle 7e4002579b fix(auth): recover anonymous projects after token expiry 2026-07-19 14:36:27 -03:00
HumbleTurtle a2958b108f fix(auth): preserve OAuth project sessions 2026-07-18 19:32:29 -03:00
HumbleTurtle e1a4cf93f0 fix(cli): consolidate CLI dispatch surface and add nap project init
The dispatcher in `napseer_mcp_server.py::cli_main` had grown a duplicated
fragment of the project-command dispatcher (the attach/create/claim/status/
encryption block) that survived an earlier refactor. Because the fragment
was left at function-body indent after the `return` that closes the
canonical block, every `nap` subcommand that hands off to the MCP server
crashed at import time:

    File "/home/matias/.local/share/napseer/napseer_mcp_server.py",
    line 13561
        "frontend_url": cli_option(argv[3:], "--frontend-url",
                                   default=None),
    IndentationError: unexpected indent

That broke `nap project attach`, `nap project create`, `nap gateway
start`, and every other `nap *` command that dispatches to the MCP
server, surfacing as an "unknown command" / 401-style failure at the
caller. The pinned published revision `cbdc1840` still ships the broken
file; the next backend build needs to bump to this commit.

Rewrite `cli_main` so each `if command == "<cmd>":` block has a
single, complete dispatcher with no leftover fragments. Promote
`init` (first-time directory setup, no browser) to a canonical
`nap project init` subcommand, leave `attach` calling
`operator_loopback_login`, and `create` / `claim` unchanged.

Drop deprecated aliases (`ls`, `new`, `send`, `rm`, `set-status`,
`admin`, `global-list`, positional-state shortcut for
`nap project encryption set`, `process --all` shortcut) with clear
RuntimeError pointers to the canonical verbs.

Tests: `tests/test_cli_dispatch_consolidation.py` asserts canonical
verbs route correctly and dropped aliases raise with a clear pointer;
`tests/test_project_init_wizard.py` exercises the
`nap project init` wizard end-to-end;
`tests/test_nap_install_gateway_routes.py` updated for the
`process --all` removal. 19/19 pytest cases pass.

See /incidents/2026-06-15/napseer-mcp-server-py-13561-indentation-error-upstream
in Napseer memory for the prior incident writeup.
2026-06-15 14:10:39 -03:00
HumbleTurtle 9ea082c919 refactor: Extract modular subpackage from napseer_mcp_server.py
Split 810+ lines into organized modules:
- napseer/constants.py: Discovery, lifecycle, kanban, planning constants
- napseer/crypto.py: ChaCha20-Poly1305, AES-256-GCM, key derivation
- napseer/gateway.py: Gateway management, relay, terminal helpers
- napseer/telemetry.py: Event logging, metrics

Main file imports from modular package when available, with graceful
fallback to inline definitions for backward compatibility.

Tests: 36/36 passing
2026-06-15 14:10:39 -03:00
HumbleTurtle cbdc184055 Add incremental local index sync 2026-05-23 01:54:09 -03:00
HumbleTurtle 031b888fdd Use node identity in local helper UI 2026-05-22 23:39:59 -03:00
HumbleTurtle 1cb8075324 Require identity for context graph tools 2026-05-22 23:34:59 -03:00
HumbleTurtle fa754bb5bd Require identity for agent node tools 2026-05-22 23:32:31 -03:00
HumbleTurtle 5fb0603802 Relax plan lifecycle reason requirements 2026-05-22 23:28:31 -03:00
HumbleTurtle 1813e9f4e3 Require identity for plan lifecycle tools 2026-05-22 23:23:57 -03:00
HumbleTurtle 65448aee0b Require identity for graph node tools 2026-05-22 23:19:39 -03:00
HumbleTurtle 6759ce7055 Require identity for tee bulk updates 2026-05-22 23:09:57 -03:00
HumbleTurtle 411a7b73e1 Require node identity for kanban mutations 2026-05-22 23:05:32 -03:00
HumbleTurtle 58162f3f59 Route object patches by node id 2026-05-22 22:53:51 -03:00
HumbleTurtle ddab2dccc8 Require node identity for mutation tools 2026-05-22 22:47:30 -03:00
HumbleTurtle 8d009ad61f Remove path based full discovery reads 2026-05-22 22:27:32 -03:00
HumbleTurtle 27a37a4938 Enforce ID-based node reads in MCP wrapper 2026-05-22 22:09:11 -03:00
HumbleTurtle 9bce54ac0a Add project-scoped OAuth attach flow 2026-05-20 22:36:33 -03:00
HumbleTurtle 5cdbc8f2be Improve MCP memory discovery tools 2026-05-20 12:29:24 -03:00
HumbleTurtle 18c67ef27d Separate vault and gateway passphrases 2026-05-20 00:27:43 -03:00
HumbleTurtle e24daf54c1 Simplify chat secret CLI flow 2026-05-19 17:42:44 -03:00
HumbleTurtle 4948646b9a Bump CLI distribution contract 2026-05-19 16:56:13 -03:00
HumbleTurtle aa15a677f9 Add plan lineage CLI helpers 2026-05-17 09:00:47 -03:00
HumbleTurtle f320ea655f Compact MCP write command results 2026-05-14 10:37:05 -03:00
HumbleTurtle 181aa8c42f Default MCP discovery to path views 2026-05-14 10:33:58 -03:00
HumbleTurtle b818abc75c Make recent memory title-only by default 2026-05-12 17:36:01 -03:00
HumbleTurtle dd0af0f6a9 Remove local gateway unlock gate 2026-05-10 07:54:34 -03:00
HumbleTurtle e7aed9ddf6 Purge legacy CLI command aliases 2026-05-10 07:38:39 -03:00
HumbleTurtle 08c4096868 Centralize kanban dependency vocabulary 2026-05-10 03:38:18 -03:00
HumbleTurtle ecb549d159 Add kanban dependency view summaries 2026-05-10 03:35:57 -03:00
HumbleTurtle dfead93d15 Deduplicate kanban card slugs 2026-05-10 02:30:38 -03:00
HumbleTurtle 4a332ed413 Fix MCP REST boolean query encoding 2026-05-10 01:22:57 -03:00
HumbleTurtle d88d8da259 Add kanban workflow MCP tools 2026-05-09 06:12:12 -03:00
HumbleTurtle 97071a42aa Refresh gateway listener auth before relay connect 2026-05-07 19:57:26 -03:00
HumbleTurtle c0d3c0c89a Raise memory discovery limits 2026-05-07 07:11:51 -03:00
HumbleTurtle a073f22403 Add memory ergonomics helper tools 2026-05-06 17:19:12 -03:00
HumbleTurtle 0798be486c Remove deprecated MCP and gateway aliases 2026-05-06 14:46:08 -03:00
HumbleTurtle 106a0e131a Remove local gateway cloud control routes 2026-05-06 07:49:09 -03:00
HumbleTurtle eca69ba2cf Implement client-wrapped project key bundles 2026-05-06 07:21:40 -03:00
HumbleTurtle 0f981a4b07 Fix project encryption and gateway vault CLI 2026-05-05 05:49:49 -03:00
HumbleTurtle c7973dac2c Sync lane-bound relay crypto in CLI runtime 2026-05-05 03:55:25 -03:00
HumbleTurtle 4809105b49 Complete guarded node MCP sync 2026-05-05 03:40:31 -03:00
HumbleTurtle d2d624bc6f Sync guarded node MCP tools 2026-05-05 03:40:15 -03:00
HumbleTurtle 82b3e32743 Update gateway vault encryption runtime 2026-05-05 03:39:02 -03:00
HumbleTurtle 6c6f85faf2 Use deployed Napseer scripts for install updates 2026-05-03 21:48:25 -03:00
HumbleTurtle f393a03657 Report installer source metadata from fetched asset 2026-05-03 21:42:11 -03:00
HumbleTurtle 1b9564a6b5 Fetch installer assets from pinned source 2026-05-03 21:40:37 -03:00
HumbleTurtle 078faaf143 Initial CLI source import 2026-05-03 11:27:56 -03:00