-
Notifications
You must be signed in to change notification settings - Fork 11
branch v0.6.7 cycle #104
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
branch v0.6.7 cycle #104
Changes from all commits
59dc616
b3a5f4f
ba44096
5fd2b22
6ae4a84
99ab6d3
cb05f9e
8372a7d
a5bd696
352201e
8ff19a8
837af90
66b8206
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "name": "nowledge-community", | ||
| "owner": { | ||
| "name": "Nowledge Labs", | ||
| "email": "hello@nowledge-labs.ai" | ||
| }, | ||
| "metadata": { | ||
| "description": "Official Cursor plugins from Nowledge Labs." | ||
| }, | ||
| "plugins": [ | ||
| { | ||
| "name": "nowledge-mem", | ||
| "source": "./nowledge-mem-cursor-plugin", | ||
| "description": "Bring Working Memory, memory recall, and handoff summaries into Cursor with Nowledge Mem." | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| name: Release Gemini Extension | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'nowledge-mem-gemini-cli-extension-v*' | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: nowledge-mem-gemini-cli-extension | ||
|
|
||
| steps: | ||
| - name: Check out repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
|
|
||
| - name: Resolve release metadata | ||
| id: release_meta | ||
| run: | | ||
| VERSION=$(node -p "require('./package.json').version") | ||
| EXPECTED_TAG="nowledge-mem-gemini-cli-extension-v${VERSION}" | ||
| if [ "${GITHUB_REF_NAME}" != "${EXPECTED_TAG}" ]; then | ||
| echo "Tag ${GITHUB_REF_NAME} does not match package version ${VERSION}" >&2 | ||
| exit 1 | ||
| fi | ||
| echo "version=${VERSION}" >> "$GITHUB_OUTPUT" | ||
| echo "expected_tag=${EXPECTED_TAG}" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Validate extension package | ||
| run: npm run validate | ||
|
|
||
| - name: Build release archive | ||
| run: npm run package:release | ||
|
|
||
| - name: Create GitHub Release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| name: Nowledge Mem Gemini CLI Extension v${{ steps.release_meta.outputs.version }} | ||
| body_path: nowledge-mem-gemini-cli-extension/release-notes/${{ steps.release_meta.outputs.version }}.md | ||
| files: | | ||
| nowledge-mem-gemini-cli-extension/dist/nowledge-mem-gemini-cli-extension.tar.gz | ||
| nowledge-mem-gemini-cli-extension/dist/nowledge-mem-gemini-cli-extension.tar.gz.sha256 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| name: Validate Gemini Extension | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - 'nowledge-mem-gemini-cli-extension/**' | ||
| - '.github/workflows/validate-gemini-extension.yml' | ||
| - '.github/workflows/release-gemini-extension.yml' | ||
| push: | ||
| branches: | ||
| - main | ||
| - dev | ||
| paths: | ||
| - 'nowledge-mem-gemini-cli-extension/**' | ||
| - '.github/workflows/validate-gemini-extension.yml' | ||
| - '.github/workflows/release-gemini-extension.yml' | ||
|
|
||
| jobs: | ||
| validate: | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: nowledge-mem-gemini-cli-extension | ||
|
|
||
| steps: | ||
| - name: Check out repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
|
|
||
| - name: Validate extension package | ||
| run: npm run validate | ||
|
|
||
| - name: Verify release packaging | ||
| run: npm run package:release |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| --- | ||
| title: Python Async Patterns | ||
| source: chatgpt | ||
| date: 2025-06-15 | ||
| --- | ||
|
|
||
| ## System | ||
|
|
||
| You are a senior Python developer. Explain concepts clearly with practical examples. | ||
|
|
||
| ## User | ||
|
|
||
| I keep getting confused about when to use `asyncio.gather` vs `asyncio.create_task`. What's the difference? | ||
|
|
||
| ## Assistant | ||
|
|
||
| They serve different purposes: | ||
|
|
||
| **`asyncio.gather(*coros)`** runs multiple coroutines concurrently and waits for all of them to complete. It returns results in the same order you passed them: | ||
|
|
||
| ```python | ||
| async def fetch_all(): | ||
| user, posts, comments = await asyncio.gather( | ||
| fetch_user(1), | ||
| fetch_posts(1), | ||
| fetch_comments(1), | ||
| ) | ||
| return user, posts, comments | ||
| ``` | ||
|
|
||
| **`asyncio.create_task(coro)`** schedules a coroutine to run in the background. You get a `Task` object back and can await it later — or never: | ||
|
|
||
| ```python | ||
| async def process(): | ||
| # Fire and forget — runs in background | ||
| task = asyncio.create_task(send_analytics()) | ||
|
|
||
| # Do other work while analytics sends | ||
| result = await compute_something() | ||
|
|
||
| # Optionally await if you need the result | ||
| await task | ||
| ``` | ||
|
|
||
| **Rule of thumb:** | ||
| - Use `gather` when you need all results before continuing | ||
| - Use `create_task` when you want fire-and-forget or need to start work early | ||
|
|
||
| ## User | ||
|
|
||
| What about error handling? If one task in `gather` fails, do the others keep running? | ||
|
|
||
| ## Assistant | ||
|
|
||
| By default, if any coroutine in `gather` raises an exception, the exception propagates immediately — but the other tasks **keep running** in the background. This is a common source of bugs. | ||
|
|
||
| You can change this with `return_exceptions=True`: | ||
|
|
||
| ```python | ||
| results = await asyncio.gather( | ||
| risky_operation_1(), | ||
| risky_operation_2(), | ||
| return_exceptions=True, | ||
| ) | ||
|
|
||
| for result in results: | ||
| if isinstance(result, Exception): | ||
| logger.error(f"Task failed: {result}") | ||
| else: | ||
| process(result) | ||
| ``` | ||
|
|
||
| For `create_task`, unhandled exceptions are logged as warnings when the task is garbage-collected. Always either `await` the task or add an explicit error handler: | ||
|
|
||
| ```python | ||
| task = asyncio.create_task(background_work()) | ||
| task.add_done_callback(handle_task_exception) | ||
| ``` |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,8 +4,9 @@ | |||||||
| "url": "http://localhost:14242/mcp", | ||||||||
| "type": "streamableHttp", | ||||||||
| "headers": { | ||||||||
| "APP": "<MCP Client App Name here>" | ||||||||
| "APP": "<MCP Client App Name here>", | ||||||||
| "X-NMEM-API-Key": "nmem_..." | ||||||||
|
Comment on lines
+7
to
+8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don’t put API-key slots in a tracked MCP config. Even with a placeholder value, this nudges users to paste a live 🔐 Suggested change "headers": {
- "APP": "<MCP Client App Name here>",
- "X-NMEM-API-Key": "nmem_..."
+ "APP": "<MCP Client App Name here>"
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||
| } | ||||||||
| } | ||||||||
| } | ||||||||
| } | ||||||||
| } | ||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| __pycache__/ | ||
| *.pyc | ||
| .venv/ | ||
| dist/ | ||
| *.egg-info/ | ||
| data/ | ||
| results/ | ||
| .env |
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.
🧩 Analysis chain
🏁 Script executed:
Repository: nowledge-co/community
Length of output: 594
Inline README example is missing required authentication headers.
The
nowledge-memserver configuration in the README (lines 34–47) omits theheadersobject present inmcp.json. Users copying this snippet will be missing the requiredAPPandX-NMEM-API-Keyfields, causing MCP setup to fail.Add the
headersfield to the inline example:{ "mcpServers": { "nowledge-mem": { "url": "http://localhost:14242/mcp", "type": "streamableHttp", "headers": { "APP": "<MCP Client App Name here>", "X-NMEM-API-Key": "nmem_..." } } } }Alternatively, remove the JSON snippet and direct readers to copy from
mcp.jsondirectly.🤖 Prompt for AI Agents