Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
70a7046
chore: Add external/ to gitignore
jonathanpeterwu Jan 21, 2026
85c5435
0.5.1
jonathanpeterwu Jan 21, 2026
1f5916e
chore: Release v0.5.1 - Clean dependencies
jonathanpeterwu Jan 21, 2026
3c61615
feat: Implement hybrid auto-start architecture with session daemon
jonathanpeterwu Jan 21, 2026
7740697
feat: Add high-efficacy enhanced handoff system
jonathanpeterwu Jan 21, 2026
ed7445d
chore: Make enhanced handoff the default
jonathanpeterwu Jan 22, 2026
d7ffccb
fix: Dynamic path resolution and review feedback persistence
jonathanpeterwu Jan 22, 2026
486b10c
feat: Add handoff versioning, decision history, and accurate tokeniza…
jonathanpeterwu Jan 22, 2026
dbe9cdd
feat: Add memory command as alias for decision
jonathanpeterwu Jan 22, 2026
e95d7c8
feat: Add Sweep 1.5B next-edit prediction addon
jonathanpeterwu Jan 22, 2026
3dc4cf0
chore: Release v0.5.2 - Add Sweep addon
jonathanpeterwu Jan 22, 2026
f83a1d8
fix: Add sweep CLI tests and fix integration test timeouts
jonathanpeterwu Jan 22, 2026
c376c6c
chore: Release v0.5.3 - Add sweep tests, fix timeouts
jonathanpeterwu Jan 22, 2026
8986333
feat: Add Sweep prediction hook for Claude Code
jonathanpeterwu Jan 22, 2026
d2d52f1
feat: Add sweep hook CLI command and improve hook behavior
jonathanpeterwu Jan 22, 2026
24fef11
feat: Add API skill with OpenAPI/Restish integration
jonathanpeterwu Jan 24, 2026
6093a10
fix: Update test expectations for api skill and increase CLI test tim…
jonathanpeterwu Jan 24, 2026
906df8f
feat: Add process cleanup utility and API skill tests
jonathanpeterwu Jan 25, 2026
7bac72c
fix: Add ESM banner for __dirname/__filename compatibility
jonathanpeterwu Jan 25, 2026
b5c6dbd
chore: bump version to 0.5.6
jonathanpeterwu Jan 25, 2026
6db88fe
feat: Add auto-background hook for long-running commands
jonathanpeterwu Jan 25, 2026
5bb1e1c
chore: bump version to 0.5.7
jonathanpeterwu Jan 25, 2026
9b47b69
feat: Add SMS notification hook for review alerts
jonathanpeterwu Jan 25, 2026
7600626
chore: bump version to 0.5.8
jonathanpeterwu Jan 25, 2026
9690c4f
feat: Add SMS response action queue and hooks
jonathanpeterwu Jan 25, 2026
a221860
chore: bump version to 0.5.9
jonathanpeterwu Jan 25, 2026
3413169
feat: Add WhatsApp/SMS dual-channel support for notifications
jonathanpeterwu Jan 25, 2026
53c8278
feat: Add webhook setup scripts and status callback endpoint
jonathanpeterwu Jan 25, 2026
fe404ae
chore: bump version to 0.5.11
jonathanpeterwu Jan 25, 2026
b230fb6
feat: Auto-start webhook/ngrok on CLI startup + add notifications spec
jonathanpeterwu Jan 25, 2026
bb31918
chore: bump to 0.5.12
jonathanpeterwu Jan 25, 2026
4163ee4
feat: Add settings command and .env loading for notifications
jonathanpeterwu Jan 25, 2026
21acd3a
chore: bump to 0.5.13
jonathanpeterwu Jan 25, 2026
2f363c7
feat: Auto-execute actions on SMS response + check command
jonathanpeterwu Jan 25, 2026
db4ef2f
chore: bump to 0.5.14
jonathanpeterwu Jan 25, 2026
80fa3d7
fix: Read version from package.json instead of hardcoding
jonathanpeterwu Jan 25, 2026
3205e0b
chore: bump to 0.5.15
jonathanpeterwu Jan 25, 2026
4684ece
feat(hooks): Add AskUserQuestion notifications + WhatsApp support
jonathanpeterwu Jan 25, 2026
2e5acfb
fix(hooks): Write pending prompts to correct config location
jonathanpeterwu Jan 25, 2026
d6d8f46
Merge main into swarm/developer-implement-core-feature
jonathanpeterwu Jan 25, 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
2 changes: 1 addition & 1 deletion .claude/claude.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"includeCoAuthoredBy": true,
"includeCoAuthoredBy": false,
"env": {
"INSIDE_CLAUDE_CODE": "1",
"BASH_DEFAULT_TIMEOUT_MS": "420000",
Expand Down
72 changes: 72 additions & 0 deletions .claude/commands/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# /api - OpenAPI-Based API Access

Execute API calls using OpenAPI specifications via Restish.

## Usage

```bash
# Register an API
stackmemory api add <name> <base-url> [--spec <openapi-url>] [--auth-type api-key]

# List registered APIs
stackmemory api list

# Execute API call
stackmemory api exec <name> <path> [--param value...]

# Configure authentication
stackmemory api auth <name> --token <token> --env-var <VAR_NAME>
```

## Examples

### GitHub API

```bash
# Register
stackmemory api add github https://api.github.com

# Auth (optional)
stackmemory api auth github --token "$GITHUB_TOKEN" --env-var GITHUB_TOKEN

# Execute
stackmemory api exec github /repos/anthropics/anthropic-sdk-python
stackmemory api exec github /users/octocat
stackmemory api exec github /search/repositories --q "language:typescript stars:>1000"
```

### Linear API

```bash
# Register
stackmemory api add linear https://api.linear.app --auth-type api-key

# Auth
stackmemory api auth linear --token "$LINEAR_API_KEY" --env-var LINEAR_API_KEY

# Execute (GraphQL via POST)
stackmemory api exec linear /graphql
```

## How It Works

1. **Registration**: Stores API config in `~/.stackmemory/api-registry.json` and configures Restish
2. **Auth**: Injects tokens from environment variables into request headers
3. **Execution**: Uses Restish CLI for HTTP requests with automatic JSON parsing
4. **Output**: Returns JSON response data

## Requirements

- Restish CLI: `brew install restish`

## Integration

This skill integrates with StackMemory's context system to:
- Track API calls in session history
- Enable context-aware suggestions for common operations
- Store API responses for later retrieval

## See Also

- [Restish Documentation](https://rest.sh/)
- [OpenAPI Specification](https://swagger.io/specification/)
19 changes: 0 additions & 19 deletions .claude/hooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,6 @@
"USER_MESSAGE": "{{MESSAGE}}"
}
},
"post-response": {
"description": "Track decisions and attention after response",
"command": "node",
"args": ["{{PROJECT_ROOT}}/.claude/hooks/post-response.js"],
"env": {
"PROJECT_ROOT": "{{PROJECT_ROOT}}",
"USER_MESSAGE": "{{USER_MESSAGE}}",
"ASSISTANT_RESPONSE": "{{RESPONSE}}"
}
},
"on-decision": {
"description": "Capture important decisions",
"triggers": ["decision:", "decided to", "will use", "choosing"],
"command": "node",
"args": ["{{PROJECT_ROOT}}/.claude/hooks/on-decision.js"],
"env": {
"DECISION_TEXT": "{{MATCHED_TEXT}}"
}
},
"on-startup": {
"description": "Load context from ChromaDB and setup periodic saves",
"command": "node",
Expand Down
40 changes: 28 additions & 12 deletions .claude/hooks/chromadb-save-hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
/**
* ChromaDB Context Save Hook for Claude
* Triggers on various events to preserve context automatically
*
* Note: This hook only activates if ChromaDB is enabled in storage config.
* Run "stackmemory init --chromadb" to enable ChromaDB support.
*/

import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
import { ChromaDBAdapter } from '../../dist/core/storage/chromadb-simple.js';
import { exec } from 'child_process';
import { promisify } from 'util';
import dotenv from 'dotenv';
Expand Down Expand Up @@ -65,16 +67,24 @@ class ChromaDBContextSaver {

// Prepare context based on event type
const context = await this.prepareContext(event, data);

// Save to ChromaDB
const result = await adapter.store(context);

console.log(`✅ Context saved: ${event} at ${new Date().toISOString()}`);

// Log to file for debugging
const logFile = path.join(process.env.HOME, '.stackmemory', 'logs', 'chromadb-saves.log');
fs.appendFileSync(logFile, `[${new Date().toISOString()}] ${event}: ${JSON.stringify(result)}\n`);

const logFile = path.join(
process.env.HOME,
'.stackmemory',
'logs',
'chromadb-saves.log'
);
fs.appendFileSync(
logFile,
`[${new Date().toISOString()}] ${event}: ${JSON.stringify(result)}\n`
);

return result;
} catch (error) {
console.error('Failed to save context:', error.message);
Expand Down Expand Up @@ -105,7 +115,9 @@ class ChromaDBContextSaver {

case TRIGGER_EVENTS.CODE_CHANGE:
// Get git diff for context
const { stdout: diff } = await execAsync('git diff --cached --stat', { cwd: this.projectRoot });
const { stdout: diff } = await execAsync('git diff --cached --stat', {
cwd: this.projectRoot,
});
context.content = `Code changes:\n${diff}`;
context.metadata = {
files: JSON.stringify(data.files || []),
Expand All @@ -115,7 +127,9 @@ class ChromaDBContextSaver {
break;

case TRIGGER_EVENTS.GIT_COMMIT:
const { stdout: lastCommit } = await execAsync('git log -1 --oneline', { cwd: this.projectRoot });
const { stdout: lastCommit } = await execAsync('git log -1 --oneline', {
cwd: this.projectRoot,
});
context.content = `Git commit: ${lastCommit}`;
context.metadata = {
commit_hash: data.commitHash || '',
Expand Down Expand Up @@ -163,7 +177,9 @@ class ChromaDBContextSaver {

case TRIGGER_EVENTS.PERIODIC_SAVE:
// Get current work context
const { stdout: status } = await execAsync('git status --short', { cwd: this.projectRoot });
const { stdout: status } = await execAsync('git status --short', {
cwd: this.projectRoot,
});
context.content = `Periodic checkpoint:\n${status || 'No changes'}`;
context.metadata = {
interval: data.interval || '15m',
Expand Down Expand Up @@ -224,7 +240,7 @@ class ChromaDBContextSaver {
// Main execution
async function main() {
const saver = new ChromaDBContextSaver();

// Parse input from Claude if provided
let input = {};
try {
Expand All @@ -250,4 +266,4 @@ export { ChromaDBContextSaver, TRIGGER_EVENTS };
// Run if called directly
if (import.meta.url === `file://${process.argv[1]}`) {
main().catch(console.error);
}
}
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,4 @@ service-account.json

# Claude settings with secrets
.claude/settings.local.json
external/
52 changes: 12 additions & 40 deletions .ralph/history/iteration-000/artifacts.json
Original file line number Diff line number Diff line change
@@ -1,57 +1,29 @@
{
"analysis": {
"filesCount": 3,
"testsPass": 3,
"testsFail": 2,
<<<<<<< HEAD
"lastChange": "cc11af2 fix: Update pre-publish tests to skip database-dependent checks"
=======
"lastChange": "f3e1fef fix: Update CLI version to match package.json 0.4.2"
>>>>>>> swarm/developer-implement-core-feature
"filesCount": 7,
"testsPass": 10,
"testsFail": 1,
"lastChange": "Iteration 0 changes"
},
"plan": {
"summary": "Iteration work based on: ",
"summary": "Work for iteration 0",
"steps": [
"Fix issues",
"Add features",
"Update tests"
"Task 0-1",
"Task 0-2",
"Task 0-3"
],
"priority": "high"
},
"changes": [
{
"step": "Fix issues",
<<<<<<< HEAD
"timestamp": 1768936058775,
=======
"timestamp": 1768939666491,
>>>>>>> swarm/developer-implement-core-feature
"result": "simulated"
},
{
"step": "Add features",
<<<<<<< HEAD
"timestamp": 1768936058775,
=======
"timestamp": 1768939666491,
>>>>>>> swarm/developer-implement-core-feature
"result": "simulated"
},
{
"step": "Update tests",
<<<<<<< HEAD
"timestamp": 1768936058775,
=======
"timestamp": 1768939666491,
>>>>>>> swarm/developer-implement-core-feature
"result": "simulated"
"step": "Task 0-1",
"timestamp": 1768986932624,
"result": "completed"
}
],
"validation": {
"testsPass": true,
"lintClean": true,
"errors": [
"Some tests failed"
]
"errors": []
}
}
2 changes: 1 addition & 1 deletion .ralph/iteration.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0
10
16 changes: 3 additions & 13 deletions .ralph/state.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
{
<<<<<<< HEAD
"loopId": "0c41981a-7a56-4054-91e3-20ce2ad62994",
"task": "\n\nYou are a SPECIALIZED DEVELOPER. Your role is to:\n- Implement features according to specifications\n- Write clean, maintainable code\n- Follow established patterns and conventions\n- Integrate with other components\n- Communicate implementation details clearly\n\nTASK: Main functionality implementation\n\nSWARM CONTEXT:\n- Agent developer is working on task 68d8b363-5072-4858-ae04-f308ce96cdc3\n\nCOORDINATION GUIDELINES:\n\n- Save progress to shared context regularly\n- Check for updates from collaborators\n- Request help if blocked for more than 2 iterations\n- Report completion immediately\n\nRemember:\n- You are part of a swarm working on: Fix remaining swarm implementation issues: git commit integration, agent cleanup optimization, and resource management for larger swarms\n- Other agents are working on related tasks\n- Communicate findings through StackMemory shared context\n- Focus on your specialization while being aware of the bigger picture\n- Detect and avoid pathological behaviors (infinite loops, tunnel vision)\n- Request fresh starts if you detect drift in your approach\n\nACCEPTANCE CRITERIA:\n- Feature works correctly\n- Handles edge cases\n- Follows coding standards\n",
"criteria": "Feature works correctly\nHandles edge cases\nFollows coding standards",
"task": "Test multiple iterations beyond 5",
"iteration": 10,
"status": "initialized",
"startTime": 1768936352881,
"lastUpdateTime": 1768936353088,
"startCommit": "cc11af298d3cc27cdff3cf1d58af45113caccb9a"
=======
"startTime": 1768987694285,
"task": "Implement missing SwarmCoordinator methods (getSwarmStatus, getAllActiveSwarms, stopSwarm, forceStop",
"status": "initialized"
>>>>>>> swarm/developer-implement-core-feature
"status": "running",
"startTime": 1768986932623
}
Loading
Loading