@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/README.md +32 -3
- package/dist/{chunk-V5AQASR7.js → chunk-6C6CO7H3.js} +297 -60
- package/dist/{chunk-7VLZIOLF.js → chunk-6MEUSSRH.js} +71 -2
- package/dist/{chunk-MWHYYLCE.js → chunk-RLN2B5IZ.js} +181 -22
- package/dist/{chunk-UIZLBPRG.js → chunk-YNKTKLQD.js} +19 -1
- package/dist/{dist-PJLF3B27.js → dist-33DA5X2G.js} +7 -1
- package/dist/enable.js +3 -3
- package/dist/index.js +12 -20
- package/dist/listen.js +7 -2
- package/dist/onboard.js +4 -4
- package/dist/slot.js +1 -1
- package/dist/stalled.js +15 -7
- package/dist/statusline.js +1 -1
- package/package.json +1 -1
package/dist/onboard.js
CHANGED
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
resolvePairing,
|
|
4
4
|
startPairing,
|
|
5
5
|
suggestedAgentName
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YNKTKLQD.js";
|
|
7
7
|
import {
|
|
8
8
|
autoConfigureClients,
|
|
9
9
|
claudeInstallHint,
|
|
10
10
|
openBrowser
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
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-
|
|
23
|
+
} from "./chunk-6C6CO7H3.js";
|
|
24
24
|
|
|
25
25
|
// src/onboard.ts
|
|
26
26
|
function reportRegistered() {
|
package/dist/slot.js
CHANGED
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
|
|
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
|
-
|
|
12
|
-
|
|
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-
|
|
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
|
};
|
package/dist/statusline.js
CHANGED
package/package.json
CHANGED