Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5249755
feat: OpenCode plugin with 22 auto-capture hooks (closes #156)
xuli500177 May 8, 2026
da8b09e
fix(plugin): use prompt_submit hookType so sessions get firstPrompt
cl0ckt0wer May 8, 2026
3a0e7a3
fix: address CodeRabbit review feedback on OpenCode plugin
cl0ckt0wer May 8, 2026
c1d9d2d
fix: add language identifier to fenced code block in plugin README
cl0ckt0wer May 8, 2026
fcc93b8
fix: store OpenCode session title as summary/firstPrompt on creation
cl0ckt0wer May 8, 2026
2f35f1d
fix(plugin): add session instruction injection and consolidation pipe…
cl0ckt0wer May 8, 2026
f33c662
fix(plugin): address adversarial code review — 7 critical/high fixes
cl0ckt0wer May 8, 2026
a40b0c0
fix(plugin): scope stashedFiles.delete(sid) not .clear() on session.d…
cl0ckt0wer May 8, 2026
a984765
fix(plugin): address round 2 adversarial review — 3 critical fixes
cl0ckt0wer May 8, 2026
a7182a1
fix(plugin): address round 2 remaining medium issues
cl0ckt0wer May 8, 2026
9035bdb
fix(plugin): address round 3 adversarial review — 10 HIGH/MEDIUM fixes
cl0ckt0wer May 8, 2026
b9998f9
fix(plugin): address round 4 adversarial review — 6 CRITICAL/HIGH fixes
cl0ckt0wer May 8, 2026
1dd3066
fix(plugin): address final adversarial blockers
cl0ckt0wer May 8, 2026
ee9d818
fix(opencode): gate crystallization on CONSOLIDATION_ENABLED, fix old…
cl0ckt0wer May 10, 2026
e0daa96
fix(opencode): add crystallization triggers on session.idle and sessi…
cl0ckt0wer May 10, 2026
a805a7e
feat: auto-create lessons in flow-compress and consolidate, add MCP t…
cl0ckt0wer May 11, 2026
eae69dd
Merge remote-tracking branch 'upstream/main' into feature/lessons-aut…
cl0ckt0wer May 16, 2026
8cdc4ce
feat(mcp): consolidate tool surface
cl0ckt0wer May 16, 2026
af4f76d
fix(governance): soft-delete memories and insights
cl0ckt0wer May 16, 2026
c21c189
feat(actions): suggest follow-up tasks from observations
cl0ckt0wer May 16, 2026
c28b5cb
test: isolate env-backed provider settings
cl0ckt0wer May 16, 2026
14db245
feat(codex): add parity hooks
cl0ckt0wer May 16, 2026
f975268
Merge remote-tracking branch 'upstream/main' into feature/lessons-aut…
cl0ckt0wer May 16, 2026
71239fb
fix(review): address mcp and governance feedback
cl0ckt0wer May 16, 2026
3f77267
fix(governance): batch stale cascade
cl0ckt0wer May 16, 2026
fb1c4b5
fix(mcp): pin shim version
cl0ckt0wer May 17, 2026
9fba9e1
Merge remote-tracking branch 'upstream/main' into feature/lessons-aut…
cl0ckt0wer May 23, 2026
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
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules
dist
coverage
.git
.env
*.log
data
website/node_modules
website/dist
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ Hook scripts in `src/hooks/` are standalone Node.js scripts (no iii-sdk import).
- Test files go in `test/` with `.test.ts` extension
- Follow existing patterns in `test/crystallize.test.ts` for function tests

## Current Stats (v0.9.16)
## Current Stats (v0.9.21)

- 53 MCP tools (8 visible by default, `AGENTMEMORY_TOOLS=all` for all)
- 15 MCP tools (8 visible by default, `AGENTMEMORY_TOOLS=all` for all)
- 124 REST endpoints
- 6 MCP resources, 3 MCP prompts
- 12 hooks, 4 skills
Expand Down
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<p align="center">
<picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-recall.svg"><img src="assets/tags/stat-recall.svg" alt="95.2% retrieval R@5" height="38" /></picture>
<picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-tokens.svg"><img src="assets/tags/stat-tokens.svg" alt="92% fewer tokens" height="38" /></picture>
<picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-tools.svg"><img src="assets/tags/stat-tools.svg" alt="53 MCP tools" height="38" /></picture>
<picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-tools.svg"><img src="assets/tags/stat-tools.svg" alt="15 MCP tools" height="38" /></picture>
<picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-hooks.svg"><img src="assets/tags/stat-hooks.svg" alt="12 auto hooks" height="38" /></picture>
<picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-deps.svg"><img src="assets/tags/stat-deps.svg" alt="0 external DBs" height="38" /></picture>
<picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/stat-tests.svg"><img src="assets/tags/stat-tests.svg" alt="950+ tests passing" height="38" /></picture>
Expand Down Expand Up @@ -412,7 +412,7 @@ Implementation details live in `src/cli.ts` (see `runUpgrade` around the `src/cl
### Claude Code (one block, paste it)

```
Install agentmemory: run `npx @agentmemory/agentmemory` in a separate terminal to start the memory server. Then run `/plugin marketplace add rohitg00/agentmemory` and `/plugin install agentmemory` — the plugin registers all 12 hooks, 4 skills, AND auto-wires the `@agentmemory/mcp` stdio server via its `.mcp.json`, so you get 53 MCP tools (memory_smart_search, memory_save, memory_sessions, memory_governance_delete, etc.) without any extra config step. Verify with `curl http://localhost:3111/agentmemory/health`. The real-time viewer is at http://localhost:3113.
Install agentmemory: run `npx @agentmemory/agentmemory` in a separate terminal to start the memory server. Then run `/plugin marketplace add rohitg00/agentmemory` and `/plugin install agentmemory` — the plugin registers all 12 hooks, 4 skills, AND auto-wires the `@agentmemory/mcp` stdio server via its `.mcp.json`, so you get 15 consolidated MCP tools (memory_search, memory_store, memory_profile, task, task_plan, signal, checkpoint, sketch, memory_commit_lookup, memory_commits, crystal, lesson, insight, slot, admin) with operation sub-dispatch — plus backward-compatible aliases for legacy tool names. Verify with `curl http://localhost:3111/agentmemory/health`. The real-time viewer is at http://localhost:3113.
```

#### Claude Code without the plugin install (MCP-standalone path)
Expand Down Expand Up @@ -441,8 +441,8 @@ codex plugin add agentmemory@agentmemory

The Codex plugin ships from the same `plugin/` directory as the Claude Code plugin. It registers:

- `@agentmemory/mcp` as an MCP server (proxies all 51 tools when `AGENTMEMORY_URL` points at a running agentmemory server; falls back to 7 tools locally when no server is reachable)
- 6 lifecycle hooks: `SessionStart`, `UserPromptSubmit`, `PreToolUse`, `PostToolUse`, `PreCompact`, `Stop`
- `@agentmemory/mcp` as an MCP server (13 consolidated tools when `AGENTMEMORY_TOOLS=all`, plus backward-compatible legacy aliases)
- 8 lifecycle hooks: `SessionStart`, `UserPromptSubmit`, `PreToolUse`, `PostToolUse`, `PermissionRequest`, `PreCompact`, `PostCompact`, `Stop`
- 4 skills: `/recall`, `/remember`, `/session-history`, `/forget`

Codex's hook engine injects `CLAUDE_PLUGIN_ROOT` into hook subprocesses (per [`codex-rs/hooks/src/engine/discovery.rs`](https://github.com/openai/codex/blob/main/codex-rs/hooks/src/engine/discovery.rs)), so the same hook scripts work across both hosts without duplication. Subagent / SessionEnd / Notification / TaskCompleted / PostToolUseFailure events are Claude-Code-only and are not registered for Codex.
Expand All @@ -459,11 +459,13 @@ agentmemory connect codex --with-hooks

This adds an idempotent block to `~/.codex/hooks.json` referencing absolute paths to the bundled scripts (no `${CLAUDE_PLUGIN_ROOT}` expansion needed at user-scope). Re-run the same command after upgrading agentmemory to refresh paths. User entries in the same file are preserved; only previous agentmemory entries are replaced.

Codex parity with the OpenCode plugin covers the hook categories Codex exposes: session start/stop, prompt capture, pre/post tool capture, permission prompts, and pre/post compaction. OpenCode-only SDK events such as `message.part.updated`, `chat.params`, `todo.updated`, `file.edited`, and system-prompt transform injection do not have direct Codex hook equivalents today; Codex gets memory guidance through bundled skills plus the MCP tool descriptions.

<details>
<summary><b>OpenClaw (paste this prompt)</b></summary>

```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add a language identifier to this fenced block.

Use a language tag (for example, text) on this code fence to keep markdown linting clean.

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 431-431: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` at line 431, The fenced code block ending with a plain ```
currently has no language identifier; update that fence to include a language
tag (e.g., ```text or ```bash) so the markdown linter recognizes the block
type—locate the triple-backtick fence in the README and add an appropriate
language identifier after the opening ``` to resolve the lint warning.

Install agentmemory for OpenClaw. Run `npx @agentmemory/agentmemory` in a separate terminal to start the memory server on localhost:3111. Then add this to my OpenClaw MCP config so agentmemory is available with all 51 memory tools:
Install agentmemory for OpenClaw. Run `npx @agentmemory/agentmemory` in a separate terminal to start the memory server on localhost:3111. Then add this to my OpenClaw MCP config so agentmemory is available with the 13 consolidated memory tools:

{
"mcpServers": {
Expand All @@ -488,7 +490,7 @@ Full guide: [`integrations/openclaw/`](integrations/openclaw/)
<summary><b>Hermes Agent (paste this prompt)</b></summary>

```
Install agentmemory for Hermes. Run `npx @agentmemory/agentmemory` in a separate terminal to start the memory server on localhost:3111. Then add this to ~/.hermes/config.yaml so Hermes can use agentmemory as an MCP server with all 51 memory tools:
Install agentmemory for Hermes. Run `npx @agentmemory/agentmemory` in a separate terminal to start the memory server on localhost:3111. Then add this to ~/.hermes/config.yaml so Hermes can use agentmemory as an MCP server with the 13 consolidated memory tools:

mcp_servers:
agentmemory:
Expand Down Expand Up @@ -816,11 +818,11 @@ npm install @xenova/transformers

<h2 id="mcp-server"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/section-mcp.svg"><img src="assets/tags/section-mcp.svg" alt="MCP Server" height="32" /></picture></h2>

53 tools, 6 resources, 3 prompts, and 4 skills — the most comprehensive MCP memory toolkit for any agent.
15 tools, 6 resources, 3 prompts, and 4 skills — the most comprehensive MCP memory toolkit for any agent.

> **MCP shim vs full server:** the published `@agentmemory/mcp` package is a thin shim. It exposes the full 51-tool surface **only when it can reach a running agentmemory server** via `AGENTMEMORY_URL` (proxy mode). With no server reachable, the shim falls back to a 7-tool local set (`memory_save`, `memory_recall`, `memory_smart_search`, `memory_sessions`, `memory_export`, `memory_audit`, `memory_governance_delete`). The `AGENTMEMORY_TOOLS=core|all` env var is a *server-side* flag — setting it in the shim's `env` block has no effect. If you see only 7 tools in Cursor / OpenCode / Gemini CLI, start `npx @agentmemory/agentmemory` (or the Docker stack) and set `AGENTMEMORY_URL=http://localhost:3111`.
> **MCP shim vs full server:** the published `@agentmemory/mcp` package is a thin shim. It exposes the full 15-tool consolidated surface when it can reach a running agentmemory server via `AGENTMEMORY_URL` (proxy mode). With no server reachable, the shim falls back to a minimal local set (`memory_search`, `memory_store`). The `AGENTMEMORY_TOOLS=core|all` env var is a *server-side* flag — setting it in the shim's `env` block has no effect. If you see only the local fallback tools in Cursor / OpenCode / Gemini CLI, start `npx @agentmemory/agentmemory` (or the Docker stack) and set `AGENTMEMORY_URL=http://localhost:3111`.

### 51 Tools
### Consolidated Tools

<details>
<summary>Core tools (always available)</summary>
Expand All @@ -842,7 +844,7 @@ npm install @xenova/transformers
</details>

<details>
<summary>Extended tools (51 total — set AGENTMEMORY_TOOLS=all)</summary>
<summary>Extended operations and legacy aliases — set AGENTMEMORY_TOOLS=all</summary>

| Tool | Description |
|------|-------------|
Expand Down Expand Up @@ -1233,7 +1235,7 @@ Create `~/.agentmemory/.env`:
# USER_ID=
# TEAM_MODE=private

# Tool visibility: "core" (8 tools) or "all" (51 tools)
# Tool visibility: "core" (8 tools) or "all" (15 tools)
# AGENTMEMORY_TOOLS=core
```

Expand Down
2 changes: 1 addition & 1 deletion packages/mcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"homepage": "https://github.com/rohitg00/agentmemory#readme",
"bugs": "https://github.com/rohitg00/agentmemory/issues",
"dependencies": {
"@agentmemory/agentmemory": "~0.9.0"
"@agentmemory/agentmemory": "0.9.21"
},
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion plugin/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "agentmemory",
"version": "0.9.21",
"description": "Persistent memory for AI coding agents -- captures tool usage, compresses via LLM, injects context into future sessions. 12 hooks, 51 MCP tools, 4 skills, real-time viewer.",
"description": "Persistent memory for AI coding agents -- captures tool usage, compresses via LLM, injects context into future sessions. 12 hooks, 15 MCP tools, 4 skills, real-time viewer.",
"author": {
"name": "Rohit Ghumare",
"url": "https://github.com/rohitg00"
Expand Down
2 changes: 1 addition & 1 deletion plugin/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "agentmemory",
"version": "0.9.21",
"description": "Persistent memory for AI coding agents -- captures tool usage, compresses via LLM, injects context into future sessions. 6 hooks, 51 MCP tools, 4 skills, real-time viewer.",
"description": "Persistent memory for AI coding agents -- captures tool usage, compresses via LLM, injects context into future sessions. 6 hooks, 15 MCP tools, 4 skills, real-time viewer.",
"author": {
"name": "Rohit Ghumare",
"url": "https://github.com/rohitg00"
Expand Down
2 changes: 1 addition & 1 deletion plugin/.mcp.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"mcpServers": {
"agentmemory": {
"command": "npx",
"args": ["-y", "@agentmemory/mcp"],
"args": ["-y", "@agentmemory/mcp@0.9.21"],
"env": {
"AGENTMEMORY_URL": "${AGENTMEMORY_URL}",
"AGENTMEMORY_SECRET": "${AGENTMEMORY_SECRET}"
Expand Down
21 changes: 21 additions & 0 deletions plugin/hooks/hooks.codex.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,27 @@
]
}
],
"PostCompact": [
{
"hooks": [
{
"type": "command",
"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/post-compact.mjs\""
}
]
}
],
"PermissionRequest": [
{
"hooks": [
{
"type": "command",
"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/permission-request.mjs\"",
"statusMessage": "agentmemory: capturing permission request"
}
]
}
],
"Stop": [
{
"hooks": [
Expand Down
8 changes: 4 additions & 4 deletions plugin/opencode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</p>

<p align="center">
<img src="https://img.shields.io/badge/MCP-53_tools-1f6feb?style=flat-square" alt="53 MCP tools" />
<img src="https://img.shields.io/badge/MCP-15_tools-1f6feb?style=flat-square" alt="15 MCP tools" />
<img src="https://img.shields.io/badge/Plugin-22_hooks-1f6feb?style=flat-square" alt="22 hooks" />
<img src="https://img.shields.io/badge/Commands-2_slash-1f6feb?style=flat-square" alt="2 slash commands" />
<img src="https://img.shields.io/badge/R@5-95.2%25-00875f?style=flat-square" alt="95.2% R@5" />
Expand Down Expand Up @@ -172,7 +172,7 @@ Claude Code and OpenCode take fundamentally different approaches to injecting me

### Claude Code: file-backed bridge (two-hop)

```
```text
agentmemory ──write──▶ MEMORY.md ──read──▶ Claude system prompt
```

Expand All @@ -183,7 +183,7 @@ agentmemory ──write──▶ MEMORY.md ──read──▶ Claude system

### OpenCode: direct injection (one-hop)

```
```text
agentmemory ──push──▶ OpenCode system prompt
```

Expand Down Expand Up @@ -223,7 +223,7 @@ Agentmemory usage instructions are injected into the system prompt on the first
| TaskCompleted | No team/teammate concept in OpenCode; `todo.updated` captures task state changes as a partial equivalent |
| Stop | `session.compacted` event handler exists; `experimental.session.compacting` injection hook defined in SDK but Go binary (v1.14.41) doesn't wire it — will auto-activate when upstream implements it |
| Skills (remember/recall/forget/session-history) | Covered by injected system instructions via `experimental.chat.system.transform` — agent receives usage guidance on first turn |
| Consolidation pipeline (crystals/auto + consolidate-pipeline) | Now called on `session.deleted` — mirrors Claude's `CONSOLIDATION_ENABLED=true` behavior |
| Consolidation pipeline (crystals/auto + consolidate-pipeline) | Called on `session.deleted` **and** `experimental.session.compacting` when `CONSOLIDATION_ENABLED=true` env var is set; uses `olderThanDays: 0` (crystallize all done work in the session) — mirrors Claude's `CONSOLIDATION_ENABLED=true` behavior |
| Claude MEMORY.md bridge | OpenCode-specific; OpenCode uses its own AGENTS.md mechanism, not Claude's MEMORY.md |

All other Claude Code hooks have direct or pipeline equivalents in this plugin. 12 of 12 Claude hook types covered.
16 changes: 14 additions & 2 deletions plugin/opencode/agentmemory-capture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ export const AgentmemoryCapturePlugin: Plugin = async (ctx) => {
if (!sid || !status) return;
if (status.type === "idle") {
await post("/summarize", { sessionId: sid });
if (process.env["CONSOLIDATION_ENABLED"] === "true") {
post("/crystals/auto", { olderThanDays: 0 }, 30000);
}
}
await observe(sid, "session_status", {
status_type: status.type,
Expand All @@ -214,6 +217,9 @@ export const AgentmemoryCapturePlugin: Plugin = async (ctx) => {
const sid = props.sessionID || activeSessionId;
if (sid) {
await post("/summarize", { sessionId: sid });
if (process.env["CONSOLIDATION_ENABLED"] === "true") {
post("/crystals/auto", { olderThanDays: 0 }, 30000);
}
await observe(sid, "session_compacted", {});
}
}
Expand Down Expand Up @@ -253,8 +259,10 @@ export const AgentmemoryCapturePlugin: Plugin = async (ctx) => {
return;
}
await post("/session/end", { sessionId: sid });
post("/crystals/auto", { olderThanDays: 7 }, 30000);
post("/consolidate-pipeline", { tier: "all", force: true }, 30000);
if (process.env["CONSOLIDATION_ENABLED"] === "true") {
post("/crystals/auto", { olderThanDays: 0 }, 30000);
post("/consolidate-pipeline", { tier: "all", force: true }, 30000);
}
if (sid === activeSessionId) activeSessionId = null;
stashedFiles.delete(sid);
seenSubtaskIds.delete(sid);
Expand Down Expand Up @@ -633,6 +641,10 @@ export const AgentmemoryCapturePlugin: Plugin = async (ctx) => {
output.context.push(ctx);
}
}

if (process.env["CONSOLIDATION_ENABLED"] === "true") {
post("/crystals/auto", { olderThanDays: 0 }, 30000);
}
},

// ── config ──
Expand Down
2 changes: 1 addition & 1 deletion plugin/opencode/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "agentmemory-capture",
"version": "0.9.20",
"description": "OpenCode plugin for agentmemory — full Claude Code hook parity: session lifecycle (create/idle/status/compacted/update/diff/delete/error), messages & prompts (chat.message, message.updated user+assistant, message.removed), tool lifecycle (ToolPart states with timing), part tracking (subtask, step-finish, reasoning, file, patch, compaction, agent, retry), file enrichment pipeline, permissions, task tracking (w/ priority), commands, config & model tracking. 22 hooks, 2 slash commands.",
"description": "OpenCode plugin for agentmemory — full Claude Code hook parity: session lifecycle (create/idle/status/compacted/update/diff/delete/error), messages & prompts (chat.message, message.updated user+assistant, message.removed), tool lifecycle (ToolPart states with timing), part tracking (subtask, step-finish, reasoning, file, patch, compaction, agent, retry), file enrichment pipeline, permissions, task tracking (w/ priority), commands, config & model tracking. 22 hooks, 15 MCP tools, 2 slash commands.",
"author": {
"name": "Rohit Ghumare",
"url": "https://github.com/rohitg00"
Expand Down
63 changes: 63 additions & 0 deletions plugin/scripts/permission-request.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/usr/bin/env node
//#region src/hooks/permission-request.ts
function isSdkChildContext(payload) {
if (process.env["AGENTMEMORY_SDK_CHILD"] === "1") return true;
if (!payload || typeof payload !== "object") return false;
return payload.entrypoint === "sdk-ts";
}
const REST_URL = process.env["AGENTMEMORY_URL"] || "http://localhost:3111";
const SECRET = process.env["AGENTMEMORY_SECRET"] || "";
function authHeaders() {
const h = { "Content-Type": "application/json" };
if (SECRET) h["Authorization"] = `Bearer ${SECRET}`;
return h;
}
function asText(value, max) {
if (typeof value === "string") return value.slice(0, max);
if (value == null) return "";
try {
return JSON.stringify(value).slice(0, max);
} catch {
return String(value).slice(0, max);
}
}
async function main() {
let input = "";
for await (const chunk of process.stdin) input += chunk;
let data;
try {
data = JSON.parse(input);
} catch {
return;
}
if (isSdkChildContext(data)) return;
const sessionId = data.session_id || "unknown";
const cwd = data.cwd || process.cwd();
try {
await fetch(`${REST_URL}/agentmemory/observe`, {
method: "POST",
headers: authHeaders(),
body: JSON.stringify({
hookType: "notification",
sessionId,
project: cwd,
cwd,
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
data: {
notification_type: "permission_request",
tool_name: data.tool_name,
tool_input: asText(data.tool_input, 4e3),
permission: data.permission || data.permission_type || data.action || null,
title: data.title || data.tool_name || "Permission request",
message: asText(data.message || data.reason || data, 4e3)
}
}),
signal: AbortSignal.timeout(3e3)
});
} catch {}
}
main();

//#endregion
export { };
//# sourceMappingURL=permission-request.mjs.map
Loading