paput-mcp 3.4.0 → 4.0.1
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/README.md +86 -67
- package/dist/cli/index.js +5 -29
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/login.js +1 -1
- package/dist/cli/login.js.map +1 -1
- package/dist/cli/logout.js +3 -3
- package/dist/cli/logout.js.map +1 -1
- package/dist/cli/rules/paput-knowledge-capture.md +1 -1
- package/dist/cli/skills/paput-analyze-discard-policy/SKILL.md +3 -3
- package/dist/cli/skills/paput-capture/SKILL.md +1 -1
- package/dist/cli/skills/paput-init/SKILL.md +58 -9
- package/dist/handlers/add-knowledge-candidates/handler.js +47 -21
- package/dist/handlers/add-knowledge-candidates/handler.js.map +1 -1
- package/dist/handlers/add-knowledge-candidates/tool.js +1 -1
- package/dist/handlers/add-knowledge-candidates/tool.js.map +1 -1
- package/dist/handlers/discard-pending-candidate/handler.js +6 -21
- package/dist/handlers/discard-pending-candidate/handler.js.map +1 -1
- package/dist/handlers/get-capture-policy/handler.js +3 -3
- package/dist/handlers/get-capture-policy/handler.js.map +1 -1
- package/dist/handlers/get-capture-policy/tool.js +1 -1
- package/dist/handlers/get-capture-policy/tool.js.map +1 -1
- package/dist/handlers/get-discard-policy-context/handler.js +3 -11
- package/dist/handlers/get-discard-policy-context/handler.js.map +1 -1
- package/dist/handlers/get-discard-policy-context/tool.js +1 -1
- package/dist/handlers/get-discard-policy-context/tool.js.map +1 -1
- package/dist/handlers/get-project-context/handler.js +6 -6
- package/dist/handlers/get-project-context/handler.js.map +1 -1
- package/dist/handlers/get-project-context/tool.js +2 -2
- package/dist/handlers/get-project-context/tool.js.map +1 -1
- package/dist/handlers/index.js +2 -3
- package/dist/handlers/index.js.map +1 -1
- package/dist/handlers/list-pending-candidates/handler.js +6 -9
- package/dist/handlers/list-pending-candidates/handler.js.map +1 -1
- package/dist/handlers/list-processed-sessions/handler.js +18 -0
- package/dist/handlers/list-processed-sessions/handler.js.map +1 -0
- package/dist/handlers/list-processed-sessions/index.js +3 -0
- package/dist/handlers/list-processed-sessions/index.js.map +1 -0
- package/dist/handlers/list-processed-sessions/tool.js +19 -0
- package/dist/handlers/list-processed-sessions/tool.js.map +1 -0
- package/dist/handlers/mark-processed-session/handler.js +37 -0
- package/dist/handlers/mark-processed-session/handler.js.map +1 -0
- package/dist/handlers/mark-processed-session/index.js +3 -0
- package/dist/handlers/mark-processed-session/index.js.map +1 -0
- package/dist/handlers/mark-processed-session/tool.js +28 -0
- package/dist/handlers/mark-processed-session/tool.js.map +1 -0
- package/dist/handlers/memo-projects.js +19 -5
- package/dist/handlers/memo-projects.js.map +1 -1
- package/dist/handlers/save-pending-candidate/handler.js +84 -31
- package/dist/handlers/save-pending-candidate/handler.js.map +1 -1
- package/dist/handlers/save-pending-candidate/tool.js +4 -0
- package/dist/handlers/save-pending-candidate/tool.js.map +1 -1
- package/dist/handlers/scan-sessions/handler.js +4 -2
- package/dist/handlers/scan-sessions/handler.js.map +1 -1
- package/dist/handlers/update-capture-policy/handler.js +3 -3
- package/dist/handlers/update-capture-policy/handler.js.map +1 -1
- package/dist/handlers/update-capture-policy/tool.js +2 -2
- package/dist/handlers/update-capture-policy/tool.js.map +1 -1
- package/dist/handlers/update-memo/handler.js +1 -1
- package/dist/handlers/update-memo/handler.js.map +1 -1
- package/dist/handlers/update-pending-candidate/handler.js +5 -38
- package/dist/handlers/update-pending-candidate/handler.js.map +1 -1
- package/dist/handlers/update-pending-candidate/tool.js +1 -1
- package/dist/handlers/update-pending-candidate/tool.js.map +1 -1
- package/dist/handlers/upsert-skill-sheet-project/handler.js +3 -0
- package/dist/handlers/upsert-skill-sheet-project/handler.js.map +1 -1
- package/dist/handlers/upsert-skill-sheet-project/tool.js +4 -0
- package/dist/handlers/upsert-skill-sheet-project/tool.js.map +1 -1
- package/dist/http.js +67 -21
- package/dist/http.js.map +1 -1
- package/dist/index.js +2 -9
- package/dist/index.js.map +1 -1
- package/dist/schemas/tool-input.js +30 -21
- package/dist/schemas/tool-input.js.map +1 -1
- package/dist/server.js +3 -17
- package/dist/server.js.map +1 -1
- package/dist/services/api/client.js +2 -3
- package/dist/services/api/client.js.map +1 -1
- package/dist/services/api/index.js +1 -0
- package/dist/services/api/index.js.map +1 -1
- package/dist/services/api/knowledge-candidate.js +44 -0
- package/dist/services/api/knowledge-candidate.js.map +1 -0
- package/dist/services/api/project-context.js +6 -1
- package/dist/services/api/project-context.js.map +1 -1
- package/dist/services/api/skill-sheet.js +5 -0
- package/dist/services/api/skill-sheet.js.map +1 -1
- package/dist/services/session/index.js +2 -3
- package/dist/services/session/index.js.map +1 -1
- package/dist/tool.js +12 -30
- package/dist/tool.js.map +1 -1
- package/docs/directory-submission.md +5 -5
- package/docs/privacy-policy.md +22 -12
- package/docs/reviewer-guide.md +13 -4
- package/docs/tools.md +31 -27
- package/docs/usage-examples.md +13 -12
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# PaPut MCP Server
|
|
2
2
|
|
|
3
|
-
PaPut MCP Server connects [PaPut](https://paput.io) to AI assistants through the Model Context Protocol (MCP). Remote HTTP mode lets Claude, ChatGPT, Codex, Claude Code, and other MCP clients create, search, and organize PaPut memos, notes,
|
|
3
|
+
PaPut MCP Server connects [PaPut](https://paput.io) to AI assistants through the Model Context Protocol (MCP). Remote HTTP mode lets Claude, ChatGPT, Codex, Claude Code, and other MCP clients create, search, and organize PaPut memos, notes, skill sheets, and pending knowledge candidates through OAuth. Local-file-capable clients such as Claude Code and Codex can use the installed PaPut skills to read their own session files and send extracted candidates to the same API-backed workflow.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
@@ -14,27 +14,46 @@ PaPut MCP Server connects [PaPut](https://paput.io) to AI assistants through the
|
|
|
14
14
|
- Get dashboard context and save AI-generated dashboard analysis results
|
|
15
15
|
- Get private project context and manage project documents (design decisions and repeatable procedures)
|
|
16
16
|
|
|
17
|
-
### Knowledge Capture
|
|
17
|
+
### Knowledge Capture
|
|
18
18
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
19
|
+
- Add reusable knowledge candidates to the API-backed pending queue
|
|
20
|
+
- Track processed Claude/Codex sessions through the PaPut API
|
|
21
21
|
- Reject near-duplicate candidates automatically using semantic search against existing memos
|
|
22
22
|
- Prevent duplicate pending candidates with fingerprints
|
|
23
|
-
- Derive a
|
|
23
|
+
- Derive a capture policy from discarded candidates
|
|
24
24
|
- Save pending candidates to PaPut only after explicit user approval
|
|
25
25
|
- Preserve the source session updated timestamp as the PaPut memo creation timestamp
|
|
26
|
-
- Link pending candidates to PaPut projects through `
|
|
26
|
+
- Link pending candidates to PaPut projects through `project_alias` in the Remote HTTP MCP URL
|
|
27
27
|
- Install Claude/Codex skills and global rules for PaPut workflows
|
|
28
28
|
|
|
29
29
|
## Installation
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
### Remote HTTP connection (URL + OAuth)
|
|
32
|
+
|
|
33
|
+
For MCP clients, use the Remote HTTP server URL and complete the OAuth flow in
|
|
34
|
+
the client. No local MCP server process or local login command is required.
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
"paput": {
|
|
38
|
+
"type": "http",
|
|
39
|
+
"url": "https://mcp.paput.io/mcp"
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### CLI utilities (`setup-ai` / `export-skill`)
|
|
44
|
+
|
|
45
|
+
The `paput-mcp` package is still useful as a local CLI utility for installing or
|
|
46
|
+
exporting PaPut skills and rules:
|
|
32
47
|
|
|
33
48
|
```bash
|
|
34
|
-
npx -y paput-mcp
|
|
49
|
+
npx -y paput-mcp setup-ai
|
|
50
|
+
npx -y paput-mcp export-skill
|
|
35
51
|
```
|
|
36
52
|
|
|
37
|
-
|
|
53
|
+
Running `npx -y paput-mcp` with no subcommand prints help only. It does not
|
|
54
|
+
start an MCP server and does not sign in to PaPut.
|
|
55
|
+
|
|
56
|
+
You can also install the CLI globally:
|
|
38
57
|
|
|
39
58
|
```bash
|
|
40
59
|
npm install -g paput-mcp
|
|
@@ -44,59 +63,32 @@ npm install -g paput-mcp
|
|
|
44
63
|
|
|
45
64
|
### Remote HTTP Mode
|
|
46
65
|
|
|
47
|
-
Use
|
|
48
|
-
|
|
66
|
+
Use Remote HTTP mode for PaPut MCP connections. It uses OAuth-based MCP setup
|
|
67
|
+
for PaPut data operations, including memos, notes, skill sheets, and
|
|
68
|
+
API-backed knowledge capture.
|
|
49
69
|
|
|
50
70
|
```json
|
|
51
71
|
"paput": {
|
|
52
72
|
"type": "http",
|
|
53
|
-
"url": "https://mcp.paput.io"
|
|
73
|
+
"url": "https://mcp.paput.io/mcp"
|
|
54
74
|
}
|
|
55
75
|
```
|
|
56
76
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
project-specific local configuration.
|
|
61
|
-
|
|
62
|
-
### Local CLI Mode
|
|
63
|
-
|
|
64
|
-
Use local CLI mode when you want Claude Code, Codex, or another local MCP client
|
|
65
|
-
to scan local Claude/Codex sessions and keep a local pending cache. Log in once
|
|
66
|
-
with OAuth before starting the local MCP server:
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
npx -y paput-mcp login
|
|
70
|
-
```
|
|
77
|
+
Pending candidates, processed session markers, and capture policies are
|
|
78
|
+
API-backed. Use `project_alias` in the remote URL when you want to pin
|
|
79
|
+
operations to a project.
|
|
71
80
|
|
|
72
81
|
```json
|
|
73
82
|
"paput": {
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"env": {
|
|
77
|
-
"PAPUT_PROJECT_MATCH": "optional project name fragment"
|
|
78
|
-
}
|
|
83
|
+
"type": "http",
|
|
84
|
+
"url": "https://mcp.paput.io/mcp?project_alias=paput"
|
|
79
85
|
}
|
|
80
86
|
```
|
|
81
87
|
|
|
82
|
-
The login command stores OAuth tokens under `~/.paput/oauth.json` by default.
|
|
83
|
-
The `~/.paput` directory is created with `0700` permissions and the token file is
|
|
84
|
-
written with `0600` permissions. To revoke and remove the local token cache, run:
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
npx -y paput-mcp logout
|
|
88
|
-
```
|
|
89
|
-
|
|
90
88
|
### Environment Variables
|
|
91
89
|
|
|
92
|
-
- `
|
|
93
|
-
|
|
94
|
-
- `PAPUT_CACHE_DIR` - Optional cache directory for knowledge capture data.
|
|
95
|
-
- `PAPUT_ALLOWED_ORIGINS` - Optional comma-separated list of extra allowed
|
|
96
|
-
HTTP `Origin` values for remote MCP requests. The remote server already allows
|
|
97
|
-
its own origin, PaPut, Claude, and ChatGPT origins.
|
|
98
|
-
|
|
99
|
-
When `PAPUT_PROJECT_MATCH` is set, memo bulk-create and update operations search skill sheet projects whose title contains the configured text and link the first match.
|
|
90
|
+
- `PAPUT_HOME` - Optional output root for `setup-ai` generated skills and
|
|
91
|
+
managed links. Defaults to `~/.paput`.
|
|
100
92
|
|
|
101
93
|
## AI Setup
|
|
102
94
|
|
|
@@ -129,11 +121,14 @@ npx -y paput-mcp setup-ai --codex-only
|
|
|
129
121
|
|
|
130
122
|
Generated skills:
|
|
131
123
|
|
|
132
|
-
- `paput-init` - Initialize PaPut usage and inspect unprocessed sessions.
|
|
124
|
+
- `paput-init` - Initialize PaPut usage and inspect unprocessed sessions from local-file-capable AI clients.
|
|
133
125
|
- `paput-capture` - Extract reusable knowledge candidates from the current conversation or a specified topic and add them to pending.
|
|
134
126
|
- `paput-save` - Review pending candidates first, then save only candidates explicitly approved by the user.
|
|
135
|
-
- `paput-analyze-discard-policy` - Analyze discarded candidates and save a
|
|
127
|
+
- `paput-analyze-discard-policy` - Analyze discarded candidates and save a capture policy used by future captures.
|
|
136
128
|
- `paput-dashboard-analysis` - Analyze PaPut dashboard context and optionally save the generated dashboard analysis.
|
|
129
|
+
- `paput-project-document` - Save a project-specific design decision or repeatable procedure as a PaPut project document.
|
|
130
|
+
- `paput-project-summary` - Generate and optionally save an AI summary for a skill sheet project.
|
|
131
|
+
- `paput-public-profile-summary` - Generate and save the public profile summary shown on the AI Summary tab.
|
|
137
132
|
|
|
138
133
|
For Claude Desktop, export skill ZIP files and upload them from
|
|
139
134
|
`Customize > Skills`:
|
|
@@ -184,7 +179,7 @@ Review my PaPut pending candidates
|
|
|
184
179
|
```
|
|
185
180
|
|
|
186
181
|
Use `paput-analyze-discard-policy` after discarding candidates when you want the
|
|
187
|
-
assistant to turn rejection history into a
|
|
182
|
+
assistant to turn rejection history into a capture policy. Future
|
|
188
183
|
`paput-capture` runs read this policy before adding new pending candidates.
|
|
189
184
|
|
|
190
185
|
```text
|
|
@@ -225,6 +220,7 @@ Detailed public tool documentation is available in [docs/tools.md](docs/tools.md
|
|
|
225
220
|
- `paput_delete_skill_sheet_project` - Delete a skill sheet project.
|
|
226
221
|
- `paput_get_skill_sheet_project_summary_context` - Get project information and related memo bodies so the MCP client AI model can generate a project summary.
|
|
227
222
|
- `paput_update_skill_sheet_project_ai_summary` - Save an AI-generated project summary.
|
|
223
|
+
- `paput_get_public_profile_context` - Get public materials so the MCP client AI model can generate a public profile summary.
|
|
228
224
|
|
|
229
225
|
### Goal Management
|
|
230
226
|
|
|
@@ -239,22 +235,42 @@ Detailed public tool documentation is available in [docs/tools.md](docs/tools.md
|
|
|
239
235
|
- `paput_get_dashboard_analysis_context` - Get dashboard, goal, skill sheet, memo, note, and category context so the MCP client AI model can generate an analysis.
|
|
240
236
|
- `paput_update_dashboard_analysis` - Save an AI-generated dashboard analysis.
|
|
241
237
|
|
|
242
|
-
###
|
|
238
|
+
### Project Document
|
|
243
239
|
|
|
244
|
-
|
|
245
|
-
|
|
240
|
+
Project document state is private, project-scoped, API-backed, and available
|
|
241
|
+
through Remote HTTP MCP.
|
|
242
|
+
|
|
243
|
+
- `paput_get_project_context` - Get a project's always-applied instructions and document index. Call at session start.
|
|
244
|
+
- `paput_get_project_document` - Read the full body of a project document by ID.
|
|
245
|
+
- `paput_add_project_document` - Save a design decision, procedure, or skill candidate linked to a project.
|
|
246
|
+
- `paput_update_project_document` - Replace a project document's title, summary, and body.
|
|
247
|
+
- `paput_update_project_instructions` - Overwrite a project's always-applied instructions. Requires explicit user approval.
|
|
248
|
+
- `paput_discard_project_proposal` - Record that the user rejected a skill proposal.
|
|
249
|
+
- `paput_promote_project_documents` - Mark a skill proposal and related procedure documents as promoted after a skill is created.
|
|
250
|
+
|
|
251
|
+
### Knowledge Capture
|
|
252
|
+
|
|
253
|
+
Knowledge capture state is stored by the PaPut API and is available through
|
|
254
|
+
Remote HTTP MCP.
|
|
246
255
|
|
|
247
|
-
- `paput_cache_status` - Inspect the local cache state.
|
|
248
|
-
- `paput_scan_sessions` - Scan local Claude/Codex session logs.
|
|
249
|
-
- `paput_get_session_transcript` - Read a session transcript.
|
|
250
256
|
- `paput_add_knowledge_candidates` - Add extracted knowledge candidates to pending.
|
|
257
|
+
- `paput_list_processed_sessions` - List Claude/Codex sessions already reviewed for knowledge capture.
|
|
258
|
+
- `paput_mark_processed_session` - Mark a reviewed session as processed when no candidates are added.
|
|
251
259
|
- `paput_list_pending_candidates` - List pending candidates.
|
|
252
260
|
- `paput_update_pending_candidate` - Update a pending candidate's fields before it is saved.
|
|
253
261
|
- `paput_save_pending_candidate` - Save an approved pending candidate as a PaPut memo.
|
|
254
262
|
- `paput_discard_pending_candidate` - Discard a pending candidate.
|
|
255
|
-
- `paput_get_capture_policy` - Read the
|
|
263
|
+
- `paput_get_capture_policy` - Read the capture policy generated from discarded candidates.
|
|
256
264
|
- `paput_get_discard_policy_context` - Read discarded candidates and the current policy for AI-side policy analysis.
|
|
257
|
-
- `paput_update_capture_policy` - Save the
|
|
265
|
+
- `paput_update_capture_policy` - Save the capture policy generated by the AI.
|
|
266
|
+
|
|
267
|
+
### Local Session Import
|
|
268
|
+
|
|
269
|
+
PaPut MCP no longer reads local Claude/Codex session files as MCP tools. When
|
|
270
|
+
using Claude Code, Codex, or another AI client with local file access, run the
|
|
271
|
+
installed `paput-init` skill. The AI client reads its own session files, extracts
|
|
272
|
+
reusable knowledge, and submits only the resulting candidates and processed
|
|
273
|
+
session markers through PaPut MCP.
|
|
258
274
|
|
|
259
275
|
## Confirmation Guidance
|
|
260
276
|
|
|
@@ -266,7 +282,7 @@ Write and destructive tools should be used only when the user intent is clear. I
|
|
|
266
282
|
- `paput_set_skill_sheet_skills` replaces the full skill list and should be used only when the desired final list is known.
|
|
267
283
|
- `paput_update_dashboard_analysis` should be used only after the MCP client AI model has generated an analysis and the user intends to save it.
|
|
268
284
|
- `paput_discard_pending_candidate` removes a pending candidate from the save flow.
|
|
269
|
-
- `paput_update_capture_policy`
|
|
285
|
+
- `paput_update_capture_policy` should be used after the MCP client AI has generated a capture policy from discarded candidates.
|
|
270
286
|
- Update and upsert tools should preserve existing data unless the user requests a change.
|
|
271
287
|
|
|
272
288
|
## Usage Examples
|
|
@@ -291,11 +307,15 @@ Recommended tool flow:
|
|
|
291
307
|
Scan recent Codex sessions and extract reusable knowledge from the relevant session.
|
|
292
308
|
```
|
|
293
309
|
|
|
294
|
-
|
|
310
|
+
The AI client reads its own local session files; PaPut MCP only receives the
|
|
311
|
+
extracted candidates and processed-session markers.
|
|
312
|
+
|
|
313
|
+
Recommended flow:
|
|
295
314
|
|
|
296
|
-
1. `
|
|
297
|
-
2.
|
|
298
|
-
3. `paput_add_knowledge_candidates`
|
|
315
|
+
1. Use `paput_list_processed_sessions` to skip sessions already reviewed.
|
|
316
|
+
2. The local-file-capable AI client reads `~/.codex/sessions/**/*.jsonl`.
|
|
317
|
+
3. Use `paput_add_knowledge_candidates` when reusable candidates are found.
|
|
318
|
+
4. Use `paput_mark_processed_session` when a reviewed session has no candidates.
|
|
299
319
|
|
|
300
320
|
### 3. Update a skill sheet project
|
|
301
321
|
|
|
@@ -311,21 +331,20 @@ Recommended tool flow:
|
|
|
311
331
|
|
|
312
332
|
## Local Data
|
|
313
333
|
|
|
314
|
-
|
|
334
|
+
`setup-ai` stores generated skills under `~/.paput` by default. Knowledge
|
|
335
|
+
capture state is stored by the PaPut API.
|
|
315
336
|
|
|
316
337
|
```text
|
|
317
338
|
~/.paput/
|
|
318
339
|
skills/ # Canonical skills linked into Claude/Codex
|
|
319
|
-
cache/ # Synced memos, pending candidates, processed sessions, and capture-policy.md
|
|
320
340
|
```
|
|
321
341
|
|
|
322
342
|
## Troubleshooting
|
|
323
343
|
|
|
324
|
-
- **Connection fails or tools do not appear**: Make sure the server URL is `https://mcp.paput.io` and that you completed the PaPut sign-in and consent screen. Check `https://mcp.paput.io/healthz` returns `{"ok":true}`.
|
|
344
|
+
- **Connection fails or tools do not appear**: Make sure the server URL is `https://mcp.paput.io/mcp` and that you completed the PaPut sign-in and consent screen. Check `https://mcp.paput.io/healthz` returns `{"ok":true}`.
|
|
325
345
|
- **401 Unauthorized / asked to sign in again**: Your access token expired or the connector was disconnected. Reconnect the connector and re-authorize through PaPut OAuth.
|
|
326
346
|
- **A write or delete tool did nothing**: Write and destructive tools require user confirmation. Approve the confirmation prompt in the client before the action runs.
|
|
327
347
|
- **Read/search tools return empty results**: The account has no matching data yet. Create content first (e.g. `paput_create_memos`), then search again.
|
|
328
|
-
- **Local CLI mode: `login` required**: For stdio/local usage, run `node dist/index.js login` to complete OAuth before starting the server.
|
|
329
348
|
- **Still stuck**: Contact `paput.dev@gmail.com` or open an issue at https://github.com/mizulba-dev/paput-mcp/issues.
|
|
330
349
|
|
|
331
350
|
## Public Documents
|
package/dist/cli/index.js
CHANGED
|
@@ -1,29 +1,9 @@
|
|
|
1
|
-
import { login } from './login.js';
|
|
2
|
-
import { logout } from './logout.js';
|
|
3
1
|
import { setupAi } from './setup-ai.js';
|
|
4
2
|
import { exportSkill } from './export-skill.js';
|
|
5
3
|
export async function runCli(args) {
|
|
6
4
|
const command = args[0];
|
|
7
|
-
if (!command)
|
|
8
|
-
|
|
9
|
-
if (command === 'login') {
|
|
10
|
-
try {
|
|
11
|
-
await login(args.slice(1));
|
|
12
|
-
}
|
|
13
|
-
catch (error) {
|
|
14
|
-
console.error(error instanceof Error ? error.message : error);
|
|
15
|
-
process.exitCode = 1;
|
|
16
|
-
}
|
|
17
|
-
return true;
|
|
18
|
-
}
|
|
19
|
-
if (command === 'logout') {
|
|
20
|
-
try {
|
|
21
|
-
await logout(args.slice(1));
|
|
22
|
-
}
|
|
23
|
-
catch (error) {
|
|
24
|
-
console.error(error instanceof Error ? error.message : error);
|
|
25
|
-
process.exitCode = 1;
|
|
26
|
-
}
|
|
5
|
+
if (!command) {
|
|
6
|
+
printHelp();
|
|
27
7
|
return true;
|
|
28
8
|
}
|
|
29
9
|
if (command === 'setup-ai') {
|
|
@@ -51,23 +31,19 @@ export async function runCli(args) {
|
|
|
51
31
|
}
|
|
52
32
|
function printHelp() {
|
|
53
33
|
console.log(`Usage:
|
|
54
|
-
paput-mcp Start the MCP server
|
|
55
|
-
paput-mcp login Log in to PaPut with OAuth for local CLI mode
|
|
56
|
-
paput-mcp logout Revoke and remove the local OAuth token cache
|
|
57
34
|
paput-mcp setup-ai Set up PaPut integration for Claude/Codex
|
|
58
35
|
paput-mcp export-skill [name]
|
|
59
36
|
Export PaPut skill ZIP files for Claude Desktop
|
|
60
37
|
|
|
61
38
|
Options:
|
|
62
|
-
--api-url <URL> PaPut API URL for login. Defaults to PAPUT_API_URL or https://api.paput.io
|
|
63
|
-
--scopes <SCOPES> Comma-separated OAuth scopes for login
|
|
64
|
-
--no-open Print the login URL without opening a browser
|
|
65
|
-
--local-only Remove local token cache without remote revoke during logout
|
|
66
39
|
--force Refresh existing PaPut-managed links and rules
|
|
67
40
|
--no-rules Do not update global rules
|
|
68
41
|
--claude-only Configure Claude only
|
|
69
42
|
--codex-only Configure Codex only
|
|
70
43
|
-o, --output <PATH> Output directory or ZIP path for export-skill. Defaults to ~/Downloads
|
|
44
|
+
|
|
45
|
+
PaPut MCP connections use Remote HTTP mode:
|
|
46
|
+
https://mcp.paput.io/mcp
|
|
71
47
|
`);
|
|
72
48
|
}
|
|
73
49
|
//# sourceMappingURL=index.js.map
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,IAAc;IACzC,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAExB,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,SAAS,EAAE,CAAC;QACZ,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,OAAO,KAAK,UAAU,EAAE,CAAC;QAC3B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,OAAO,KAAK,cAAc,EAAE,CAAC;QAC/B,IAAI,CAAC;YACH,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YAC9D,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACvB,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,MAAM,EAAE,CAAC;QACnE,SAAS,EAAE,CAAC;QACZ,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CAAC,KAAK,CAAC,oBAAoB,OAAO,EAAE,CAAC,CAAC;IAC7C,SAAS,EAAE,CAAC;IACZ,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACrB,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,SAAS;IAChB,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;CAcb,CAAC,CAAC;AACH,CAAC"}
|
package/dist/cli/login.js
CHANGED
|
@@ -50,7 +50,7 @@ export async function login(args) {
|
|
|
50
50
|
token,
|
|
51
51
|
}));
|
|
52
52
|
console.log(`PaPut OAuth login completed.`);
|
|
53
|
-
console.log(`
|
|
53
|
+
console.log(`OAuth credentials: ${getOAuthSessionPath()}`);
|
|
54
54
|
}
|
|
55
55
|
finally {
|
|
56
56
|
await callback.close();
|
package/dist/cli/login.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/cli/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,YAAY,EAA6B,MAAM,WAAW,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EACL,uBAAuB,EACvB,gCAAgC,EAChC,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,iCAAiC,CAAC;AAEzC,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAC1C,MAAM,cAAc,GAAG,wBAAwB,CAAC;AAchD,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,IAAc;IACxC,MAAM,OAAO,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACxC,MAAM,QAAQ,GAAG,MAAM,gCAAgC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACxE,MAAM,QAAQ,GAAG,MAAM,mBAAmB,EAAE,CAAC;IAC7C,MAAM,eAAe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C;AACH,CAAC;AAED,SAAS,WAAW;IAClB,OAAO,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,aAAa,CAAC,QAAgB;IACrC,OAAO,SAAS,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;AACnE,CAAC;AAED,SAAS,SAAS,CAAC,MAAc;IAC/B,OAAO,MAAM;SACV,QAAQ,CAAC,QAAQ,CAAC;SAClB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AACzB,CAAC"}
|
package/dist/cli/logout.js
CHANGED
|
@@ -14,11 +14,11 @@ export async function logout(args) {
|
|
|
14
14
|
}
|
|
15
15
|
catch (error) {
|
|
16
16
|
console.warn(`Could not revoke the remote token: ${error instanceof Error ? error.message : String(error)}`);
|
|
17
|
-
console.warn('Removing the local
|
|
17
|
+
console.warn('Removing the local OAuth credentials anyway.');
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
deleteStoredOAuthSession();
|
|
21
|
-
console.log('Local PaPut OAuth
|
|
21
|
+
console.log('Local PaPut OAuth credentials were removed.');
|
|
22
22
|
}
|
|
23
23
|
function parseLogoutOptions(args) {
|
|
24
24
|
const options = { localOnly: false };
|
|
@@ -59,7 +59,7 @@ function printLogoutHelp() {
|
|
|
59
59
|
paput-mcp logout [options]
|
|
60
60
|
|
|
61
61
|
Options:
|
|
62
|
-
--local-only Remove the local
|
|
62
|
+
--local-only Remove the local OAuth credentials without calling the revoke endpoint
|
|
63
63
|
`);
|
|
64
64
|
}
|
|
65
65
|
//# sourceMappingURL=logout.js.map
|
package/dist/cli/logout.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logout.js","sourceRoot":"","sources":["../../src/cli/logout.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,gCAAgC,EAChC,sBAAsB,GACvB,MAAM,iCAAiC,CAAC;AAMzC,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,IAAc;IACzC,MAAM,OAAO,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG,sBAAsB,EAAE,CAAC;IAEzC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,wBAAwB,EAAE,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;QACjD,OAAO;IACT,CAAC;IAED,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;QACvB,IAAI,CAAC;YACH,MAAM,kBAAkB,CAAC,OAAO,CAAC,CAAC;YAClC,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;QACxD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,IAAI,CACV,sCACE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CACvD,EAAE,CACH,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"logout.js","sourceRoot":"","sources":["../../src/cli/logout.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,gCAAgC,EAChC,sBAAsB,GACvB,MAAM,iCAAiC,CAAC;AAMzC,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,IAAc;IACzC,MAAM,OAAO,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG,sBAAsB,EAAE,CAAC;IAEzC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,wBAAwB,EAAE,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;QACjD,OAAO;IACT,CAAC;IAED,IAAI,CAAC,OAA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5E,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAC,mBAAmB,EAAE;QACzD,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,mCAAmC,EAAE;QAChE,IAAI,EAAE,IAAI,eAAe,CAAC;YACxB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,KAAK,EAAE,OAAO,CAAC,aAAa;YAC5B,eAAe,EAAE,eAAe;SACjC,CAAC;KACH,CAAC,CAAC;IAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,QAAQ,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC;AAED,SAAS,eAAe;IACtB,OAAO,CAAC,GAAG,CAAC;;;;;CAKb,CAAC,CAAC;AACH,CAAC"}
|
|
@@ -4,7 +4,7 @@ This section is the procedure for Check 2 of the PaPut Completion Checklist. Whe
|
|
|
4
4
|
|
|
5
5
|
Route each item correctly: reusable cross-project knowledge goes to the `paput-capture` workflow; project-specific design decisions and repeatable procedures go to `paput_add_project_document` (Check 1).
|
|
6
6
|
|
|
7
|
-
Before adding any candidate to pending, always follow the `paput-capture` workflow in the current turn. Read the `paput-capture` skill instructions first, then read the
|
|
7
|
+
Before adding any candidate to pending, always follow the `paput-capture` workflow in the current turn. Read the `paput-capture` skill instructions first, then read the capture policy, check existing pending candidates, and apply the workflow's quality bar. Do not call `paput_add_knowledge_candidates` directly unless the `paput-capture` workflow has been followed.
|
|
8
8
|
|
|
9
9
|
Only keep technical knowledge, decision criteria, and procedures that can be reused in other projects. Do not keep project-specific specifications, implementation details, operational rules, code, secrets, or customer data.
|
|
10
10
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: paput-analyze-discard-policy
|
|
3
|
-
description: Use this to analyze
|
|
3
|
+
description: Use this to analyze discarded PaPut knowledge candidates, derive reusable capture rejection criteria, and save the resulting capture policy document.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# PaPut Analyze Discard Policy
|
|
7
7
|
|
|
8
|
-
Analyze
|
|
8
|
+
Analyze discarded PaPut knowledge candidates, derive reusable capture rejection criteria, and save the resulting capture policy document. The saved policy is read by `paput-capture` before adding new knowledge candidates.
|
|
9
9
|
|
|
10
10
|
## When To Use
|
|
11
11
|
|
|
@@ -62,5 +62,5 @@ Use this structure:
|
|
|
62
62
|
## Notes
|
|
63
63
|
|
|
64
64
|
- This skill does not save PaPut memos.
|
|
65
|
-
- The policy is
|
|
65
|
+
- The policy is stored by the PaPut API and is available through Remote HTTP MCP.
|
|
66
66
|
- The policy guides future capture decisions; it should not be treated as an immutable blocklist.
|
|
@@ -16,7 +16,7 @@ Extract reusable knowledge candidates from the current conversation or a user-sp
|
|
|
16
16
|
|
|
17
17
|
## Steps
|
|
18
18
|
|
|
19
|
-
1. Read the
|
|
19
|
+
1. Read the capture policy with `paput_get_capture_policy`.
|
|
20
20
|
2. Check existing pending candidates with `paput_list_pending_candidates`.
|
|
21
21
|
3. Extract only reusable knowledge from the current conversation or the user-specified topic.
|
|
22
22
|
4. For each candidate, check semantically similar existing memos with `paput_find_similar_memos`, using the candidate title or a one-line gist as the query. Treat results with a score around 0.85 or higher as near-duplicates, and results around 0.7 to 0.85 as overlap that needs comparison against the candidate body. Use `paput_search_memo` in addition when the candidate centers on an exact name or identifier.
|
|
@@ -1,20 +1,67 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: paput-init
|
|
3
|
-
description: Use this to initialize PaPut usage and inspect unprocessed sessions.
|
|
3
|
+
description: Use this to initialize PaPut usage and inspect unprocessed local Claude/Codex sessions when the AI client can read local files.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# PaPut Init
|
|
7
7
|
|
|
8
|
-
Initialize PaPut knowledge capture.
|
|
8
|
+
Initialize PaPut knowledge capture from past local AI sessions.
|
|
9
|
+
|
|
10
|
+
This skill is for local-file-capable AI clients such as Claude Code or Codex.
|
|
11
|
+
PaPut MCP does not read local session files. The AI client should read the
|
|
12
|
+
session files directly, then use PaPut MCP only to check processed-session
|
|
13
|
+
markers and add or mark reviewed sessions.
|
|
9
14
|
|
|
10
15
|
## Steps
|
|
11
16
|
|
|
12
|
-
1.
|
|
13
|
-
2.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
1. Get processed sessions with `paput_list_processed_sessions`.
|
|
18
|
+
2. Find local session files the AI client can access:
|
|
19
|
+
- Claude: `~/.claude/projects/**/*.jsonl`
|
|
20
|
+
- Codex: `~/.codex/sessions/**/*.jsonl`
|
|
21
|
+
3. For each file, derive:
|
|
22
|
+
- `source`: `claude` or `codex`
|
|
23
|
+
- `session_id`: file basename without `.jsonl`
|
|
24
|
+
- `source_session_updated_at`: file modified time in ISO 8601 format
|
|
25
|
+
4. Skip sessions already returned by `paput_list_processed_sessions`.
|
|
26
|
+
5. Report the count and a short summary of unprocessed sessions to the user.
|
|
27
|
+
6. Only when the user wants it, read the relevant session transcript directly
|
|
28
|
+
from the JSONL file and create candidates that meet the extraction criteria.
|
|
29
|
+
7. Before adding candidates with `paput_add_knowledge_candidates`, check that
|
|
30
|
+
they do not contain project-specific specifications, implementation details,
|
|
31
|
+
operational rules, code, customer data, or secrets. Duplicate checks against
|
|
32
|
+
existing memos run automatically inside `paput_add_knowledge_candidates`
|
|
33
|
+
using semantic search.
|
|
34
|
+
8. If reusable candidates exist, call `paput_add_knowledge_candidates` with
|
|
35
|
+
`source`, `session_id`, `source_session_updated_at`, and the candidates.
|
|
36
|
+
9. If the session was reviewed but no candidates should be added, call
|
|
37
|
+
`paput_mark_processed_session` with `source`, `session_id`, and
|
|
38
|
+
`source_session_updated_at`.
|
|
39
|
+
10. Briefly report added candidates, duplicates, rejected candidates, and
|
|
40
|
+
sessions marked as processed.
|
|
41
|
+
|
|
42
|
+
## JSONL Parsing Guide
|
|
43
|
+
|
|
44
|
+
When reading session files, extract user and assistant messages only.
|
|
45
|
+
|
|
46
|
+
Claude session lines commonly have:
|
|
47
|
+
|
|
48
|
+
- `type`: `user` or `assistant`
|
|
49
|
+
- `message.role`: `user` or `assistant`
|
|
50
|
+
- `message.content`: string or content blocks such as `{ "type": "text", "text": "..." }`
|
|
51
|
+
- `cwd`, `message.cwd`, or `payload.cwd` may exist as local context, but do not
|
|
52
|
+
save local paths or project-specific details as knowledge.
|
|
53
|
+
|
|
54
|
+
Codex session lines commonly have:
|
|
55
|
+
|
|
56
|
+
- `type`: `response_item`
|
|
57
|
+
- `payload.type`: `message`
|
|
58
|
+
- `payload.role`: `user` or `assistant`
|
|
59
|
+
- `payload.content`: content blocks such as `input_text`, `output_text`, or `text`
|
|
60
|
+
- `payload.cwd` may exist as local context, but do not save local paths or
|
|
61
|
+
project-specific details as knowledge.
|
|
62
|
+
|
|
63
|
+
Read only what is needed. If the session is large, inspect metadata and relevant
|
|
64
|
+
tail sections first, then ask before reading more.
|
|
18
65
|
|
|
19
66
|
## Extraction Criteria
|
|
20
67
|
|
|
@@ -35,6 +82,8 @@ When unsure, do not add the candidate. Report that there is no knowledge to save
|
|
|
35
82
|
## Notes
|
|
36
83
|
|
|
37
84
|
- Do not save directly to PaPut.
|
|
38
|
-
- Add candidates to pending first.
|
|
85
|
+
- Add candidates to the API-backed pending queue first.
|
|
86
|
+
- `paput_add_knowledge_candidates` marks the source session as processed when candidates are submitted.
|
|
87
|
+
- Use `paput_mark_processed_session` after reviewing a session that produces no candidates.
|
|
39
88
|
- Report duplicates or similar memos when found.
|
|
40
89
|
- Prefer high-quality pending candidates over increasing the pending count.
|