Skip to content

Feat/openclaw login command#39

Open
kaghni wants to merge 10 commits intomainfrom
feat/openclaw-login-command
Open

Feat/openclaw login command#39
kaghni wants to merge 10 commits intomainfrom
feat/openclaw-login-command

Conversation

@kaghni
Copy link
Copy Markdown
Collaborator

@kaghni kaghni commented Apr 11, 2026

Summary

Version Bump

To trigger a release, bump "version" in package.json before merging.

Change type Version bump Example
Bug fix patch (1.2.0 → 1.2.1) "version": "1.2.1"
New feature minor (1.2.0 → 1.3.0) "version": "1.3.0"
Breaking change major (1.2.0 → 2.0.0) "version": "2.0.0"

If you don't bump the version, no release will be created.

Test plan

  • Tests pass locally (npm test)
  • Relevant new tests added
  • Version bumped in package.json, or no release needed for this change

kaghni and others added 6 commits April 10, 2026 17:07
… 0.6.10

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Track which agent (claude_code, codex, openclaw) generated each event.
The column is included in CREATE TABLE schema for both memory and
sessions tables, and populated in all INSERT statements.
- Use same sessions table schema as CC (id, path, filename, message JSONB,
  author, size_bytes, project, description, agent, creation_date, last_update_date)
- Use buildSessionPath() with same convention as CC
- Set agent='openclaw' on all captured events
- Fix SQL quoting (wrap sqlStr() in single quotes)
- Delete credentials.ts and memory.ts (replaced by shared src/)
- Add child_process stub in esbuild for OpenClaw build
- Rebuild CC bundles with agent column
…ommand

# Conflicts:
#	CLAUDE.md
#	claude-code/.claude-plugin/plugin.json
#	esbuild.config.mjs
Add /hivemind_login step and explain auto-recall/capture behavior.
Note shared sessions table across all platforms.
@claude
Copy link
Copy Markdown

claude bot commented Apr 11, 2026

Claude finished @kaghni's task in 1m 44s —— View job


Left 2 inline comments on openclaw/src/index.ts:

  • Line 216sqlStr used in ILIKE pattern doesn't escape %/_ wildcards → use sqlLike to prevent a prompt containing % from matching all stored memories
  • Line 283 — manual replace(/'/g, "''") misses backslash escaping → use sqlStr(line) for consistency and correctness

const results = allResults.slice(0, 5);
// Search sessions table — cast JSONB message to text for keyword search
const results = await dl.query(
`SELECT path, message FROM "${sessionsTable}" WHERE message::text ILIKE '%${sqlStr(words[0])}%' ORDER BY creation_date DESC LIMIT 5`
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

sqlStr doesn't escape % and _ LIKE metacharacters — a user prompt containing % matches every row in the sessions table, leaking all stored memories into the AI context. Use sqlLike instead (also import it alongside sqlStr).

Suggested change
`SELECT path, message FROM "${sessionsTable}" WHERE message::text ILIKE '%${sqlStr(words[0])}%' ORDER BY creation_date DESC LIMIT 5`
`SELECT path, message FROM "${sessionsTable}" WHERE message::text ILIKE '%${sqlLike(words[0])}%' ORDER BY creation_date DESC LIMIT 5`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants