[{"data":1,"prerenderedAt":2237},["ShallowReactive",2],{"docs.index":3,"docs.page.\u002Fdocs\u002Fagents\u002Freference\u002Fchange-feed":358},[4,20,26,33,43,52,59,65,71,76,82,89,95,100,104,111,115,119,123,132,137,141,147,152,157,163,170,177,183,189,193,199,205,211,217,222,226,230,236,242,247,252,256,260,265,271,277,283,287,294,299,305,310,314,318,322,328,333,338,343,347,353],{"path":5,"title":6,"navTitle":7,"seoTitle":8,"description":9,"type":10,"position":11,"updated":12,"release":13,"related":14,"plans":17},"\u002Fdocs\u002Faccount\u002Fbilling","Upgrade and manage billing","Billing",null,"Move a workspace onto Grove or Forest, understand how seats are charged, and what happens if a payment fails or you cancel.","how-to",2,"2026-09-29","public",[15,16],"\u002Fdocs\u002Faccount\u002Fplans-and-limits","\u002Fdocs\u002Fsharing\u002Finvite-people",[18,19],"grove","forest",{"path":21,"title":22,"navTitle":8,"seoTitle":8,"description":23,"type":24,"position":25,"updated":12,"release":13,"related":8,"plans":8},"\u002Fdocs\u002Faccount","Account and billing","What each plan includes, how billing and seats work, managing your account, and how Treehouse keeps your files safe.","hub",7,{"path":15,"title":27,"navTitle":8,"seoTitle":8,"description":28,"type":29,"position":30,"updated":12,"release":13,"related":31,"plans":8},"Plans and limits","What Seedling, Grove and Forest include, how usage is counted, and what happens when a workspace reaches a limit.","reference",1,[5,16,32],"\u002Fdocs\u002Fsharing\u002Fshare-links",{"path":34,"title":35,"navTitle":8,"seoTitle":8,"description":36,"type":37,"position":38,"updated":12,"release":13,"related":39,"plans":8},"\u002Fdocs\u002Faccount\u002Fsecurity-and-privacy","Security and privacy","How Treehouse encrypts your files, who can see what in a workspace, and how keys, share links and HTML pages are kept in check.","concept",4,[40,32,41,42],"\u002Fdocs\u002Fagents\u002Fconnect\u002Fapi-keys","\u002Fdocs\u002Ffiles\u002Fprivate-files","\u002Fdocs\u002Ffiles\u002Fhtml-pages",{"path":44,"title":45,"navTitle":46,"seoTitle":8,"description":47,"type":10,"position":48,"updated":12,"release":13,"related":49,"plans":8},"\u002Fdocs\u002Faccount\u002Fyour-account","Manage your account","Your account","Create an account, sign in and out, reset a forgotten password, and move between the workspaces you belong to.",3,[50,51,34],"\u002Fdocs\u002Fget-started\u002Fquickstart","\u002Fdocs\u002Fsharing\u002Fcustomise-your-workspace",{"path":40,"title":53,"navTitle":54,"seoTitle":8,"description":55,"type":10,"position":38,"updated":12,"release":13,"related":56,"plans":8},"Manage API keys","API keys","Create a key for each agent, see which keys can reach your workspaces, and revoke the ones you no longer need.",[57,58,34],"\u002Fdocs\u002Fagents\u002Fconnect\u002Fclaude-code","\u002Fdocs\u002Fagents\u002Freference\u002Fauthentication",{"path":57,"title":60,"navTitle":8,"seoTitle":8,"description":61,"type":10,"position":11,"updated":12,"release":13,"related":62,"plans":8},"Connect Claude Code","Give Claude Code access to a workspace through your synced folder, the Treehouse MCP server, or both.",[63,40,64],"\u002Fdocs\u002Fagents\u002Fconnect\u002Fhow-agents-work","\u002Fdocs\u002Fplaybooks\u002Fwrite-your-agents-md",{"path":63,"title":66,"navTitle":67,"seoTitle":8,"description":68,"type":37,"position":30,"updated":12,"release":13,"related":69,"plans":8},"How agents work with Treehouse","How agents work","The two ways an agent can reach a workspace, what it can do there, and how its work shows up for everyone else.",[57,40,70],"\u002Fdocs\u002Fagents\u002Fhandbook",{"path":72,"title":73,"navTitle":74,"seoTitle":8,"description":75,"type":24,"position":30,"updated":12,"release":13,"related":8,"plans":8},"\u002Fdocs\u002Fagents\u002Fconnect","Connect an agent","Connect","Give Claude Code, Codex, Cursor or any other agent access to a workspace, with its own key when you want its work labelled.",{"path":77,"title":78,"navTitle":8,"seoTitle":8,"description":79,"type":10,"position":48,"updated":12,"release":13,"related":80,"plans":8},"\u002Fdocs\u002Fagents\u002Fconnect\u002Fother-agents","Connect other agents","Connection settings for Cursor, VS Code, Codex, Gemini CLI, Claude Desktop and any other MCP client.",[57,40,81],"\u002Fdocs\u002Fagents\u002Freference\u002Fmcp-server",{"path":70,"title":83,"navTitle":83,"seoTitle":84,"description":85,"type":24,"position":11,"updated":12,"release":13,"related":86,"plans":8},"Agent handbook","Agent handbook: how agents work in Treehouse","Written for agents. How to reach a Treehouse workspace, the rules that keep everyone's work safe, and the conventions the web app understands.",[81,87,88],"\u002Fdocs\u002Fagents\u002Fhandbook\u002Fversions-and-conflicts","\u002Fdocs\u002Fplaybooks\u002Freview-loop",{"path":87,"title":90,"navTitle":8,"seoTitle":8,"description":91,"type":37,"position":30,"updated":12,"release":13,"related":92,"plans":8},"Versions and conflicts","The concurrency contract every Treehouse client shares - version numbers, compare-and-swap writes, conflicted copies, deletes, moves and restores.",[93,94,81],"\u002Fdocs\u002Ffiles\u002Fconflicted-copies","\u002Fdocs\u002Fagents\u002Freference\u002Frest-api",{"path":96,"title":97,"navTitle":8,"seoTitle":98,"description":99,"type":24,"position":30,"updated":12,"release":13,"related":8,"plans":8},"\u002Fdocs\u002Fagents","Agents","Treehouse for agents","Everything an agent needs to work in a Treehouse workspace, and everything you need to connect one.",{"path":58,"title":101,"navTitle":8,"seoTitle":8,"description":102,"type":29,"position":30,"updated":12,"release":13,"related":103,"plans":8},"Authentication","How API keys work, what each kind of key can reach, the device authorisation flow the CLI and desktop app use, and how keys are revoked.",[40,81,94],{"path":105,"title":106,"navTitle":8,"seoTitle":8,"description":107,"type":29,"position":38,"updated":12,"release":13,"related":108,"plans":8},"\u002Fdocs\u002Fagents\u002Freference\u002Fchange-feed","Change feed","Read every change to a workspace in order with a cursor, so a script or agent can react to new and edited files.",[109,110,87],"\u002Fdocs\u002Fsharing\u002Factivity","\u002Fdocs\u002Fplaybooks\u002Froutines",{"path":112,"title":113,"navTitle":8,"seoTitle":8,"description":114,"type":24,"position":48,"updated":12,"release":13,"related":8,"plans":8},"\u002Fdocs\u002Fagents\u002Freference","API reference","The protocol reference - authentication, every MCP tool, the REST API and the change feed.",{"path":81,"title":116,"navTitle":8,"seoTitle":8,"description":117,"type":29,"position":11,"updated":12,"release":13,"related":118,"plans":8},"MCP server","Every tool the Treehouse MCP server exposes, with parameters, outputs, limits and the instructions it gives connected agents.",[57,77,87],{"path":94,"title":120,"navTitle":8,"seoTitle":8,"description":121,"type":29,"position":48,"updated":12,"release":13,"related":122,"plans":8},"REST API","Endpoints for reading, writing, moving, searching, sharing and commenting on workspace files over HTTP, with headers, status codes and examples.",[58,87,105],{"path":124,"title":125,"navTitle":126,"seoTitle":8,"description":127,"type":29,"position":128,"updated":12,"release":13,"related":129,"plans":8},"\u002Fdocs\u002Fdesktop\u002Fcli-reference","Sync CLI reference","Sync CLI","Every treehouse command and flag, the files and environment variables the CLI reads, and the safety rules it follows while syncing.",5,[130,131,105],"\u002Fdocs\u002Fdesktop\u002Fsync-with-the-cli","\u002Fdocs\u002Fdesktop\u002Fhow-sync-works",{"path":131,"title":133,"navTitle":8,"seoTitle":8,"description":134,"type":37,"position":11,"updated":12,"release":13,"related":135,"plans":8},"How sync works","What the sync engine does in the background, which files it skips, and how it protects your work when things go wrong.",[93,41,109,136],"\u002Fdocs\u002Fget-started\u002Fhow-treehouse-works",{"path":138,"title":139,"navTitle":8,"seoTitle":8,"description":140,"type":24,"position":128,"updated":12,"release":13,"related":8,"plans":8},"\u002Fdocs\u002Fdesktop","Desktop app and sync","Keep a folder on your computer in step with a workspace, using the Mac app or the sync CLI.",{"path":142,"title":143,"navTitle":8,"seoTitle":8,"description":144,"type":10,"position":30,"updated":12,"release":13,"related":145,"plans":8},"\u002Fdocs\u002Fdesktop\u002Finstall-the-desktop-app","Install the desktop app","Download Treehouse for Mac, sign in and pick a folder, and your workspace's files appear on your computer and stay in sync.",[131,146,130],"\u002Fdocs\u002Fdesktop\u002Fmanage-synced-folders",{"path":146,"title":148,"navTitle":8,"seoTitle":8,"description":149,"type":10,"position":48,"updated":12,"release":13,"related":150,"plans":8},"Manage synced folders","Check sync status, pause, move or stop syncing a folder, add another workspace, and sign out, all from the Treehouse icon in your menu bar.",[131,130,151],"\u002Fdocs\u002Fhelp\u002Ftroubleshooting",{"path":130,"title":153,"navTitle":154,"seoTitle":8,"description":155,"type":10,"position":38,"updated":12,"release":13,"related":156,"plans":8},"Sync a folder with the CLI","Sync with the CLI","Install the treehouse command-line tool to sync a folder on Windows, Linux, a server or any machine where the desktop app doesn't run.",[124,131,146],{"path":93,"title":158,"navTitle":8,"seoTitle":8,"description":159,"type":37,"position":160,"updated":12,"release":13,"related":161,"plans":8},"Conflicted copies","When two edits to the same file collide, Treehouse keeps both. Here's what a conflicted copy is, how to spot one and how to resolve it.",9,[162,131,87],"\u002Fdocs\u002Ffiles\u002Fversion-history",{"path":164,"title":165,"navTitle":166,"seoTitle":8,"description":167,"type":10,"position":11,"updated":12,"release":13,"related":168,"plans":8},"\u002Fdocs\u002Ffiles\u002Fcreate-and-edit","Create and edit files","Create and edit","Make new files and folders in the web app, edit markdown, code and HTML, and save your changes.",[169,93,162],"\u002Fdocs\u002Ffiles\u002Ffront-matter",{"path":171,"title":172,"navTitle":173,"seoTitle":8,"description":174,"type":10,"position":128,"updated":12,"release":13,"related":175,"plans":8},"\u002Fdocs\u002Ffiles\u002Ffolder-pages","Turn a folder into a page or calendar","Folder pages and calendars","Give a folder a front page with a README, or show a folder of dated notes as a calendar you can reschedule by dragging.",[169,42,176],"\u002Fdocs\u002Fplaybooks\u002Fshape-your-workspace",{"path":169,"title":178,"navTitle":179,"seoTitle":8,"description":180,"type":29,"position":181,"updated":12,"release":13,"related":182,"plans":8},"Front matter reference","Front matter","The YAML block at the top of a markdown file, and the keys Treehouse reads from it to label, title and schedule your files.",6,[171,164,110],{"path":42,"title":184,"navTitle":185,"seoTitle":8,"description":186,"type":10,"position":25,"updated":12,"release":13,"related":187,"plans":8},"Publish an HTML page","HTML pages","Show HTML files as full pages, decide when their scripts may run, and share them publicly as reports, dashboards or decks.",[32,171,188],"\u002Fdocs\u002Ffiles\u002Fview-files",{"path":190,"title":191,"navTitle":8,"seoTitle":8,"description":192,"type":24,"position":48,"updated":12,"release":13,"related":8,"plans":8},"\u002Fdocs\u002Ffiles","Files and folders","Find, read, write, upload and organise the files in a workspace, and get back anything that changed.",{"path":194,"title":195,"navTitle":196,"seoTitle":8,"description":197,"type":10,"position":38,"updated":12,"release":13,"related":198,"plans":8},"\u002Fdocs\u002Ffiles\u002Forganise-files","Rename, move and organise files","Organise files","Rename, move, reorder and delete files and folders, and give them icons, from the sidebar tree.",[162,41,176],{"path":41,"title":200,"navTitle":201,"seoTitle":8,"description":202,"type":10,"position":203,"updated":12,"release":13,"related":204,"plans":8},"Keep files private","Private files","Make a file or folder visible only to you and your own agents, even in a workspace you share with others.",10,[194,32,63],{"path":206,"title":207,"navTitle":208,"seoTitle":8,"description":209,"type":10,"position":48,"updated":12,"release":13,"related":210,"plans":8},"\u002Fdocs\u002Ffiles\u002Fupload-and-download","Upload and download files","Upload and download","Add files from your computer to a workspace, decide what happens when names clash, and download a copy of any file.",[164,131,15],{"path":162,"title":212,"navTitle":213,"seoTitle":8,"description":214,"type":10,"position":215,"updated":12,"release":13,"related":216,"plans":8},"See and restore earlier versions","Version history","Look through every change to a file, see who made it, view or restore an older version, and catch up on what changed while you were away.",8,[93,109,87],{"path":188,"title":218,"navTitle":219,"seoTitle":8,"description":220,"type":10,"position":30,"updated":12,"release":13,"related":221,"plans":8},"Find and view files","Find and view","Browse the file tree, search by name, and see how Treehouse shows markdown, HTML, code, images and everything else.",[164,171,162],{"path":136,"title":223,"navTitle":8,"seoTitle":8,"description":224,"type":37,"position":48,"updated":12,"release":13,"related":225,"plans":8},"How Treehouse works","Workspaces, versions, conflicted copies and attribution - the handful of ideas the rest of Treehouse is built on.",[162,93,63,87],{"path":227,"title":228,"navTitle":8,"seoTitle":8,"description":229,"type":24,"position":11,"updated":12,"release":13,"related":8,"plans":8},"\u002Fdocs\u002Fget-started","Get started","What Treehouse is, how to set up your first workspace, and how it works underneath.",{"path":50,"title":231,"navTitle":8,"seoTitle":8,"description":232,"type":233,"position":11,"updated":12,"release":13,"related":234,"plans":8},"Quickstart","Create a workspace, sync it to your computer, connect an agent and let it set things up. About ten minutes.","guide",[235,57,64],"\u002Fdocs\u002Fget-started\u002Fset-up-with-an-agent",{"path":235,"title":237,"navTitle":238,"seoTitle":8,"description":239,"type":10,"position":38,"updated":12,"release":13,"related":240,"plans":8},"Set up a workspace with an agent","Set up with an agent","Hand a new, empty workspace to an agent. It interviews you, proposes a structure and builds it once you agree.",[176,64,241],"\u002Fdocs\u002Fplaybooks\u002Finbox-and-filing",{"path":243,"title":244,"navTitle":244,"seoTitle":8,"description":245,"type":37,"position":30,"updated":12,"release":13,"related":246,"plans":8},"\u002Fdocs\u002Fget-started\u002Fwhat-is-treehouse","What is Treehouse?","A shared workspace of plain files that people and agents both work in, with the sharing, history and review that plain folders lack.",[50,136,63],{"path":248,"title":249,"navTitle":250,"seoTitle":8,"description":251,"type":29,"position":11,"updated":12,"release":13,"related":8,"plans":8},"\u002Fdocs\u002Fhelp\u002Ffaq","Frequently asked questions","FAQ","Short answers to the questions people ask most about Treehouse, agents, sharing and data.",{"path":253,"title":254,"navTitle":8,"seoTitle":8,"description":255,"type":29,"position":48,"updated":12,"release":13,"related":8,"plans":8},"\u002Fdocs\u002Fhelp\u002Fglossary","Glossary","The words Treehouse uses, and what each one means in the app and in these docs.",{"path":257,"title":258,"navTitle":8,"seoTitle":8,"description":259,"type":24,"position":215,"updated":12,"release":13,"related":8,"plans":8},"\u002Fdocs\u002Fhelp","Help","Fixes for common problems, answers to common questions, and the words Treehouse uses.",{"path":151,"title":261,"navTitle":8,"seoTitle":262,"description":263,"type":10,"position":30,"updated":12,"release":13,"related":264,"plans":8},"Troubleshooting","Troubleshooting Treehouse sync, agents and sharing","The problems people hit most often with sync, agent connections, sharing and limits, and how to fix each one.",[146,57,93],{"path":266,"title":267,"navTitle":8,"seoTitle":268,"description":269,"type":24,"position":270,"updated":12,"release":13,"related":8,"plans":8},"\u002Fdocs","Treehouse docs","Treehouse documentation","How to set up a shared workspace for your team and your agents, and how to get the most out of it once you have.",0,{"path":272,"title":273,"navTitle":274,"seoTitle":8,"description":275,"type":233,"position":215,"updated":12,"release":13,"related":276,"plans":8},"\u002Fdocs\u002Fplaybooks\u002Fclient-work","Run client work","Client work","A folder per client, agents that prepare the deliverables, and share links that give clients exactly what they should see.",[32,42,88],{"path":241,"title":278,"navTitle":279,"seoTitle":8,"description":280,"type":233,"position":48,"updated":12,"release":13,"related":281,"plans":8},"Run an inbox your agent files","Inbox and filing","Drop anything into Inbox\u002F without deciding where it goes, and have an agent file it by rules you write once.",[110,282,176],"\u002Fdocs\u002Fplaybooks\u002Fsecond-brain",{"path":284,"title":285,"navTitle":8,"seoTitle":8,"description":286,"type":24,"position":181,"updated":12,"release":13,"related":8,"plans":8},"\u002Fdocs\u002Fplaybooks","Playbooks","Opinionated patterns for running a workspace with your agents, from the rulebook they follow to the routines that keep it alive.",{"path":288,"title":289,"navTitle":290,"seoTitle":8,"description":291,"type":233,"position":128,"updated":12,"release":13,"related":292,"plans":8},"\u002Fdocs\u002Fplaybooks\u002Fmemory-and-decisions","Give your agents a memory","Memory and decisions","Status pages, decision records and handoff notes that let any agent pick up where the last session left off.",[64,293,171],"\u002Fdocs\u002Fplaybooks\u002Fmultiple-agents",{"path":293,"title":295,"navTitle":296,"seoTitle":8,"description":297,"type":233,"position":25,"updated":12,"release":13,"related":298,"plans":8},"Work with several agents","Several agents","Give each agent its own key and its own lane, hand work over through files, and let versioning catch the collisions.",[40,288,93],{"path":88,"title":300,"navTitle":301,"seoTitle":8,"description":302,"type":233,"position":38,"updated":12,"release":13,"related":303,"plans":8},"Review your agent's work","Review loop","Let an agent draft, review it with comments in the web app, and have the agent work through your feedback thread by thread.",[304,162,57],"\u002Fdocs\u002Fsharing\u002Fcomments",{"path":110,"title":306,"navTitle":307,"seoTitle":8,"description":308,"type":233,"position":181,"updated":12,"release":13,"related":309,"plans":8},"Set up routines","Routines","Recurring agent work, like a morning inbox run or a weekly review, and where the schedule lives when Treehouse doesn't run agents itself.",[241,130,105],{"path":282,"title":311,"navTitle":8,"seoTitle":8,"description":312,"type":233,"position":160,"updated":12,"release":13,"related":313,"plans":8},"Build a second brain","A personal workspace where you capture everything quickly and an agent keeps it filed, linked and useful.",[241,110,171],{"path":176,"title":315,"navTitle":8,"seoTitle":8,"description":316,"type":233,"position":11,"updated":12,"release":13,"related":317,"plans":8},"Shape your workspace","Folder structures that work for people and agents alike, and the handful of habits that keep a workspace easy to navigate as it grows.",[64,171,194],{"path":64,"title":319,"navTitle":8,"seoTitle":8,"description":320,"type":233,"position":30,"updated":12,"release":13,"related":321,"plans":8},"Write your AGENTS.md","The one file every agent reads first. What to put in it so any agent, in any session, works the way your team does.",[176,63,235],{"path":323,"title":324,"navTitle":325,"seoTitle":8,"description":326,"type":24,"position":160,"updated":12,"release":13,"related":327,"plans":8},"\u002Fdocs\u002Fself-hosting","Self-host Treehouse","Self-hosting","Run your own Treehouse server - the architecture, required and optional environment variables, storage and encryption, and connecting clients.",[58,81,124],{"path":109,"title":329,"navTitle":330,"seoTitle":8,"description":331,"type":10,"position":38,"updated":12,"release":13,"related":332,"plans":8},"See what changed in a workspace","Activity","The activity feed shows every change and comment in a workspace, who made it, and whether it came from a person or an agent.",[63,40,162,93],{"path":304,"title":334,"navTitle":335,"seoTitle":8,"description":336,"type":10,"position":48,"updated":12,"release":13,"related":337,"plans":8},"Comment on a document","Comments","Leave comments on passages of a markdown file, reply and resolve threads, and let agents read and act on your feedback.",[88,162,109],{"path":51,"title":339,"navTitle":340,"seoTitle":8,"description":341,"type":10,"position":128,"updated":12,"release":13,"related":342,"plans":8},"Customise your workspace","Customise a workspace","Rename a workspace, give it an icon and colour, create new workspaces, and choose a theme for everyone or just for you.",[15,32],{"path":344,"title":345,"navTitle":8,"seoTitle":8,"description":346,"type":24,"position":38,"updated":12,"release":13,"related":8,"plans":8},"\u002Fdocs\u002Fsharing","Share and collaborate","Invite people into a workspace, share files with anyone by link, comment on documents and see who changed what.",{"path":16,"title":348,"navTitle":349,"seoTitle":8,"description":350,"type":10,"position":30,"updated":12,"release":13,"related":351,"plans":352},"Invite people to a workspace","Invite people","Bring teammates into a workspace with an invite link, see who's a member, and remove people when they no longer need access.",[32,5,40],[18,19],{"path":32,"title":354,"navTitle":355,"seoTitle":8,"description":356,"type":10,"position":11,"updated":12,"release":13,"related":357,"plans":8},"Share a file or folder with a link","Share links","Send members straight to a file, or give anyone read-only access to a file or folder, with an optional password and a pinned version.",[16,42,162,15],{"id":359,"title":106,"body":360,"description":107,"extension":2231,"meta":2232,"navTitle":8,"navigation":1284,"path":105,"plans":8,"position":38,"related":2233,"release":13,"seo":2234,"seoTitle":8,"stem":2235,"type":29,"updated":12,"__hash__":2236},"docs\u002Fdocs\u002Fagents\u002Freference\u002Fchange-feed.md",{"type":361,"value":362,"toc":2220},"minimark",[363,372,375,380,415,494,498,815,856,861,915,919,1059,1067,1071,1209,1218,1222,1244,1248,1255,2162,2165,2169,2213,2216],[364,365,366,367,371],"p",{},"Every write, move, delete, conflict, restore and comment in a workspace is recorded in order with a sequence number. The sync CLI uses this feed to keep folders up to date, the ",[368,369,370],"a",{"href":109},"activity feed"," is built on it, and you can read it too.",[364,373,374],{},"Treehouse doesn't push webhooks. You poll the feed from your own process, as often as you need.",[376,377,379],"h2",{"id":378},"request","Request",[381,382,387],"pre",{"className":383,"code":384,"language":385,"meta":386,"style":386},"language-http shiki shiki-themes everforest-dark","GET \u002Fapi\u002Fworkspaces\u002F{workspaceId}\u002Fchanges?sinceSeq=0&limit=200\nx-api-key: th_example_key\n","http","",[388,389,390,402],"code",{"__ignoreMap":386},[391,392,394,398],"span",{"class":393,"line":30},"line",[391,395,397],{"class":396},"safYi","GET",[391,399,401],{"class":400},"sY0Nt"," \u002Fapi\u002Fworkspaces\u002F{workspaceId}\u002Fchanges?sinceSeq=0&limit=200\n",[391,403,404,408,411],{"class":393,"line":11},[391,405,407],{"class":406},"sDOmQ","x-api-key",[391,409,410],{"class":396},":",[391,412,414],{"class":413},"sySyC"," th_example_key\n",[416,417,418,434],"table",{},[419,420,421],"thead",{},[422,423,424,428,431],"tr",{},[425,426,427],"th",{},"Parameter",[425,429,430],{},"Default",[425,432,433],{},"Description",[435,436,437,455,470],"tbody",{},[422,438,439,445,448],{},[440,441,442],"td",{},[388,443,444],{},"sinceSeq",[440,446,447],{},"-",[440,449,450,451,454],{},"Return changes with a sequence number greater than this. Use ",[388,452,453],{},"0"," to start from the beginning.",[422,456,457,462,467],{},[440,458,459],{},[388,460,461],{},"limit",[440,463,464],{},[388,465,466],{},"200",[440,468,469],{},"Changes to scan, from 0 to 1000.",[422,471,472,477,480],{},[440,473,474],{},[388,475,476],{},"includeComments",[440,478,479],{},"off",[440,481,482,485,486,489,490,493],{},[388,483,484],{},"1"," or ",[388,487,488],{},"true"," to include ",[388,491,492],{},"comment_*"," events.",[376,495,497],{"id":496},"response","Response",[381,499,503],{"className":500,"code":501,"language":502,"meta":386,"style":386},"language-json shiki shiki-themes everforest-dark","{\n  \"changes\": [\n    {\n      \"id\": \"0b6f…\",\n      \"workspaceId\": \"c2a1…\",\n      \"path\": \"Inbox\u002Fcall-notes.md\",\n      \"op\": \"write\",\n      \"version\": 1,\n      \"principal\": \"human\",\n      \"actorId\": \"u_91…\",\n      \"actorKeyId\": null,\n      \"actorLabel\": null,\n      \"contentHash\": \"5e88…\",\n      \"seq\": 1042,\n      \"createdAt\": \"2026-09-29T09:12:44.103Z\"\n    }\n  ],\n  \"head\": 1042,\n  \"nextSeq\": 1042\n}\n","json",[388,504,505,510,527,532,556,576,596,616,633,653,673,690,706,727,744,764,770,778,794,809],{"__ignoreMap":386},[391,506,507],{"class":393,"line":30},[391,508,509],{"class":400},"{\n",[391,511,512,516,519,522,524],{"class":393,"line":11},[391,513,515],{"class":514},"s3WQq","  \"",[391,517,518],{"class":406},"changes",[391,520,521],{"class":514},"\"",[391,523,410],{"class":514},[391,525,526],{"class":400}," [\n",[391,528,529],{"class":393,"line":48},[391,530,531],{"class":400},"    {\n",[391,533,534,537,540,542,544,547,551,553],{"class":393,"line":38},[391,535,536],{"class":514},"      \"",[391,538,539],{"class":406},"id",[391,541,521],{"class":514},[391,543,410],{"class":514},[391,545,546],{"class":514}," \"",[391,548,550],{"class":549},"sRC7j","0b6f…",[391,552,521],{"class":514},[391,554,555],{"class":514},",\n",[391,557,558,560,563,565,567,569,572,574],{"class":393,"line":128},[391,559,536],{"class":514},[391,561,562],{"class":406},"workspaceId",[391,564,521],{"class":514},[391,566,410],{"class":514},[391,568,546],{"class":514},[391,570,571],{"class":549},"c2a1…",[391,573,521],{"class":514},[391,575,555],{"class":514},[391,577,578,580,583,585,587,589,592,594],{"class":393,"line":181},[391,579,536],{"class":514},[391,581,582],{"class":406},"path",[391,584,521],{"class":514},[391,586,410],{"class":514},[391,588,546],{"class":514},[391,590,591],{"class":549},"Inbox\u002Fcall-notes.md",[391,593,521],{"class":514},[391,595,555],{"class":514},[391,597,598,600,603,605,607,609,612,614],{"class":393,"line":25},[391,599,536],{"class":514},[391,601,602],{"class":406},"op",[391,604,521],{"class":514},[391,606,410],{"class":514},[391,608,546],{"class":514},[391,610,611],{"class":549},"write",[391,613,521],{"class":514},[391,615,555],{"class":514},[391,617,618,620,623,625,627,631],{"class":393,"line":215},[391,619,536],{"class":514},[391,621,622],{"class":406},"version",[391,624,521],{"class":514},[391,626,410],{"class":514},[391,628,630],{"class":629},"s9lfW"," 1",[391,632,555],{"class":514},[391,634,635,637,640,642,644,646,649,651],{"class":393,"line":160},[391,636,536],{"class":514},[391,638,639],{"class":406},"principal",[391,641,521],{"class":514},[391,643,410],{"class":514},[391,645,546],{"class":514},[391,647,648],{"class":549},"human",[391,650,521],{"class":514},[391,652,555],{"class":514},[391,654,655,657,660,662,664,666,669,671],{"class":393,"line":203},[391,656,536],{"class":514},[391,658,659],{"class":406},"actorId",[391,661,521],{"class":514},[391,663,410],{"class":514},[391,665,546],{"class":514},[391,667,668],{"class":549},"u_91…",[391,670,521],{"class":514},[391,672,555],{"class":514},[391,674,676,678,681,683,685,688],{"class":393,"line":675},11,[391,677,536],{"class":514},[391,679,680],{"class":406},"actorKeyId",[391,682,521],{"class":514},[391,684,410],{"class":514},[391,686,687],{"class":629}," null",[391,689,555],{"class":514},[391,691,693,695,698,700,702,704],{"class":393,"line":692},12,[391,694,536],{"class":514},[391,696,697],{"class":406},"actorLabel",[391,699,521],{"class":514},[391,701,410],{"class":514},[391,703,687],{"class":629},[391,705,555],{"class":514},[391,707,709,711,714,716,718,720,723,725],{"class":393,"line":708},13,[391,710,536],{"class":514},[391,712,713],{"class":406},"contentHash",[391,715,521],{"class":514},[391,717,410],{"class":514},[391,719,546],{"class":514},[391,721,722],{"class":549},"5e88…",[391,724,521],{"class":514},[391,726,555],{"class":514},[391,728,730,732,735,737,739,742],{"class":393,"line":729},14,[391,731,536],{"class":514},[391,733,734],{"class":406},"seq",[391,736,521],{"class":514},[391,738,410],{"class":514},[391,740,741],{"class":629}," 1042",[391,743,555],{"class":514},[391,745,747,749,752,754,756,758,761],{"class":393,"line":746},15,[391,748,536],{"class":514},[391,750,751],{"class":406},"createdAt",[391,753,521],{"class":514},[391,755,410],{"class":514},[391,757,546],{"class":514},[391,759,760],{"class":549},"2026-09-29T09:12:44.103Z",[391,762,763],{"class":514},"\"\n",[391,765,767],{"class":393,"line":766},16,[391,768,769],{"class":400},"    }\n",[391,771,773,776],{"class":393,"line":772},17,[391,774,775],{"class":400},"  ]",[391,777,555],{"class":514},[391,779,781,783,786,788,790,792],{"class":393,"line":780},18,[391,782,515],{"class":514},[391,784,785],{"class":406},"head",[391,787,521],{"class":514},[391,789,410],{"class":514},[391,791,741],{"class":629},[391,793,555],{"class":514},[391,795,797,799,802,804,806],{"class":393,"line":796},19,[391,798,515],{"class":514},[391,800,801],{"class":406},"nextSeq",[391,803,521],{"class":514},[391,805,410],{"class":514},[391,807,808],{"class":629}," 1042\n",[391,810,812],{"class":393,"line":811},20,[391,813,814],{"class":400},"}\n",[416,816,817,827],{},[419,818,819],{},[422,820,821,824],{},[425,822,823],{},"Field",[425,825,826],{},"Meaning",[435,828,829,838,847],{},[422,830,831,835],{},[440,832,833],{},[388,834,518],{},[440,836,837],{},"Changes after your cursor that you're allowed to see, oldest first",[422,839,840,844],{},[440,841,842],{},[388,843,785],{},[440,845,846],{},"The workspace's latest sequence number right now",[422,848,849,853],{},[440,850,851],{},[388,852,801],{},[440,854,855],{},"The cursor for your next request. Store it.",[857,858,860],"h3",{"id":859},"using-the-cursor","Using the cursor",[862,863,864,886,900,912],"ul",{},[865,866,867,871,872,875,876,878,879,882,883,885],"li",{},[868,869,870],"strong",{},"Start"," at ",[388,873,874],{},"sinceSeq=0"," to replay the whole history, or read ",[388,877,785],{}," first to start from now: a request with ",[388,880,881],{},"limit=0"," returns ",[388,884,785],{}," without any changes.",[865,887,888,893,894,896,897,899],{},[868,889,890,891],{},"Always continue from ",[388,892,801],{},", not from the last change you received. Changes you aren't allowed to see (another member's private files, or comments you didn't ask for) are filtered out, and ",[388,895,801],{}," still moves past them. A page can come back empty with a higher ",[388,898,801],{},".",[865,901,902,905,906,908,909,911],{},[868,903,904],{},"You're caught up"," when ",[388,907,801],{}," equals ",[388,910,785],{},". Until then, request again straight away.",[865,913,914],{},"Sequence numbers always increase but can have gaps. Don't expect every number to appear.",[376,916,918],{"id":917},"change-fields","Change fields",[416,920,921,929],{},[419,922,923],{},[422,924,925,927],{},[425,926,823],{},[425,928,433],{},[435,930,931,940,949,958,975,991,1004,1016,1028,1050],{},[422,932,933,937],{},[440,934,935],{},[388,936,734],{},[440,938,939],{},"Position in the feed",[422,941,942,946],{},[440,943,944],{},[388,945,582],{},[440,947,948],{},"The file (or, for access events, the file or folder) the change applies to",[422,950,951,955],{},[440,952,953],{},[388,954,602],{},[440,956,957],{},"What happened. See below.",[422,959,960,964],{},[440,961,962],{},[388,963,622],{},[440,965,966,967,970,971,974],{},"The file's version after the change. For a ",[388,968,969],{},"delete",", the version that was deleted. ",[388,972,973],{},"null"," for access events.",[422,976,977,981],{},[440,978,979],{},[388,980,639],{},[440,982,983,485,986,988,989,899],{},[388,984,985],{},"agent",[388,987,648],{},", from the acting key's actor type. Browser sessions are always ",[388,990,648],{},[422,992,993,997],{},[440,994,995],{},[388,996,659],{},[440,998,999,1000,1003],{},"The user id behind the change. ",[388,1001,1002],{},"GET \u002Fapi\u002Fworkspaces\u002F{id}\u002Fmembers"," maps it to a name.",[422,1005,1006,1010],{},[440,1007,1008],{},[388,1009,680],{},[440,1011,1012,1013,1015],{},"The API key that made the change, or ",[388,1014,973],{}," for a browser session",[422,1017,1018,1022],{},[440,1019,1020],{},[388,1021,697],{},[440,1023,1024,1025],{},"The key's name at the time of the change, such as ",[388,1026,1027],{},"claude-code",[422,1029,1030,1034],{},[440,1031,1032],{},[388,1033,713],{},[440,1035,1036,1037,1039,1040,1043,1044,1047,1048],{},"SHA-256 of the new content for ",[388,1038,611],{},", ",[388,1041,1042],{},"move"," and ",[388,1045,1046],{},"restore",", otherwise ",[388,1049,973],{},[422,1051,1052,1056],{},[440,1053,1054],{},[388,1055,751],{},[440,1057,1058],{},"Server timestamp",[364,1060,1061,1063,1064,1066],{},[388,1062,680],{}," is set for any key, including human CLI keys, so use ",[388,1065,639],{}," to tell agents from people.",[376,1068,1070],{"id":1069},"operations","Operations",[416,1072,1073,1083],{},[419,1074,1075],{},[422,1076,1077,1081],{},[425,1078,1079],{},[388,1080,602],{},[425,1082,826],{},[435,1084,1085,1094,1112,1123,1135,1144,1157,1167,1179,1189,1199],{},[422,1086,1087,1091],{},[440,1088,1089],{},[388,1090,611],{},[440,1092,1093],{},"A file was created or updated, including one recreated after a delete",[422,1095,1096,1100],{},[440,1097,1098],{},[388,1099,1042],{},[440,1101,1102,1103,1105,1106,1108,1109,1111],{},"A file arrived at ",[388,1104,582],{}," by a move or rename. Paired with a ",[388,1107,969],{}," at its old path, and ",[388,1110,622],{}," is 1.",[422,1113,1114,1118],{},[440,1115,1116],{},[388,1117,969],{},[440,1119,1120,1121],{},"A file was deleted, or moved away from ",[388,1122,582],{},[422,1124,1125,1130],{},[440,1126,1127],{},[388,1128,1129],{},"conflict",[440,1131,1132,1133],{},"A conflicted copy was created at ",[388,1134,582],{},[422,1136,1137,1141],{},[440,1138,1139],{},[388,1140,1046],{},[440,1142,1143],{},"An earlier version was restored as a new version",[422,1145,1146,1151],{},[440,1147,1148],{},[388,1149,1150],{},"access_revoked",[440,1152,1153,1154,1156],{},"An item was made private and you can no longer see it. Drop your copy of ",[388,1155,582],{}," and everything under it. Only sent to members who lost access.",[422,1158,1159,1164],{},[440,1160,1161],{},[388,1162,1163],{},"access_granted",[440,1165,1166],{},"A private item was shared again and you can see it now. Not sent to the person who shared it.",[422,1168,1169,1174],{},[440,1170,1171],{},[388,1172,1173],{},"comment_created",[440,1175,1176,1177],{},"A comment thread was started on the file at ",[388,1178,582],{},[422,1180,1181,1186],{},[440,1182,1183],{},[388,1184,1185],{},"comment_replied",[440,1187,1188],{},"Someone replied to a thread",[422,1190,1191,1196],{},[440,1192,1193],{},[388,1194,1195],{},"comment_resolved",[440,1197,1198],{},"A thread was resolved",[422,1200,1201,1206],{},[440,1202,1203],{},[388,1204,1205],{},"comment_reopened",[440,1207,1208],{},"A resolved thread was reopened",[364,1210,1211,1212,1214,1215,899],{},"The ",[388,1213,492],{}," operations only appear with ",[388,1216,1217],{},"includeComments=1",[376,1219,1221],{"id":1220},"time-based-mode","Time-based mode",[364,1223,1224,1225,1228,1229,1232,1233,1043,1235,1237,1238,1240,1241,1243],{},"The web app's activity panel reads the feed by time instead: ",[388,1226,1227],{},"?since=\u003CISO timestamp>",", optionally with ",[388,1230,1231],{},"order=desc"," for newest first. This mode returns ",[388,1234,518],{},[388,1236,785],{}," but no ",[388,1239,801],{},", and orders by timestamp. Use ",[388,1242,444],{}," for anything that must not miss a change.",[376,1245,1247],{"id":1246},"example-poll-for-new-files","Example: poll for new files",[364,1249,1250,1251,1254],{},"This loop polls every two seconds, the same interval the sync CLI uses, and reacts to new files in ",[388,1252,1253],{},"Inbox\u002F",". It saves its cursor so a restart picks up where it left off.",[381,1256,1261],{"className":1257,"code":1258,"filename":1259,"language":1260,"meta":386,"style":386},"language-typescript shiki shiki-themes everforest-dark","import { readFile, writeFile } from \"node:fs\u002Fpromises\";\n\nconst API = \"https:\u002F\u002Fapi.trytree.house\";\nconst KEY = process.env.TREEHOUSE_API_KEY!;\nconst WS = process.env.TREEHOUSE_WORKSPACE_ID!;\nconst CURSOR_FILE = \".treehouse-cursor\";\n\ntype Change = { seq: number; path: string; op: string; version: number | null; principal: string };\ntype Page = { changes: Change[]; head: number; nextSeq: number };\n\nasync function loadCursor(): Promise\u003Cnumber> {\n  try {\n    return Number(await readFile(CURSOR_FILE, \"utf8\"));\n  } catch {\n    \u002F\u002F First run: start from now rather than replaying the whole history.\n    const page = await fetchPage(0, 0);\n    return page.head;\n  }\n}\n\nasync function fetchPage(sinceSeq: number, limit = 500): Promise\u003CPage> {\n  const res = await fetch(\n    `${API}\u002Fapi\u002Fworkspaces\u002F${WS}\u002Fchanges?sinceSeq=${sinceSeq}&limit=${limit}`,\n    { headers: { \"x-api-key\": KEY } },\n  );\n  if (!res.ok) throw new Error(`change feed: ${res.status}`);\n  return (await res.json()) as Page;\n}\n\nasync function onChange(c: Change): Promise\u003Cvoid> {\n  const arrived = (c.op === \"write\" && c.version === 1) || c.op === \"move\";\n  if (arrived && c.path.startsWith(\"Inbox\u002F\")) {\n    console.log(`New in Inbox: ${c.path} (by ${c.principal})`);\n    \u002F\u002F Hand it to your agent here.\n  }\n}\n\nlet cursor = await loadCursor();\nfor (;;) {\n  const page = await fetchPage(cursor);\n  for (const change of page.changes) await onChange(change);\n  cursor = page.nextSeq;\n  await writeFile(CURSOR_FILE, String(cursor));\n  if (cursor >= page.head) await new Promise((r) => setTimeout(r, 2000));\n}\n","watch-inbox.ts","typescript",[388,1262,1263,1280,1286,1302,1329,1353,1367,1371,1429,1461,1465,1496,1503,1529,1539,1545,1574,1585,1590,1594,1598,1640,1659,1707,1735,1741,1789,1815,1820,1825,1857,1912,1943,1988,1994,1999,2004,2009,2027,2036,2053,2083,2098,2116,2157],{"__ignoreMap":386},[391,1264,1265,1268,1271,1274,1277],{"class":393,"line":30},[391,1266,1267],{"class":629},"import",[391,1269,1270],{"class":400}," { readFile, writeFile } ",[391,1272,1273],{"class":396},"from",[391,1275,1276],{"class":413}," \"node:fs\u002Fpromises\"",[391,1278,1279],{"class":400},";\n",[391,1281,1282],{"class":393,"line":11},[391,1283,1285],{"emptyLinePlaceholder":1284},true,"\n",[391,1287,1288,1291,1294,1297,1300],{"class":393,"line":48},[391,1289,1290],{"class":406},"const",[391,1292,1293],{"class":400}," API ",[391,1295,1296],{"class":406},"=",[391,1298,1299],{"class":413}," \"https:\u002F\u002Fapi.trytree.house\"",[391,1301,1279],{"class":400},[391,1303,1304,1306,1309,1311,1314,1316,1319,1321,1324,1327],{"class":393,"line":38},[391,1305,1290],{"class":406},[391,1307,1308],{"class":400}," KEY ",[391,1310,1296],{"class":406},[391,1312,1313],{"class":400}," process",[391,1315,899],{"class":514},[391,1317,1318],{"class":400},"env",[391,1320,899],{"class":514},[391,1322,1323],{"class":400},"TREEHOUSE_API_KEY",[391,1325,1326],{"class":406},"!",[391,1328,1279],{"class":400},[391,1330,1331,1333,1336,1338,1340,1342,1344,1346,1349,1351],{"class":393,"line":128},[391,1332,1290],{"class":406},[391,1334,1335],{"class":400}," WS ",[391,1337,1296],{"class":406},[391,1339,1313],{"class":400},[391,1341,899],{"class":514},[391,1343,1318],{"class":400},[391,1345,899],{"class":514},[391,1347,1348],{"class":400},"TREEHOUSE_WORKSPACE_ID",[391,1350,1326],{"class":406},[391,1352,1279],{"class":400},[391,1354,1355,1357,1360,1362,1365],{"class":393,"line":181},[391,1356,1290],{"class":406},[391,1358,1359],{"class":400}," CURSOR_FILE ",[391,1361,1296],{"class":406},[391,1363,1364],{"class":413}," \".treehouse-cursor\"",[391,1366,1279],{"class":400},[391,1368,1369],{"class":393,"line":25},[391,1370,1285],{"emptyLinePlaceholder":1284},[391,1372,1373,1376,1380,1383,1386,1388,1392,1395,1397,1400,1403,1405,1407,1410,1412,1414,1417,1419,1422,1424,1426],{"class":393,"line":215},[391,1374,1375],{"class":406},"type",[391,1377,1379],{"class":1378},"sFWo_"," Change",[391,1381,1382],{"class":406}," =",[391,1384,1385],{"class":400}," { seq",[391,1387,410],{"class":514},[391,1389,1391],{"class":1390},"sP-ue"," number",[391,1393,1394],{"class":400},"; path",[391,1396,410],{"class":514},[391,1398,1399],{"class":1390}," string",[391,1401,1402],{"class":400},"; op",[391,1404,410],{"class":514},[391,1406,1399],{"class":1390},[391,1408,1409],{"class":400},"; version",[391,1411,410],{"class":514},[391,1413,1391],{"class":1390},[391,1415,1416],{"class":406}," |",[391,1418,687],{"class":1390},[391,1420,1421],{"class":400},"; principal",[391,1423,410],{"class":514},[391,1425,1399],{"class":1390},[391,1427,1428],{"class":400}," };\n",[391,1430,1431,1433,1436,1438,1441,1443,1445,1448,1450,1452,1455,1457,1459],{"class":393,"line":160},[391,1432,1375],{"class":406},[391,1434,1435],{"class":1378}," Page",[391,1437,1382],{"class":406},[391,1439,1440],{"class":400}," { changes",[391,1442,410],{"class":514},[391,1444,1379],{"class":1378},[391,1446,1447],{"class":400},"[]; head",[391,1449,410],{"class":514},[391,1451,1391],{"class":1390},[391,1453,1454],{"class":400},"; nextSeq",[391,1456,410],{"class":514},[391,1458,1391],{"class":1390},[391,1460,1428],{"class":400},[391,1462,1463],{"class":393,"line":203},[391,1464,1285],{"emptyLinePlaceholder":1284},[391,1466,1467,1470,1473,1476,1479,1481,1484,1487,1490,1493],{"class":393,"line":675},[391,1468,1469],{"class":406},"async",[391,1471,1472],{"class":396}," function",[391,1474,1475],{"class":549}," loadCursor",[391,1477,1478],{"class":400},"()",[391,1480,410],{"class":514},[391,1482,1483],{"class":1378}," Promise",[391,1485,1486],{"class":400},"\u003C",[391,1488,1489],{"class":1390},"number",[391,1491,1492],{"class":400},">",[391,1494,1495],{"class":400}," {\n",[391,1497,1498,1501],{"class":393,"line":692},[391,1499,1500],{"class":396},"  try",[391,1502,1495],{"class":400},[391,1504,1505,1508,1511,1514,1517,1520,1523,1526],{"class":393,"line":708},[391,1506,1507],{"class":396},"    return",[391,1509,1510],{"class":549}," Number",[391,1512,1513],{"class":400},"(",[391,1515,1516],{"class":396},"await",[391,1518,1519],{"class":549}," readFile",[391,1521,1522],{"class":400},"(CURSOR_FILE,",[391,1524,1525],{"class":413}," \"utf8\"",[391,1527,1528],{"class":400},"));\n",[391,1530,1531,1534,1537],{"class":393,"line":729},[391,1532,1533],{"class":400},"  }",[391,1535,1536],{"class":396}," catch",[391,1538,1495],{"class":400},[391,1540,1541],{"class":393,"line":746},[391,1542,1544],{"class":1543},"s67c6","    \u002F\u002F First run: start from now rather than replaying the whole history.\n",[391,1546,1547,1550,1553,1555,1558,1561,1563,1565,1568,1571],{"class":393,"line":766},[391,1548,1549],{"class":406},"    const",[391,1551,1552],{"class":400}," page",[391,1554,1382],{"class":406},[391,1556,1557],{"class":396}," await",[391,1559,1560],{"class":549}," fetchPage",[391,1562,1513],{"class":400},[391,1564,453],{"class":629},[391,1566,1567],{"class":400},",",[391,1569,1570],{"class":629}," 0",[391,1572,1573],{"class":400},");\n",[391,1575,1576,1578,1580,1582],{"class":393,"line":772},[391,1577,1507],{"class":396},[391,1579,1552],{"class":400},[391,1581,899],{"class":514},[391,1583,1584],{"class":400},"head;\n",[391,1586,1587],{"class":393,"line":780},[391,1588,1589],{"class":400},"  }\n",[391,1591,1592],{"class":393,"line":796},[391,1593,814],{"class":400},[391,1595,1596],{"class":393,"line":811},[391,1597,1285],{"emptyLinePlaceholder":1284},[391,1599,1601,1603,1605,1607,1610,1612,1614,1616,1619,1621,1624,1627,1629,1631,1633,1636,1638],{"class":393,"line":1600},21,[391,1602,1469],{"class":406},[391,1604,1472],{"class":396},[391,1606,1560],{"class":549},[391,1608,1609],{"class":400},"(sinceSeq",[391,1611,410],{"class":514},[391,1613,1391],{"class":1390},[391,1615,1567],{"class":400},[391,1617,1618],{"class":400}," limit",[391,1620,1382],{"class":406},[391,1622,1623],{"class":629}," 500",[391,1625,1626],{"class":400},")",[391,1628,410],{"class":514},[391,1630,1483],{"class":1378},[391,1632,1486],{"class":400},[391,1634,1635],{"class":1378},"Page",[391,1637,1492],{"class":400},[391,1639,1495],{"class":400},[391,1641,1643,1646,1649,1651,1653,1656],{"class":393,"line":1642},22,[391,1644,1645],{"class":406},"  const",[391,1647,1648],{"class":400}," res",[391,1650,1382],{"class":406},[391,1652,1557],{"class":396},[391,1654,1655],{"class":549}," fetch",[391,1657,1658],{"class":400},"(\n",[391,1660,1662,1665,1668,1671,1674,1677,1679,1682,1684,1687,1689,1691,1693,1696,1698,1700,1702,1705],{"class":393,"line":1661},23,[391,1663,1664],{"class":413},"    `",[391,1666,1667],{"class":549},"${",[391,1669,1670],{"class":400},"API",[391,1672,1673],{"class":549},"}",[391,1675,1676],{"class":413},"\u002Fapi\u002Fworkspaces\u002F",[391,1678,1667],{"class":549},[391,1680,1681],{"class":400},"WS",[391,1683,1673],{"class":549},[391,1685,1686],{"class":413},"\u002Fchanges?sinceSeq=",[391,1688,1667],{"class":549},[391,1690,444],{"class":400},[391,1692,1673],{"class":549},[391,1694,1695],{"class":413},"&limit=",[391,1697,1667],{"class":549},[391,1699,461],{"class":400},[391,1701,1673],{"class":549},[391,1703,1704],{"class":413},"`",[391,1706,555],{"class":400},[391,1708,1710,1713,1716,1718,1721,1724,1726,1729,1732],{"class":393,"line":1709},24,[391,1711,1712],{"class":400},"    {",[391,1714,1715],{"class":400}," headers",[391,1717,410],{"class":514},[391,1719,1720],{"class":400}," {",[391,1722,1723],{"class":413}," \"x-api-key\"",[391,1725,410],{"class":514},[391,1727,1728],{"class":400}," KEY",[391,1730,1731],{"class":400}," }",[391,1733,1734],{"class":400}," },\n",[391,1736,1738],{"class":393,"line":1737},25,[391,1739,1740],{"class":400},"  );\n",[391,1742,1744,1747,1750,1752,1755,1757,1760,1763,1766,1769,1771,1774,1776,1778,1780,1783,1785,1787],{"class":393,"line":1743},26,[391,1745,1746],{"class":396},"  if",[391,1748,1749],{"class":400}," (",[391,1751,1326],{"class":406},[391,1753,1754],{"class":400},"res",[391,1756,899],{"class":514},[391,1758,1759],{"class":400},"ok)",[391,1761,1762],{"class":396}," throw",[391,1764,1765],{"class":396}," new",[391,1767,1768],{"class":549}," Error",[391,1770,1513],{"class":400},[391,1772,1773],{"class":413},"`change feed: ",[391,1775,1667],{"class":549},[391,1777,1754],{"class":400},[391,1779,899],{"class":514},[391,1781,1782],{"class":400},"status",[391,1784,1673],{"class":549},[391,1786,1704],{"class":413},[391,1788,1573],{"class":400},[391,1790,1792,1795,1797,1799,1801,1803,1805,1808,1811,1813],{"class":393,"line":1791},27,[391,1793,1794],{"class":396},"  return",[391,1796,1749],{"class":400},[391,1798,1516],{"class":396},[391,1800,1648],{"class":400},[391,1802,899],{"class":514},[391,1804,502],{"class":549},[391,1806,1807],{"class":400},"())",[391,1809,1810],{"class":396}," as",[391,1812,1435],{"class":1378},[391,1814,1279],{"class":400},[391,1816,1818],{"class":393,"line":1817},28,[391,1819,814],{"class":400},[391,1821,1823],{"class":393,"line":1822},29,[391,1824,1285],{"emptyLinePlaceholder":1284},[391,1826,1828,1830,1832,1835,1838,1840,1842,1844,1846,1848,1850,1853,1855],{"class":393,"line":1827},30,[391,1829,1469],{"class":406},[391,1831,1472],{"class":396},[391,1833,1834],{"class":549}," onChange",[391,1836,1837],{"class":400},"(c",[391,1839,410],{"class":514},[391,1841,1379],{"class":1378},[391,1843,1626],{"class":400},[391,1845,410],{"class":514},[391,1847,1483],{"class":1378},[391,1849,1486],{"class":400},[391,1851,1852],{"class":1390},"void",[391,1854,1492],{"class":400},[391,1856,1495],{"class":400},[391,1858,1860,1862,1865,1867,1870,1872,1874,1877,1880,1883,1886,1888,1890,1892,1894,1896,1899,1901,1903,1905,1907,1910],{"class":393,"line":1859},31,[391,1861,1645],{"class":406},[391,1863,1864],{"class":400}," arrived",[391,1866,1382],{"class":406},[391,1868,1869],{"class":400}," (c",[391,1871,899],{"class":514},[391,1873,602],{"class":400},[391,1875,1876],{"class":406}," ===",[391,1878,1879],{"class":413}," \"write\"",[391,1881,1882],{"class":406}," &&",[391,1884,1885],{"class":400}," c",[391,1887,899],{"class":514},[391,1889,622],{"class":400},[391,1891,1876],{"class":406},[391,1893,630],{"class":629},[391,1895,1626],{"class":400},[391,1897,1898],{"class":406}," ||",[391,1900,1885],{"class":400},[391,1902,899],{"class":514},[391,1904,602],{"class":400},[391,1906,1876],{"class":406},[391,1908,1909],{"class":413}," \"move\"",[391,1911,1279],{"class":400},[391,1913,1915,1917,1920,1922,1924,1926,1928,1930,1933,1935,1938,1941],{"class":393,"line":1914},32,[391,1916,1746],{"class":396},[391,1918,1919],{"class":400}," (arrived",[391,1921,1882],{"class":406},[391,1923,1885],{"class":400},[391,1925,899],{"class":514},[391,1927,582],{"class":400},[391,1929,899],{"class":514},[391,1931,1932],{"class":549},"startsWith",[391,1934,1513],{"class":400},[391,1936,1937],{"class":413},"\"Inbox\u002F\"",[391,1939,1940],{"class":400},"))",[391,1942,1495],{"class":400},[391,1944,1946,1949,1951,1954,1956,1959,1961,1964,1966,1968,1970,1973,1975,1977,1979,1981,1983,1986],{"class":393,"line":1945},33,[391,1947,1948],{"class":400},"    console",[391,1950,899],{"class":514},[391,1952,1953],{"class":549},"log",[391,1955,1513],{"class":400},[391,1957,1958],{"class":413},"`New in Inbox: ",[391,1960,1667],{"class":549},[391,1962,1963],{"class":400},"c",[391,1965,899],{"class":514},[391,1967,582],{"class":400},[391,1969,1673],{"class":549},[391,1971,1972],{"class":413}," (by ",[391,1974,1667],{"class":549},[391,1976,1963],{"class":400},[391,1978,899],{"class":514},[391,1980,639],{"class":400},[391,1982,1673],{"class":549},[391,1984,1985],{"class":413},")`",[391,1987,1573],{"class":400},[391,1989,1991],{"class":393,"line":1990},34,[391,1992,1993],{"class":1543},"    \u002F\u002F Hand it to your agent here.\n",[391,1995,1997],{"class":393,"line":1996},35,[391,1998,1589],{"class":400},[391,2000,2002],{"class":393,"line":2001},36,[391,2003,814],{"class":400},[391,2005,2007],{"class":393,"line":2006},37,[391,2008,1285],{"emptyLinePlaceholder":1284},[391,2010,2012,2015,2018,2020,2022,2024],{"class":393,"line":2011},38,[391,2013,2014],{"class":406},"let",[391,2016,2017],{"class":400}," cursor ",[391,2019,1296],{"class":406},[391,2021,1557],{"class":396},[391,2023,1475],{"class":549},[391,2025,2026],{"class":400},"();\n",[391,2028,2030,2033],{"class":393,"line":2029},39,[391,2031,2032],{"class":396},"for",[391,2034,2035],{"class":400}," (;;) {\n",[391,2037,2039,2041,2044,2046,2048,2050],{"class":393,"line":2038},40,[391,2040,1645],{"class":406},[391,2042,2043],{"class":400}," page ",[391,2045,1296],{"class":406},[391,2047,1557],{"class":396},[391,2049,1560],{"class":549},[391,2051,2052],{"class":400},"(cursor);\n",[391,2054,2056,2059,2061,2063,2066,2069,2071,2073,2076,2078,2080],{"class":393,"line":2055},41,[391,2057,2058],{"class":396},"  for",[391,2060,1749],{"class":400},[391,2062,1290],{"class":406},[391,2064,2065],{"class":400}," change ",[391,2067,2068],{"class":396},"of",[391,2070,1552],{"class":400},[391,2072,899],{"class":514},[391,2074,2075],{"class":400},"changes) ",[391,2077,1516],{"class":396},[391,2079,1834],{"class":549},[391,2081,2082],{"class":400},"(change);\n",[391,2084,2086,2089,2091,2093,2095],{"class":393,"line":2085},42,[391,2087,2088],{"class":400},"  cursor ",[391,2090,1296],{"class":406},[391,2092,1552],{"class":400},[391,2094,899],{"class":514},[391,2096,2097],{"class":400},"nextSeq;\n",[391,2099,2101,2104,2107,2110,2113],{"class":393,"line":2100},43,[391,2102,2103],{"class":396},"  await",[391,2105,2106],{"class":549}," writeFile",[391,2108,2109],{"class":400},"(CURSOR_FILE, ",[391,2111,2112],{"class":549},"String",[391,2114,2115],{"class":400},"(cursor));\n",[391,2117,2119,2121,2124,2127,2129,2131,2134,2136,2138,2140,2143,2146,2149,2152,2155],{"class":393,"line":2118},44,[391,2120,1746],{"class":396},[391,2122,2123],{"class":400}," (cursor ",[391,2125,2126],{"class":406},">=",[391,2128,1552],{"class":400},[391,2130,899],{"class":514},[391,2132,2133],{"class":400},"head) ",[391,2135,1516],{"class":396},[391,2137,1765],{"class":396},[391,2139,1483],{"class":1390},[391,2141,2142],{"class":400},"((r) ",[391,2144,2145],{"class":406},"=>",[391,2147,2148],{"class":549}," setTimeout",[391,2150,2151],{"class":400},"(r, ",[391,2153,2154],{"class":629},"2000",[391,2156,1528],{"class":400},[391,2158,2160],{"class":393,"line":2159},45,[391,2161,814],{"class":400},[364,2163,2164],{},"Save the cursor after you've handled a page, not before, so a crash replays the page instead of skipping it. That means your handler may see a change twice; make it safe to repeat.",[376,2166,2168],{"id":2167},"ideas","Ideas",[862,2170,2171,2184,2198],{},[865,2172,2173,2176,2177,2179,2180,2183],{},[868,2174,2175],{},"An inbox agent."," Watch ",[388,2178,1253],{}," as above and start an agent on each new file, so notes you drop in are filed or summarised. The ",[368,2181,2182],{"href":110},"routines playbook"," covers running agents on a schedule.",[865,2185,2186,2189,2190,2192,2193,1043,2195,2197],{},[868,2187,2188],{},"A daily digest."," Once a day, read from yesterday's saved cursor to ",[388,2191,785],{},", group changes by ",[388,2194,582],{},[388,2196,639],{},", and write a summary file back to the workspace.",[865,2199,2200,2203,2204,2206,2207,2209,2210,899],{},[868,2201,2202],{},"Review triggers."," With ",[388,2205,1217],{},", watch for ",[388,2208,1173],{}," on files your agent owns and have it respond. See the ",[368,2211,2212],{"href":88},"review loop playbook",[364,2214,2215],{},"Remember that Treehouse only stores the files and the feed: the process doing the polling runs on your own machine or server.",[2217,2218,2219],"style",{},"html pre.shiki code .sY0Nt, html code.shiki .sY0Nt{--shiki-default:#D3C6AA}html pre.shiki code .s3WQq, html code.shiki .s3WQq{--shiki-default:#859289}html pre.shiki code .sDOmQ, html code.shiki .sDOmQ{--shiki-default:#E69875}html pre.shiki code .sRC7j, html code.shiki .sRC7j{--shiki-default:#A7C080}html pre.shiki code .s9lfW, html code.shiki .s9lfW{--shiki-default:#D699B6}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .safYi, html code.shiki .safYi{--shiki-default:#E67E80}html pre.shiki code .sySyC, html code.shiki .sySyC{--shiki-default:#DBBC7F}html pre.shiki code .sFWo_, html code.shiki .sFWo_{--shiki-default:#83C092}html pre.shiki code .sP-ue, html code.shiki .sP-ue{--shiki-default:#7FBBB3}html pre.shiki code .s67c6, html code.shiki .s67c6{--shiki-default:#859289;--shiki-default-font-style:italic}",{"title":386,"searchDepth":11,"depth":48,"links":2221},[2222,2223,2226,2227,2228,2229,2230],{"id":378,"depth":11,"text":379},{"id":496,"depth":11,"text":497,"children":2224},[2225],{"id":859,"depth":48,"text":860},{"id":917,"depth":11,"text":918},{"id":1069,"depth":11,"text":1070},{"id":1220,"depth":11,"text":1221},{"id":1246,"depth":11,"text":1247},{"id":2167,"depth":11,"text":2168},"md",{},[109,110,87],{"title":106,"description":107},"docs\u002Fagents\u002Freference\u002Fchange-feed","a6I3NJgD7PoqeSugI8_dvMM_pYkJC54ZZ3inxpC5XVA",1790706077340]