Repository navigation
feat: auto-create lessons in flow-compress, consolidate, and new MCP tools #279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
cl0ckt0wer
wants to merge
27
commits into
rohitg00:main
Choose a base branch
from
cl0ckt0wer:feature/lessons-auto-creation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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 da8b09e
fix(plugin): use prompt_submit hookType so sessions get firstPrompt
cl0ckt0wer 3a0e7a3
fix: address CodeRabbit review feedback on OpenCode plugin
cl0ckt0wer c1d9d2d
fix: add language identifier to fenced code block in plugin README
cl0ckt0wer fcc93b8
fix: store OpenCode session title as summary/firstPrompt on creation
cl0ckt0wer 2f35f1d
fix(plugin): add session instruction injection and consolidation pipe…
cl0ckt0wer f33c662
fix(plugin): address adversarial code review — 7 critical/high fixes
cl0ckt0wer a40b0c0
fix(plugin): scope stashedFiles.delete(sid) not .clear() on session.d…
cl0ckt0wer a984765
fix(plugin): address round 2 adversarial review — 3 critical fixes
cl0ckt0wer a7182a1
fix(plugin): address round 2 remaining medium issues
cl0ckt0wer 9035bdb
fix(plugin): address round 3 adversarial review — 10 HIGH/MEDIUM fixes
cl0ckt0wer b9998f9
fix(plugin): address round 4 adversarial review — 6 CRITICAL/HIGH fixes
cl0ckt0wer 1dd3066
fix(plugin): address final adversarial blockers
cl0ckt0wer ee9d818
fix(opencode): gate crystallization on CONSOLIDATION_ENABLED, fix old…
cl0ckt0wer e0daa96
fix(opencode): add crystallization triggers on session.idle and sessi…
cl0ckt0wer a805a7e
feat: auto-create lessons in flow-compress and consolidate, add MCP t…
cl0ckt0wer eae69dd
Merge remote-tracking branch 'upstream/main' into feature/lessons-aut…
cl0ckt0wer 8cdc4ce
feat(mcp): consolidate tool surface
cl0ckt0wer af4f76d
fix(governance): soft-delete memories and insights
cl0ckt0wer c21c189
feat(actions): suggest follow-up tasks from observations
cl0ckt0wer c28b5cb
test: isolate env-backed provider settings
cl0ckt0wer 14db245
feat(codex): add parity hooks
cl0ckt0wer f975268
Merge remote-tracking branch 'upstream/main' into feature/lessons-aut…
cl0ckt0wer 71239fb
fix(review): address mcp and governance feedback
cl0ckt0wer 3f77267
fix(governance): batch stale cascade
cl0ckt0wer fb1c4b5
fix(mcp): pin shim version
cl0ckt0wer 9fba9e1
Merge remote-tracking branch 'upstream/main' into feature/lessons-aut…
cl0ckt0wer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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