@paigy/mcp 0.40.17 → 0.40.20

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/dist/onboard.js CHANGED
@@ -3,13 +3,13 @@ import {
3
3
  resolvePairing,
4
4
  startPairing,
5
5
  suggestedAgentName
6
- } from "./chunk-UIZLBPRG.js";
6
+ } from "./chunk-YNKTKLQD.js";
7
7
  import {
8
8
  autoConfigureClients,
9
9
  claudeInstallHint,
10
10
  openBrowser
11
- } from "./chunk-7VLZIOLF.js";
12
- import "./chunk-MWHYYLCE.js";
11
+ } from "./chunk-6MEUSSRH.js";
12
+ import "./chunk-RLN2B5IZ.js";
13
13
  import {
14
14
  TOKEN_PATH,
15
15
  agentName,
@@ -20,7 +20,7 @@ import {
20
20
  saveToken,
21
21
  setIdentity,
22
22
  whoAmI
23
- } from "./chunk-V5AQASR7.js";
23
+ } from "./chunk-6C6CO7H3.js";
24
24
 
25
25
  // src/onboard.ts
26
26
  function reportRegistered() {
package/dist/slot.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  agentName
4
- } from "./chunk-V5AQASR7.js";
4
+ } from "./chunk-6C6CO7H3.js";
5
5
 
6
6
  // src/slot.ts
7
7
  process.stdout.write(agentName());
package/dist/stalled.js CHANGED
@@ -4,26 +4,33 @@
4
4
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
5
5
  import { homedir } from "os";
6
6
  import { join } from "path";
7
- function stopReply(stalled) {
7
+ function agentFlag(argv) {
8
+ const inline = argv.find((arg) => arg.startsWith("--agent="));
9
+ if (inline) return inline.slice("--agent=".length) || null;
10
+ const at = argv.indexOf("--agent");
11
+ if (at === -1) return null;
12
+ return argv[at + 1] ?? null;
13
+ }
14
+ function stopReply(stalled, event = "Stop") {
8
15
  if (!stalled.length) return null;
9
16
  const list = stalled.slice(0, 8).map((g) => `"${g.title}" (${g.goalId})`).join(", ");
10
17
  const more = stalled.length > 8 ? ` and ${stalled.length - 8} more` : "";
11
- return {
12
- decision: "block",
13
- reason: `Before you stop: ${stalled.length} of your Paigy Goals have had no progress for 3 days: ${list}${more}. For each, update_goal with progress, finish it, or cancel it.`
14
- };
18
+ const reason = `Before you stop: ${stalled.length} of your Paigy Goals have had no progress for 3 days: ${list}${more}. For each, update_goal with progress, finish it, or cancel it.`;
19
+ return event === "AfterAgent" ? { decision: "block", reason, systemMessage: reason } : { decision: "block", reason };
15
20
  }
16
21
  async function main() {
17
22
  const input = JSON.parse(readFileSync(0, "utf8") || "{}");
18
23
  if (input.stop_hook_active) return;
19
24
  const session = input.session_id ?? "";
20
25
  if (session) process.env.PAIGY_SESSION_ID = session;
26
+ const slot = agentFlag(process.argv);
27
+ if (slot && !process.env.PAIGY_AGENT) process.env.PAIGY_AGENT = slot;
21
28
  const day = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
22
29
  const dir = join(homedir(), ".paigy", "stalled-reminded");
23
30
  const mark = join(dir, `${session || "session"}-${day}`);
24
31
  if (existsSync(mark)) return;
25
- const { checkReplies } = await import("./dist-PJLF3B27.js");
26
- const reply = stopReply((await checkReplies()).stalled ?? []);
32
+ const { checkReplies } = await import("./dist-33DA5X2G.js");
33
+ const reply = stopReply((await checkReplies()).stalled ?? [], input.hook_event_name ?? "Stop");
27
34
  if (!reply) return;
28
35
  mkdirSync(dir, { recursive: true });
29
36
  writeFileSync(mark, "");
@@ -31,5 +38,6 @@ async function main() {
31
38
  }
32
39
  if (process.argv[1] && /stalled(\.[jt]s)?$/.test(process.argv[1])) main().catch(() => void 0);
33
40
  export {
41
+ agentFlag,
34
42
  stopReply
35
43
  };
@@ -7,7 +7,7 @@ import {
7
7
  readToken,
8
8
  sessionSlot,
9
9
  slotName
10
- } from "./chunk-V5AQASR7.js";
10
+ } from "./chunk-6C6CO7H3.js";
11
11
 
12
12
  // src/statusline.ts
13
13
  import { realpathSync } from "fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paigy/mcp",
3
- "version": "0.40.17",
3
+ "version": "0.40.20",
4
4
  "description": "Paigy MCP server — the AI agent harness that calls you. Lets an agent notify a user and await their reply.",
5
5
  "license": "MIT",
6
6
  "type": "module",