Skip to content

feat: add human-like behavior, Spotify tools, task scheduler; remove crypto/TON tools - #33

Open
TenSapphire wants to merge 1 commit into
TONresistor:mainfrom
TenSapphire:feat/humanization-and-tool-cleanup
Open

TenSapphire wants to merge 1 commit into
TONresistor:mainfrom
TenSapphire:feat/humanization-and-tool-cleanup

Conversation

@TenSapphire

Copy link
Copy Markdown

Summary

  • Adds human-like behavior to the Telegram agent: variable typing delays, context-aware reply probability, time-of-day-aware pacing, and natural writing-style imperfections (typos, filler phrases, edit-after-send).
  • Adds a bounded conversational relationship/rapport tracker (never grants permissions) and a lightweight emotional-state tracker that inform the system prompt.
  • Adds Spotify integration tools (track lookup, audio preview analysis) and a telegram_analyze_music tool.
  • Adds a general-purpose TaskScheduler (repeating scheduled tasks) alongside the existing one-shot scheduled task handler, plus telegram_list_scheduled_tasks / telegram_cancel_scheduled_task tools.
  • Adds telegram_update_profile_photo and DM-burst batching (MessageHandler.handleBatch) so rapid follow-up DMs merge into one turn instead of firing off separate replies.
  • Removes the DEX (Ston.fi/DeDust), TON DNS, and TON wallet tool namespaces to shrink the default tool surface and dependency footprint; sdk.ton is now only constructed when ton_features.enabled is set, so these can come back as an opt-in plugin later.

Notes for reviewers

  • This branch predates a large, unrelated upstream refactor of src/agent/runtime.ts and src/index.ts (splitting them into turn-preparation.ts / loop/executor.ts / response-finalizer.ts and app/agent-lifecycle-controller.ts / app/message-pipeline.ts, respectively). The merge/rebase against main re-homed this branch's feature code (emotional/relationship context, media+reaction message framing, DM debounce, reaction-event wiring, task-scheduler lifecycle) into the new module locations rather than reintroducing the old monolithic structure.
  • src/memory/schema.ts: bumped CURRENT_SCHEMA_VERSION to 1.26.0 and added a migration for the new relationship_profiles / relationship_proposals / relationship_overrides tables and the tasks.repeat_every_ms column (both were previously ad-hoc CREATE TABLE IF NOT EXISTS calls inside RelationshipStore's constructor, which broke under lightweight test DB mocks — moved to the central schema like every other feed table).
  • docs-sdk/pages/tools-telegram.html updated with the four new Telegram tools so the product-surfaces doc-coverage test stays accurate.
  • Typecheck, lint, and the full test suite pass. Ten pre-existing test failures remain on this Windows dev box only (file-permission 0o600 checks, symlinkSync EPERM without elevated privileges, and one locale-dependent number-formatting assertion) — none touched by this branch's diff; they're expected to pass in CI on Linux.

Test plan

  • npm run typecheck
  • npm run lint
  • npm test (2020/2030 passing; the 10 failures are pre-existing Windows-only environment issues, see notes above)

🤖 Generated with Claude Code

…crypto/TON tools

Adds humanization features (variable typing delays, reply probability,
time-of-day awareness, writing style adaptation) so the bot behaves less
robotically in chats. Adds Spotify integration tools, a general-purpose
task scheduler, and relationship tracking in memory.

Removes the DEX (Ston.fi/DeDust), DNS, and TON wallet tool namespaces to
reduce default complexity and dependency surface; these crypto features
can be reintroduced as opt-in plugins later.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant