refactor: zero-footprint architecture — no workspace files#1
Open
refactor: zero-footprint architecture — no workspace files#1
Conversation
- Config now read from VS Code settings (contributes.configuration) instead of .autopilot.json in repo root - Cursor rule moves to ~/.cursor/rules/after_each_chat.mdc (user-level) - New ~/.cursor-autopilot/routing.json maps workspace folder names to adapter credentials for agent-direct Telegram curl - Outbound summaries sent by AI agent via curl (no more tmp/ files) - Watcher and dispatcher deleted (no file-based outbound pipeline) - Adapter interface simplified to inbound-only (onReply + dispose) - Supports multi-root workspaces and per-workspace Telegram bots - Reacts to onDidChangeConfiguration and onDidChangeWorkspaceFolders
- Cursor rule rewritten per /author conventions (XML tags, prescriptive) - Agent now sends full response content, not abbreviated summaries - New telegram-send.sh companion script at ~/.cursor-autopilot/: splits messages at paragraph boundaries respecting 4096-char limit, sends chunks sequentially with rate-limit delays - Extension ensures send script + outbox directory on activation
- Remove all references to .autopilot.json and workspace-level files - Document VS Code settings configuration with per-workspace support - Document companion script, routing.json, and outbox directory - Update directory layout and architecture sections - Remove references to deleted dispatcher and watcher modules
…am credentials Use VS Code's environmentVariableCollection API to inject AUTOPILOT_TG_TOKEN and AUTOPILOT_TG_CHAT_ID into the integrated terminal per-window. The send script falls back to ~/.cursor-autopilot/env for shell sessions that predate extension activation. Eliminates routing.json and folder-name keying entirely. - Rename extension to cursor-autopilot-local (v0.1.0) to avoid marketplace collision - Remove all routing.json types, functions, and file management from store.ts - Add syncEnvVars() that sets env vars + writes fallback env file - Update send script to read from env vars with env file fallback - Update cursor rule to single-argument invocation - Update docs to reflect env var architecture
Remove out/, .vscode/settings.json from git tracking — these are already in .gitignore but were committed previously. Add tmp/ to .gitignore for old summary JSONs.
Switch from write-file-then-invoke to direct stdin piping. The agent now pipes its response to telegram-send.py via heredoc in a single Shell command — no intermediate files, no date call, no outbox dir. - Replace telegram-send.sh (bash+heredoc) with telegram-send.py (pure Python) - Script reads from stdin, resolves credentials from env vars / fallback file - Update cursor rule to single-step heredoc piping with explicit constraints - Update README and setup guide
When the window is unfocused, use AppleScript (macOS) or wmctrl (Linux) to raise the specific Cursor window by workspace name before injecting the message. This fixes the issue where paste succeeded but submit silently failed in background windows.
- ensureCursorRule accepts enabled param to toggle alwaysApply in the managed cursor rule; when disabled the rule persists on disk but Cursor will not apply it - Adapter initialization and inbound polling skipped when disabled - onDidChangeConfiguration re-evaluates enabled and updates the rule - Deactivation sets alwaysApply: false so the rule is inert without the extension running - Remove stale OUTBOX_DIR constant and directory creation - Fix comments and log messages referencing bash/telegram-send.sh - Remove unused sendToChat import from extension.ts
Replace upstream author references with the new fork owner account across package.json, README.md, and SETUP_GUIDE.md. Also fix stale repo name cursor-auto-send → cursor-autopilot in package.json URLs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
routing.jsonwith per-window terminal environment variables (AUTOPILOT_TG_TOKEN,AUTOPILOT_TG_CHAT_ID), enabling per-workspace Telegram bots without file collisionstelegram-send.pyvia stdin instead of writing intermediate files to an outbox directoryautopilot.enablednow properly gates all behavior — rule/script are only deployed when enabledheyzgjtoj0ntzand fixed stalecursor-auto-sendrepo referencesCommits
60c12b8refactor: zero-footprint config — move all artifacts out of workspace878809afeat: companion script for chunked Telegram sends + XML-structured rulec9c32c8docs: update README and setup guide for zero-footprint architectureb8af812refactor: replace routing.json with env vars for per-workspace Telegram credentialse16f9b7chore: untrack build artifacts and workspace settings14d5476perf: stdin piping replaces file-based outbox for outbound messagesf995fe2fix: auto-focus window before injecting inbound Telegram messagesd8c9448fix: enabled flag now gates behavior, clean up stale artifacts7fbca41chore: update GitHub URLs from heyzgj to j0ntzTest plan
~/.cursor/rules/after_each_chat.mdcand~/.cursor-autopilot/telegram-send.pyare created on activationautopilot.enabledand verify rule/script are cleaned up