Commit 0126e3a
Neo
Production hardening: SIWE auth, streaming, persistence, .env, and bridge fixes
Gateway:
- /auth/nonce + /auth/verify SIWE endpoints with single-use nonces and
TTL-bounded session tokens (X-Wallet-Session)
- /chat/stream Server-Sent Events endpoint and /ws WebSocket endpoint,
both persisting conversations through MemoryManager
- handle_chat now hydrates from disk on first access and writes back via
save_conversation after every turn
- /status now reports subsystems (models, memory, blockchain, protocols)
- .env support via python-dotenv with env-var overrides for keys, ports,
RPC URL, and notification tokens
Memory:
- Per-agent asyncio.Lock for read-modify-write safety
- Atomic file writes via tmp + os.replace
- Async write/save_turn/save_conversation/mark_first_boot_sent
- Dedicated conversations/ subdir and first_boot.json tracker
Bridge (gateway/bridge.py):
- Removed dead test imports (make_mocked_request, AsyncMock)
- Stripped uninstantiable BlockchainInterface() calls in wallet_status
and get_dashboard; balance lookups now return None pending a real
provider client
- link_wallet now requires X-Wallet-Session and takes the verified
address from the server-side SIWE session — body addresses are ignored
Models:
- Restored Mythos provider; model string updated to claude-opus-4-6
SDK:
- astream_chat is now a real SSE client against /chat/stream, falling
back to /chat on non-200
Docs/config:
- contracts/DEPLOYMENT_GUIDE.md and .env.example
- openmatrix.config.json.example: mythos block + auth/anon rate limits
Tests:
- Updated MemoryManager tests for async write
- Updated gateway test fixture for new rate limiter, wallet sessions,
and async memory mocks
- Full suite: 149 passing1 parent 0ea74f9 commit 0126e3a
14 files changed
Lines changed: 951 additions & 132 deletions
File tree
- contracts
- gateway
- runtime
- auth
- memory
- models
- sdk
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
602 | 602 | | |
603 | 603 | | |
604 | 604 | | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | 605 | | |
612 | 606 | | |
613 | 607 | | |
| |||
709 | 703 | | |
710 | 704 | | |
711 | 705 | | |
712 | | - | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
713 | 725 | | |
714 | 726 | | |
715 | 727 | | |
716 | | - | |
| 728 | + | |
717 | 729 | | |
718 | 730 | | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
| 731 | + | |
| 732 | + | |
723 | 733 | | |
| 734 | + | |
724 | 735 | | |
725 | 736 | | |
726 | 737 | | |
727 | 738 | | |
| 739 | + | |
728 | 740 | | |
729 | 741 | | |
730 | 742 | | |
731 | 743 | | |
732 | 744 | | |
| 745 | + | |
733 | 746 | | |
734 | 747 | | |
735 | 748 | | |
| |||
740 | 753 | | |
741 | 754 | | |
742 | 755 | | |
743 | | - | |
744 | | - | |
745 | | - | |
746 | | - | |
747 | | - | |
748 | | - | |
749 | | - | |
750 | | - | |
751 | | - | |
752 | | - | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
753 | 759 | | |
754 | 760 | | |
755 | 761 | | |
756 | 762 | | |
757 | | - | |
| 763 | + | |
| 764 | + | |
758 | 765 | | |
759 | 766 | | |
760 | 767 | | |
| |||
886 | 893 | | |
887 | 894 | | |
888 | 895 | | |
889 | | - | |
890 | | - | |
891 | | - | |
892 | | - | |
893 | | - | |
894 | | - | |
895 | | - | |
896 | | - | |
897 | | - | |
898 | | - | |
899 | | - | |
900 | | - | |
901 | | - | |
902 | | - | |
903 | | - | |
904 | | - | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
905 | 904 | | |
906 | 905 | | |
0 commit comments