Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions plugin/scripts/notification.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/usr/bin/env node
import { execSync } from "node:child_process";
import { basename } from "node:path";

import { basename, join } from "node:path";
import dotenv from "dotenv";
import { homedir } from "node:os";
//#region src/hooks/_env.ts
dotenv.config({
path: join(homedir(), ".agentmemory", ".env"),
quiet: true
});
//#endregion
//#region src/hooks/_project.ts
function resolveProject(cwd) {
const explicit = process.env["AGENTMEMORY_PROJECT_NAME"];
Expand All @@ -21,7 +28,6 @@ function resolveProject(cwd) {
} catch {}
return basename(dir);
}

//#endregion
//#region src/hooks/notification.ts
function isSdkChildContext(payload) {
Expand Down Expand Up @@ -70,7 +76,7 @@ async function main() {
setTimeout(() => process.exit(0), 500).unref();
}
main();

//#endregion
export { };
export {};

//# sourceMappingURL=notification.mjs.map
14 changes: 11 additions & 3 deletions plugin/scripts/post-commit.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
#!/usr/bin/env node
import dotenv from "dotenv";
import { homedir } from "node:os";
import { join } from "node:path";
import { execFile } from "node:child_process";
import { promisify } from "node:util";

//#region src/hooks/_env.ts
dotenv.config({
path: join(homedir(), ".agentmemory", ".env"),
quiet: true
});
//#endregion
//#region src/hooks/post-commit.ts
const exec = promisify(execFile);
function isSdkChildContext(payload) {
Expand Down Expand Up @@ -96,7 +104,7 @@ async function main() {
} catch {}
}
main();

//#endregion
export { };
export {};

//# sourceMappingURL=post-commit.mjs.map
16 changes: 11 additions & 5 deletions plugin/scripts/post-tool-failure.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/usr/bin/env node
import { execSync } from "node:child_process";
import { basename } from "node:path";

import { basename, join } from "node:path";
import dotenv from "dotenv";
import { homedir } from "node:os";
//#region src/hooks/_env.ts
dotenv.config({
path: join(homedir(), ".agentmemory", ".env"),
quiet: true
});
//#endregion
//#region src/hooks/_project.ts
function resolveProject(cwd) {
const explicit = process.env["AGENTMEMORY_PROJECT_NAME"];
Expand All @@ -21,7 +28,6 @@ function resolveProject(cwd) {
} catch {}
return basename(dir);
}

//#endregion
//#region src/hooks/post-tool-failure.ts
function isSdkChildContext(payload) {
Expand Down Expand Up @@ -71,7 +77,7 @@ async function main() {
setTimeout(() => process.exit(0), 500).unref();
}
main();

//#endregion
export { };
export {};

//# sourceMappingURL=post-tool-failure.mjs.map
16 changes: 11 additions & 5 deletions plugin/scripts/post-tool-use.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/usr/bin/env node
import { execSync } from "node:child_process";
import { basename } from "node:path";

import { basename, join } from "node:path";
import dotenv from "dotenv";
import { homedir } from "node:os";
//#region src/hooks/_env.ts
dotenv.config({
path: join(homedir(), ".agentmemory", ".env"),
quiet: true
});
//#endregion
//#region src/hooks/_project.ts
function resolveProject(cwd) {
const explicit = process.env["AGENTMEMORY_PROJECT_NAME"];
Expand All @@ -21,7 +28,6 @@ function resolveProject(cwd) {
} catch {}
return basename(dir);
}

//#endregion
//#region src/hooks/post-tool-use.ts
function isSdkChildContext(payload) {
Expand Down Expand Up @@ -116,7 +122,7 @@ function truncate(value, max) {
return value;
}
main();

//#endregion
export { };
export {};

//# sourceMappingURL=post-tool-use.mjs.map
16 changes: 11 additions & 5 deletions plugin/scripts/pre-compact.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/usr/bin/env node
import { execSync } from "node:child_process";
import { basename } from "node:path";

import { basename, join } from "node:path";
import dotenv from "dotenv";
import { homedir } from "node:os";
//#region src/hooks/_env.ts
dotenv.config({
path: join(homedir(), ".agentmemory", ".env"),
quiet: true
});
//#endregion
Comment thread
coderabbitai[bot] marked this conversation as resolved.
//#region src/hooks/_project.ts
function resolveProject(cwd) {
const explicit = process.env["AGENTMEMORY_PROJECT_NAME"];
Expand All @@ -21,7 +28,6 @@ function resolveProject(cwd) {
} catch {}
return basename(dir);
}

//#endregion
//#region src/hooks/pre-compact.ts
function isSdkChildContext(payload) {
Expand Down Expand Up @@ -74,7 +80,7 @@ async function main() {
} catch {}
}
main();

//#endregion
export { };
export {};

//# sourceMappingURL=pre-compact.mjs.map
13 changes: 11 additions & 2 deletions plugin/scripts/pre-tool-use.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
#!/usr/bin/env node
import dotenv from "dotenv";
import { homedir } from "node:os";
import { join } from "node:path";
//#region src/hooks/_env.ts
dotenv.config({
path: join(homedir(), ".agentmemory", ".env"),
quiet: true
});
//#endregion
//#region src/hooks/pre-tool-use.ts
function isSdkChildContext(payload) {
if (process.env["AGENTMEMORY_SDK_CHILD"] === "1") return true;
Expand Down Expand Up @@ -78,7 +87,7 @@ async function main() {
} catch {}
}
main();

//#endregion
export { };
export {};

//# sourceMappingURL=pre-tool-use.mjs.map
16 changes: 11 additions & 5 deletions plugin/scripts/prompt-submit.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/usr/bin/env node
import { execSync } from "node:child_process";
import { basename } from "node:path";

import { basename, join } from "node:path";
import dotenv from "dotenv";
import { homedir } from "node:os";
//#region src/hooks/_env.ts
dotenv.config({
path: join(homedir(), ".agentmemory", ".env"),
quiet: true
});
//#endregion
//#region src/hooks/_project.ts
function resolveProject(cwd) {
const explicit = process.env["AGENTMEMORY_PROJECT_NAME"];
Expand All @@ -21,7 +28,6 @@ function resolveProject(cwd) {
} catch {}
return basename(dir);
}

//#endregion
//#region src/hooks/prompt-submit.ts
function isSdkChildContext(payload) {
Expand Down Expand Up @@ -63,7 +69,7 @@ async function main() {
setTimeout(() => process.exit(0), 500).unref();
}
main();

//#endregion
export { };
export {};

//# sourceMappingURL=prompt-submit.mjs.map
13 changes: 11 additions & 2 deletions plugin/scripts/session-end.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
#!/usr/bin/env node
import dotenv from "dotenv";
import { homedir } from "node:os";
import { join } from "node:path";
//#region src/hooks/_env.ts
dotenv.config({
path: join(homedir(), ".agentmemory", ".env"),
quiet: true
});
//#endregion
//#region src/hooks/session-end.ts
function isSdkChildContext(payload) {
if (process.env["AGENTMEMORY_SDK_CHILD"] === "1") return true;
Expand Down Expand Up @@ -54,7 +63,7 @@ async function main() {
setTimeout(() => process.exit(0), 1500).unref();
}
main();

//#endregion
export { };
export {};

//# sourceMappingURL=session-end.mjs.map
16 changes: 11 additions & 5 deletions plugin/scripts/session-start.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/usr/bin/env node
import { execSync } from "node:child_process";
import { basename } from "node:path";

import { basename, join } from "node:path";
import dotenv from "dotenv";
import { homedir } from "node:os";
//#region src/hooks/_env.ts
dotenv.config({
path: join(homedir(), ".agentmemory", ".env"),
quiet: true
});
//#endregion
//#region src/hooks/_project.ts
function resolveProject(cwd) {
const explicit = process.env["AGENTMEMORY_PROJECT_NAME"];
Expand All @@ -21,7 +28,6 @@ function resolveProject(cwd) {
} catch {}
return basename(dir);
}

//#endregion
//#region src/hooks/session-start.ts
function isSdkChildContext(payload) {
Expand Down Expand Up @@ -81,7 +87,7 @@ async function main() {
} catch {}
}
main();

//#endregion
export { };
export {};

//# sourceMappingURL=session-start.mjs.map
13 changes: 11 additions & 2 deletions plugin/scripts/stop.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
#!/usr/bin/env node
import dotenv from "dotenv";
import { homedir } from "node:os";
import { join } from "node:path";
//#region src/hooks/_env.ts
dotenv.config({
path: join(homedir(), ".agentmemory", ".env"),
quiet: true
});
//#endregion
//#region src/hooks/stop.ts
function isSdkChildContext(payload) {
if (process.env["AGENTMEMORY_SDK_CHILD"] === "1") return true;
Expand Down Expand Up @@ -38,7 +47,7 @@ async function main() {
setTimeout(() => process.exit(0), 1500).unref();
}
main();

//#endregion
export { };
export {};

//# sourceMappingURL=stop.mjs.map
16 changes: 11 additions & 5 deletions plugin/scripts/subagent-start.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/usr/bin/env node
import { execSync } from "node:child_process";
import { basename } from "node:path";

import { basename, join } from "node:path";
import dotenv from "dotenv";
import { homedir } from "node:os";
//#region src/hooks/_env.ts
dotenv.config({
path: join(homedir(), ".agentmemory", ".env"),
quiet: true
});
//#endregion
//#region src/hooks/_project.ts
function resolveProject(cwd) {
const explicit = process.env["AGENTMEMORY_PROJECT_NAME"];
Expand All @@ -21,7 +28,6 @@ function resolveProject(cwd) {
} catch {}
return basename(dir);
}

//#endregion
//#region src/hooks/subagent-start.ts
function isSdkChildContext(payload) {
Expand Down Expand Up @@ -69,7 +75,7 @@ async function main() {
setTimeout(() => process.exit(0), 500).unref();
}
main();

//#endregion
export { };
export {};

//# sourceMappingURL=subagent-start.mjs.map
16 changes: 11 additions & 5 deletions plugin/scripts/subagent-stop.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/usr/bin/env node
import { execSync } from "node:child_process";
import { basename } from "node:path";

import { basename, join } from "node:path";
import dotenv from "dotenv";
import { homedir } from "node:os";
//#region src/hooks/_env.ts
dotenv.config({
path: join(homedir(), ".agentmemory", ".env"),
quiet: true
});
//#endregion
//#region src/hooks/_project.ts
function resolveProject(cwd) {
const explicit = process.env["AGENTMEMORY_PROJECT_NAME"];
Expand All @@ -21,7 +28,6 @@ function resolveProject(cwd) {
} catch {}
return basename(dir);
}

//#endregion
//#region src/hooks/subagent-stop.ts
function isSdkChildContext(payload) {
Expand Down Expand Up @@ -70,7 +76,7 @@ async function main() {
setTimeout(() => process.exit(0), 500).unref();
}
main();

//#endregion
export { };
export {};

//# sourceMappingURL=subagent-stop.mjs.map
Loading