@neethan/joa 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +209 -0
- package/dist/cli/main.js +702 -0
- package/dist/cli/output.js +22 -0
- package/dist/core/bootstrap.js +39 -0
- package/dist/core/config.js +131 -0
- package/dist/core/context.js +1 -0
- package/dist/core/db.js +254 -0
- package/dist/core/entry.js +84 -0
- package/dist/core/errors.js +24 -0
- package/dist/core/formatters.js +54 -0
- package/dist/core/ids.js +26 -0
- package/dist/core/import.js +34 -0
- package/dist/core/index.js +19 -0
- package/dist/core/journal.js +65 -0
- package/dist/core/log.js +49 -0
- package/dist/core/query.js +114 -0
- package/dist/core/status.js +30 -0
- package/dist/core/sync.js +94 -0
- package/dist/core/time.js +50 -0
- package/dist/mcp/server.js +149 -0
- package/package.json +59 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 joa contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# joa
|
|
2
|
+
|
|
3
|
+
[](https://github.com/neethanwu/joa/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/joa)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
7
|
+
Persistent activity journal for AI agents. Log decisions, file changes, errors, and observations — then query them for context across sessions.
|
|
8
|
+
|
|
9
|
+
## What is joa?
|
|
10
|
+
|
|
11
|
+
AI agents lose context between sessions. joa gives them a journal — a structured log of what happened and why, queryable by any agent on any platform. Start a session with `catchup` to see what happened last time. Log meaningful events as you work. Future sessions inherit the full picture.
|
|
12
|
+
|
|
13
|
+
Works as a **CLI tool** and as an **MCP server** for agent platforms like Claude Code, Cursor, Gemini CLI, Codex, Amp, and more.
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install -g joa
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Requires Node.js >= 18.
|
|
22
|
+
|
|
23
|
+
## Quick Start
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# Log an entry
|
|
27
|
+
joa log "Chose PostgreSQL over MongoDB for user data" -c decision -t project:api
|
|
28
|
+
|
|
29
|
+
# See recent activity
|
|
30
|
+
joa catchup
|
|
31
|
+
|
|
32
|
+
# Search the journal
|
|
33
|
+
joa search "PostgreSQL"
|
|
34
|
+
|
|
35
|
+
# Check journal health
|
|
36
|
+
joa status
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## MCP Server Setup
|
|
40
|
+
|
|
41
|
+
joa runs as an MCP server so agents can log and query entries directly.
|
|
42
|
+
|
|
43
|
+
**Claude Code** (`~/.claude.json` or `.mcp.json`):
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"mcpServers": {
|
|
48
|
+
"joa": {
|
|
49
|
+
"command": "joa",
|
|
50
|
+
"args": ["mcp", "--agent", "claude-code"]
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Cursor** (`~/.cursor/mcp.json` or `.cursor/mcp.json`):
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"mcpServers": {
|
|
61
|
+
"joa": {
|
|
62
|
+
"command": "joa",
|
|
63
|
+
"args": ["mcp", "--agent", "cursor"]
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Or run `joa setup` for interactive configuration.
|
|
70
|
+
|
|
71
|
+
<details>
|
|
72
|
+
<summary>All supported platforms</summary>
|
|
73
|
+
|
|
74
|
+
**Gemini CLI** (`~/.gemini/settings.json`):
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"mcpServers": {
|
|
79
|
+
"joa": {
|
|
80
|
+
"command": "joa",
|
|
81
|
+
"args": ["mcp", "--agent", "gemini-cli"]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Codex** (`~/.codex/config.toml`):
|
|
88
|
+
|
|
89
|
+
```toml
|
|
90
|
+
[mcp_servers.joa]
|
|
91
|
+
command = "joa"
|
|
92
|
+
args = ["mcp", "--agent", "codex"]
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Amp** (`~/.config/amp/settings.json`):
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"amp.mcpServers": {
|
|
100
|
+
"joa": {
|
|
101
|
+
"command": "joa",
|
|
102
|
+
"args": ["mcp", "--agent", "amp"]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**OpenCode** (`~/.config/opencode/opencode.json`):
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"mcp": {
|
|
113
|
+
"joa": {
|
|
114
|
+
"type": "local",
|
|
115
|
+
"command": ["joa", "mcp", "--agent", "opencode"]
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**GitHub Copilot** (VS Code `mcp.json` or `.vscode/mcp.json`):
|
|
122
|
+
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"servers": {
|
|
126
|
+
"joa": {
|
|
127
|
+
"type": "stdio",
|
|
128
|
+
"command": "joa",
|
|
129
|
+
"args": ["mcp", "--agent", "github-copilot"]
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Pi** (`~/.pi/mcp.json`):
|
|
136
|
+
|
|
137
|
+
```json
|
|
138
|
+
{
|
|
139
|
+
"mcpServers": {
|
|
140
|
+
"joa": {
|
|
141
|
+
"command": "joa",
|
|
142
|
+
"args": ["mcp", "--agent", "pi"]
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
</details>
|
|
149
|
+
|
|
150
|
+
## CLI Commands
|
|
151
|
+
|
|
152
|
+
**Logging:**
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
joa log <summary> Log an entry
|
|
156
|
+
-c, --category <cat> Category (decision, change, observation, error, ...)
|
|
157
|
+
-t, --tag <tag> Tag (repeatable, e.g. project:api)
|
|
158
|
+
--thread <id|new> Thread ID or "new" to start one
|
|
159
|
+
--detail <json> Structured detail as JSON
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Querying:**
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
joa query Query with filters
|
|
166
|
+
joa catchup Recent entries (last 7 days)
|
|
167
|
+
joa threads Active threads summary
|
|
168
|
+
joa timeline Chronological entries
|
|
169
|
+
joa decisions Decision entries
|
|
170
|
+
joa search <term> Full-text search
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**Maintenance:**
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
joa status Journal health and stats
|
|
177
|
+
joa rebuild Rebuild SQLite index from JSONL
|
|
178
|
+
joa export Export entries as JSONL to stdout
|
|
179
|
+
joa import <file> Import entries from JSONL (or - for stdin)
|
|
180
|
+
joa setup Configure MCP for agent platforms
|
|
181
|
+
joa config get|set View or update configuration
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Run `joa <command> --help` for detailed usage.
|
|
185
|
+
|
|
186
|
+
## How It Works
|
|
187
|
+
|
|
188
|
+
joa writes entries to **JSONL files** (one per day, append-only) as the source of truth, then indexes them in **SQLite with FTS5** for fast full-text search and filtered queries.
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
~/.joa/
|
|
192
|
+
journals/
|
|
193
|
+
2026-02-27.jsonl # Append-only daily logs
|
|
194
|
+
2026-02-26.jsonl
|
|
195
|
+
journal.db # SQLite FTS5 index (derived, rebuildable)
|
|
196
|
+
config.yaml # Optional configuration
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
If the SQLite index is ever lost or corrupted, `joa rebuild` reconstructs it from the JSONL files.
|
|
200
|
+
|
|
201
|
+
Runs on both **Node.js** (published CLI) and **Bun** (development).
|
|
202
|
+
|
|
203
|
+
## Contributing
|
|
204
|
+
|
|
205
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
206
|
+
|
|
207
|
+
## License
|
|
208
|
+
|
|
209
|
+
[MIT](LICENSE)
|