tisty-mcp 1.3.1 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  <img src="assets/logo.png" width="96" height="96" alt="Tisty"/>
4
4
 
5
- [Tisty](https://www.tisty.app/) is local memory and context for you and your AI
6
- agent: notes, documents and tasks as plain Markdown on your own disk, for
7
- Windows and macOS. Ideas caught on the fly wait as sticky notes in Brainstorm,
8
- to become a task or go into a document later. Your agent forgets everything when
5
+ [Tisty](https://www.tisty.app/) is shared working memory for you and your AI
6
+ agent: notes, documents and tasks in local Markdown, for Windows and macOS.
7
+ Ideas caught on the fly wait as sticky notes in Brainstorm, to become a task or
8
+ go into a document later. Your agent forgets everything when
9
9
  the session ends; with this plugin it picks up where it left off, asking what
10
10
  moved since last time and reading a long document by its outline and one section
11
11
  instead of the whole file. It connects your assistant to the Tisty app on your
@@ -51,6 +51,28 @@ Without Tisty, the assistant gets one tool, `install_tisty`, that tells you how
51
51
  to get it. If Tisty lives somewhere unusual, set `TISTY_PATH` to the full path
52
52
  of its `tisty` command.
53
53
 
54
+ ## Hooks
55
+
56
+ From 1.4.0 the plugin also brings Tisty's hooks to Claude Code, and the Gemini
57
+ CLI extension brings them to Gemini CLI. When a session starts, your agent gets
58
+ the tasks it left open and what moved, in about 2,000 characters. When a turn
59
+ edited files and wrote nothing in Tisty, the turn is handed back once: if that
60
+ was work on a task, it ticks what it finished and, if it is done, says so with
61
+ the proof. They need a Tisty whose command line has `tisty hook`; with an older
62
+ one they stay silent.
63
+ Tisty's Settings › Assistants adds the same hooks to Cursor and GitHub Copilot,
64
+ and its switch **Remind it when a turn starts and ends** turns them off.
65
+
66
+ ## Skills
67
+
68
+ The `tisty` skill tells your assistant when to reach for Tisty and how to pick
69
+ work up where it left off. `writing-for-the-next-agent` helps it write what
70
+ the next agent will read again: a long document, a task's state, an
71
+ assistant's file kept in Tisty. `consolidate` goes over what Tisty keeps —
72
+ stale agent notes, links that lead nowhere, task states out of date — and
73
+ fixes only what you pick, deleting nothing. Claude Code and Cursor load all
74
+ three; the Gemini CLI extension reads the `tisty` skill as its context.
75
+
54
76
  ## Any other assistant
55
77
 
56
78
  The same launcher is on npm as `tisty-mcp`, for assistants that take an MCP
@@ -77,4 +99,6 @@ on your computer; Claude Code and Claude Desktop can.
77
99
  - [Issues with the plugin](https://github.com/rgdevment/mcp-plugins/issues),
78
100
  [issues with Tisty](https://github.com/rgdevment/Tisty/issues)
79
101
 
80
- Apache-2.0. Tisty itself is AGPL-3.0.
102
+ Apache-2.0. Tisty itself is AGPL-3.0. `writing-for-the-next-agent` adapts
103
+ Matt Pocock's [`writing-for-agents`](https://github.com/mattpocock/skills),
104
+ under the MIT license that comes with it.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tisty-mcp",
3
- "version": "1.3.1",
4
- "description": "Starts the MCP server of the Tisty app installed on this computer: local memory and context for you and your AI agent, with notes, documents, tasks and ideas as Markdown on your own disk.",
3
+ "version": "1.5.0",
4
+ "description": "Starts the MCP server of the Tisty app installed on this computer. Shared working memory for you and your AI agent: notes, documents and tasks in local Markdown, with ideas too. It works without an agent too, the traditional way.",
5
5
  "mcpName": "io.github.rgdevment/tisty",
6
6
  "type": "module",
7
7
  "bin": {
package/server/launch.mjs CHANGED
@@ -17,6 +17,7 @@ const ASKED = {
17
17
  LOCALAPPDATA: process.env.LOCALAPPDATA,
18
18
  WSL_DISTRO_NAME: process.env.WSL_DISTRO_NAME,
19
19
  };
20
+ const ASKED_HOST = { COPILOT_PLUGIN_ROOT: process.env.COPILOT_PLUGIN_ROOT };
20
21
 
21
22
  /** Where a Tisty install leaves its `tisty` command, most likely first; TISTY_PATH alone when it is set. */
22
23
  export function places({
@@ -166,3 +167,33 @@ export function standIn(looked, input = process.stdin, output = process.stdout)
166
167
  });
167
168
  return lines;
168
169
  }
170
+
171
+ // Copilot runs a Claude plugin's hooks as its own, and Tisty answers in the shape of whoever runs it.
172
+ export function host(asked, env = ASKED_HOST) {
173
+ return env.COPILOT_PLUGIN_ROOT ? "copilot" : asked;
174
+ }
175
+
176
+ export async function hooked(candidates, args, heard, start = spawn) {
177
+ for (const file of candidates) {
178
+ const said = await hookedOnce(file, args, heard, start);
179
+ if (said !== undefined) return said;
180
+ }
181
+ return "";
182
+ }
183
+
184
+ function hookedOnce(file, args, heard, start) {
185
+ return new Promise((done) => {
186
+ let child;
187
+ try {
188
+ child = start(file, args, { stdio: ["pipe", "pipe", "ignore"], windowsHide: true });
189
+ } catch {
190
+ return done(undefined);
191
+ }
192
+ const out = [];
193
+ child.stdout.on("data", (chunk) => out.push(chunk));
194
+ child.on("error", () => done(undefined));
195
+ child.on("close", (code) => done(code === 0 ? Buffer.concat(out).toString("utf8") : undefined));
196
+ child.stdin.on("error", () => {});
197
+ child.stdin.end(heard);
198
+ });
199
+ }