pisama-claude-code 0.4.2__tar.gz → 0.6.3__tar.gz
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.
- {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/PKG-INFO +49 -26
- {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/README.md +35 -21
- {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/pyproject.toml +24 -6
- {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/src/pisama_claude_code/__init__.py +4 -4
- {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/src/pisama_claude_code/adapter.py +5 -4
- pisama_claude_code-0.6.3/src/pisama_claude_code/cli.py +2652 -0
- {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/src/pisama_claude_code/guardian.py +4 -5
- {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/src/pisama_claude_code/hooks/capture_hook.py +156 -99
- pisama_claude_code-0.6.3/src/pisama_claude_code/hooks/forward_hook.py +90 -0
- pisama_claude_code-0.6.3/src/pisama_claude_code/install.py +518 -0
- pisama_claude_code-0.6.3/src/pisama_claude_code/lite.py +675 -0
- pisama_claude_code-0.6.3/src/pisama_claude_code/lite_config.py +176 -0
- pisama_claude_code-0.6.3/src/pisama_claude_code/lite_storage.py +520 -0
- {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/src/pisama_claude_code/otel_export.py +67 -17
- pisama_claude_code-0.6.3/src/pisama_claude_code/proxy.py +658 -0
- pisama_claude_code-0.6.3/src/pisama_claude_code/sample_traces/__init__.py +5 -0
- pisama_claude_code-0.6.3/src/pisama_claude_code/sample_traces/demo_loop.jsonl +5 -0
- pisama_claude_code-0.6.3/src/pisama_claude_code/skills/__init__.py +0 -0
- pisama_claude_code-0.6.3/src/pisama_claude_code/skills/pisama-diagnose/SKILL.codex.md +49 -0
- pisama_claude_code-0.6.3/src/pisama_claude_code/skills/pisama-diagnose/SKILL.md +137 -0
- pisama_claude_code-0.6.3/src/pisama_claude_code/skills/pisama-diagnose/diagnose.py +502 -0
- {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/src/pisama_claude_code/storage.py +2 -3
- {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/src/pisama_claude_code/trace_converter.py +1 -1
- {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/src/pisama_claude_code/trace_types.py +17 -17
- pisama_claude_code-0.6.3/tests/test_agent_identity.py +163 -0
- pisama_claude_code-0.6.3/tests/test_capture_parser.py +88 -0
- {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/tests/test_cli.py +72 -50
- pisama_claude_code-0.6.3/tests/test_diagnose.py +162 -0
- pisama_claude_code-0.6.3/tests/test_forward.py +366 -0
- pisama_claude_code-0.6.3/tests/test_install_settings.py +124 -0
- pisama_claude_code-0.6.3/tests/test_lite.py +800 -0
- pisama_claude_code-0.6.3/tests/test_proxy.py +292 -0
- pisama_claude_code-0.4.2/.github/ISSUE_TEMPLATE/bug_report.yml +0 -117
- pisama_claude_code-0.4.2/.github/ISSUE_TEMPLATE/config.yml +0 -8
- pisama_claude_code-0.4.2/.github/ISSUE_TEMPLATE/feature_request.yml +0 -93
- pisama_claude_code-0.4.2/.github/PULL_REQUEST_TEMPLATE.md +0 -61
- pisama_claude_code-0.4.2/.github/workflows/ci.yml +0 -80
- pisama_claude_code-0.4.2/.github/workflows/publish.yml +0 -68
- pisama_claude_code-0.4.2/CHANGELOG.md +0 -115
- pisama_claude_code-0.4.2/CODE_OF_CONDUCT.md +0 -133
- pisama_claude_code-0.4.2/CONTRIBUTING.md +0 -168
- pisama_claude_code-0.4.2/SECURITY.md +0 -97
- pisama_claude_code-0.4.2/assets/demo.gif +0 -0
- pisama_claude_code-0.4.2/demo/README.md +0 -78
- pisama_claude_code-0.4.2/demo/demo-simulated.sh +0 -131
- pisama_claude_code-0.4.2/demo/demo.cast +0 -153
- pisama_claude_code-0.4.2/demo/record-demo.sh +0 -82
- pisama_claude_code-0.4.2/src/pisama_claude_code/cli.py +0 -1275
- pisama_claude_code-0.4.2/src/pisama_claude_code/install.py +0 -181
- {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/.gitignore +0 -0
- {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/LICENSE +0 -0
- {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/src/pisama_claude_code/hooks/__init__.py +0 -0
- {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/src/pisama_claude_code/hooks/guardian_hook.py +0 -0
- {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/src/pisama_claude_code/py.typed +0 -0
- {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/tests/__init__.py +0 -0
- {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/tests/conftest.py +0 -0
- {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/tests/test_adapter.py +0 -0
- {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/tests/test_guardian.py +0 -0
- {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/tests/test_storage.py +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pisama-claude-code
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary: Trace capture for Claude Code sessions - sync to
|
|
5
|
-
Project-URL: Homepage, https://pisama.
|
|
6
|
-
Project-URL: Documentation, https://pisama.
|
|
3
|
+
Version: 0.6.3
|
|
4
|
+
Summary: Trace capture for Claude Code sessions - sync to Pisama platform for analysis
|
|
5
|
+
Project-URL: Homepage, https://pisama.ai
|
|
6
|
+
Project-URL: Documentation, https://pisama.ai/docs/claude-code
|
|
7
7
|
Project-URL: Repository, https://github.com/tn-pisama/pisama-claude-code
|
|
8
8
|
Project-URL: Issues, https://github.com/tn-pisama/pisama-claude-code/issues
|
|
9
9
|
Project-URL: Changelog, https://github.com/tn-pisama/pisama-claude-code/blob/main/CHANGELOG.md
|
|
10
10
|
Project-URL: Discussions, https://github.com/tn-pisama/pisama-claude-code/discussions
|
|
11
11
|
Author: Tuomo Nikulainen
|
|
12
|
-
Maintainer-email:
|
|
12
|
+
Maintainer-email: Pisama Team <team@pisama.ai>
|
|
13
13
|
License-Expression: MIT
|
|
14
14
|
License-File: LICENSE
|
|
15
15
|
Keywords: agent,ai-agent,anthropic,claude,claude-code,debugging,developer-tools,forensics,llm,monitoring,observability,pisama,self-healing,tracing
|
|
@@ -36,20 +36,29 @@ Requires-Dist: httpx>=0.25.0
|
|
|
36
36
|
Requires-Dist: pydantic>=2.0.0
|
|
37
37
|
Requires-Dist: rich>=13.0.0
|
|
38
38
|
Provides-Extra: all
|
|
39
|
+
Requires-Dist: aiohttp>=3.9.0; extra == 'all'
|
|
39
40
|
Requires-Dist: opentelemetry-api>=1.20.0; extra == 'all'
|
|
40
41
|
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.20.0; extra == 'all'
|
|
41
42
|
Requires-Dist: opentelemetry-sdk>=1.20.0; extra == 'all'
|
|
42
43
|
Requires-Dist: pisama-core>=0.1.0; extra == 'all'
|
|
44
|
+
Requires-Dist: pyyaml>=6.0; extra == 'all'
|
|
43
45
|
Provides-Extra: core
|
|
44
46
|
Requires-Dist: pisama-core>=0.1.0; extra == 'core'
|
|
45
47
|
Provides-Extra: dev
|
|
48
|
+
Requires-Dist: aiohttp>=3.9.0; extra == 'dev'
|
|
49
|
+
Requires-Dist: pisama-core>=1.7.0; extra == 'dev'
|
|
46
50
|
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
|
|
47
51
|
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
|
|
48
52
|
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
53
|
+
Requires-Dist: pyyaml>=6.0; extra == 'dev'
|
|
54
|
+
Provides-Extra: lite
|
|
55
|
+
Requires-Dist: pyyaml>=6.0; extra == 'lite'
|
|
49
56
|
Provides-Extra: otel
|
|
50
57
|
Requires-Dist: opentelemetry-api>=1.20.0; extra == 'otel'
|
|
51
58
|
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.20.0; extra == 'otel'
|
|
52
59
|
Requires-Dist: opentelemetry-sdk>=1.20.0; extra == 'otel'
|
|
60
|
+
Provides-Extra: proxy
|
|
61
|
+
Requires-Dist: aiohttp>=3.9.0; extra == 'proxy'
|
|
53
62
|
Description-Content-Type: text/markdown
|
|
54
63
|
|
|
55
64
|
# pisama-claude-code
|
|
@@ -69,7 +78,7 @@ Description-Content-Type: text/markdown
|
|
|
69
78
|
|
|
70
79
|

|
|
71
80
|
|
|
72
|
-
## Why
|
|
81
|
+
## Why Pisama?
|
|
73
82
|
|
|
74
83
|
When working with Claude Code, have you ever wondered:
|
|
75
84
|
|
|
@@ -82,7 +91,7 @@ When working with Claude Code, have you ever wondered:
|
|
|
82
91
|
|
|
83
92
|
```
|
|
84
93
|
┌─────────────────────┐ ┌─────────────────────┐
|
|
85
|
-
│ Claude Code │ │
|
|
94
|
+
│ Claude Code │ │ Pisama Platform │
|
|
86
95
|
│ + pisama-cc │ ──────▶ │ (optional) │
|
|
87
96
|
│ (capture) │ sync │ - detection │
|
|
88
97
|
└─────────────────────┘ │ - self-healing │
|
|
@@ -146,7 +155,7 @@ Total cost: $ 52.34
|
|
|
146
155
|
```bash
|
|
147
156
|
$ pisama-cc status
|
|
148
157
|
|
|
149
|
-
📊
|
|
158
|
+
📊 Pisama Status
|
|
150
159
|
========================================
|
|
151
160
|
|
|
152
161
|
🔧 Hook Installation:
|
|
@@ -209,10 +218,13 @@ OTEL export uses [GenAI semantic conventions](https://opentelemetry.io/docs/spec
|
|
|
209
218
|
| `pisama-cc usage` | Token usage breakdown (`--by-model`, `--by-tool`) |
|
|
210
219
|
| `pisama-cc export` | Export to JSONL or OTEL (`--format otel`, `--compress`) |
|
|
211
220
|
| `pisama-cc export-otel` | Export to OpenTelemetry collector (`-e ENDPOINT`) |
|
|
212
|
-
| `pisama-cc connect` | Connect to
|
|
221
|
+
| `pisama-cc connect` | Connect to Pisama platform (forwarding is opt-in; add `--auto-sync` to forward every session) |
|
|
213
222
|
| `pisama-cc sync` | Upload traces to platform |
|
|
214
223
|
| `pisama-cc analyze` | Run failure detection (requires platform) |
|
|
215
|
-
| `pisama-cc
|
|
224
|
+
| `pisama-cc proxy serve` | Run the opt-in reasoning proxy for a session (experimental) |
|
|
225
|
+
| `pisama-cc proxy install --always-on` | Always-on reasoning capture (macOS launchd) |
|
|
226
|
+
| `pisama-cc proxy status` / `uninstall` | Proxy health / teardown |
|
|
227
|
+
| `pisama-cc vault status` | Show PII tokenization vault status (`[core]`) |
|
|
216
228
|
|
|
217
229
|
## Model Pricing
|
|
218
230
|
|
|
@@ -227,10 +239,17 @@ Supported models and pricing (per 1M tokens):
|
|
|
227
239
|
|
|
228
240
|
## Privacy & Security
|
|
229
241
|
|
|
230
|
-
- **Local-first**:
|
|
231
|
-
- **
|
|
232
|
-
|
|
233
|
-
- **
|
|
242
|
+
- **Local-first**: all traces are stored in `~/.claude/pisama/traces/`.
|
|
243
|
+
- **Forwarding is opt-in**: `connect` defaults to no auto-sync. Nothing leaves
|
|
244
|
+
your machine until you run `pisama-cc sync` or reconnect with `--auto-sync`.
|
|
245
|
+
- **Secrets scrubbed by default**: credential-shaped strings (API keys, JWTs,
|
|
246
|
+
cloud tokens) are redacted from content before forwarding — no extras needed.
|
|
247
|
+
The optional `[core]` extra adds pisama-core's reversible keychain vault.
|
|
248
|
+
- **Paths anonymized**: home-directory paths are replaced with `~`.
|
|
249
|
+
- **Reasoning proxy is experimental + opt-in**: `pisama-cc proxy` routes API
|
|
250
|
+
traffic through a local logging proxy to recover extended-thinking. It defaults
|
|
251
|
+
to API-key usage. **Subscription (OAuth) users**: it handles your account token,
|
|
252
|
+
which is ToS-sensitive — use only knowingly.
|
|
234
253
|
|
|
235
254
|
See [SECURITY.md](SECURITY.md) for our security policy.
|
|
236
255
|
|
|
@@ -241,16 +260,20 @@ After installation, the hooks are automatically configured. To customize, edit `
|
|
|
241
260
|
```json
|
|
242
261
|
{
|
|
243
262
|
"hooks": {
|
|
244
|
-
"
|
|
263
|
+
"PostToolUse": [
|
|
245
264
|
{
|
|
246
|
-
"
|
|
247
|
-
"
|
|
265
|
+
"matcher": "*",
|
|
266
|
+
"hooks": [
|
|
267
|
+
{ "type": "command", "command": "~/.claude/hooks/pisama-post.sh", "timeout": 10, "async": true }
|
|
268
|
+
]
|
|
248
269
|
}
|
|
249
270
|
],
|
|
250
|
-
"
|
|
271
|
+
"Stop": [
|
|
251
272
|
{
|
|
252
|
-
"
|
|
253
|
-
"
|
|
273
|
+
"matcher": "*",
|
|
274
|
+
"hooks": [
|
|
275
|
+
{ "type": "command", "command": "~/.claude/hooks/pisama-forward.sh", "timeout": 30, "async": true }
|
|
276
|
+
]
|
|
254
277
|
}
|
|
255
278
|
]
|
|
256
279
|
}
|
|
@@ -259,7 +282,7 @@ After installation, the hooks are automatically configured. To customize, edit `
|
|
|
259
282
|
|
|
260
283
|
## Platform Integration (Optional)
|
|
261
284
|
|
|
262
|
-
For advanced features like failure detection and self-healing, connect to the
|
|
285
|
+
For advanced features like failure detection and self-healing, connect to the Pisama platform:
|
|
263
286
|
|
|
264
287
|
```bash
|
|
265
288
|
pisama-cc connect # Authenticate
|
|
@@ -268,14 +291,14 @@ pisama-cc analyze # Run detection
|
|
|
268
291
|
```
|
|
269
292
|
|
|
270
293
|
Platform features:
|
|
271
|
-
-
|
|
294
|
+
- 25 MAST failure mode detection
|
|
272
295
|
- AI-powered fix suggestions
|
|
273
296
|
- Self-healing automation
|
|
274
297
|
- Visual dashboard
|
|
275
298
|
|
|
276
|
-
## Part of the
|
|
299
|
+
## Part of the Pisama Platform
|
|
277
300
|
|
|
278
|
-
`pisama-claude-code` is the Claude Code integration for the broader **
|
|
301
|
+
`pisama-claude-code` is the Claude Code integration for the broader **Pisama** multi-agent failure detection platform, which supports multiple agent frameworks:
|
|
279
302
|
|
|
280
303
|
| Framework | Package | Status |
|
|
281
304
|
|-----------|---------|--------|
|
|
@@ -316,8 +339,8 @@ MIT License - see [LICENSE](LICENSE) for details.
|
|
|
316
339
|
|
|
317
340
|
## Links
|
|
318
341
|
|
|
319
|
-
- [Documentation](https://pisama.
|
|
320
|
-
- [
|
|
342
|
+
- [Documentation](https://docs.pisama.ai/claude-code)
|
|
343
|
+
- [Pisama Platform](https://pisama.ai)
|
|
321
344
|
- [Issue Tracker](https://github.com/tn-pisama/pisama-claude-code/issues)
|
|
322
345
|
- [Discussions](https://github.com/tn-pisama/pisama-claude-code/discussions)
|
|
323
346
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|

|
|
17
17
|
|
|
18
|
-
## Why
|
|
18
|
+
## Why Pisama?
|
|
19
19
|
|
|
20
20
|
When working with Claude Code, have you ever wondered:
|
|
21
21
|
|
|
@@ -28,7 +28,7 @@ When working with Claude Code, have you ever wondered:
|
|
|
28
28
|
|
|
29
29
|
```
|
|
30
30
|
┌─────────────────────┐ ┌─────────────────────┐
|
|
31
|
-
│ Claude Code │ │
|
|
31
|
+
│ Claude Code │ │ Pisama Platform │
|
|
32
32
|
│ + pisama-cc │ ──────▶ │ (optional) │
|
|
33
33
|
│ (capture) │ sync │ - detection │
|
|
34
34
|
└─────────────────────┘ │ - self-healing │
|
|
@@ -92,7 +92,7 @@ Total cost: $ 52.34
|
|
|
92
92
|
```bash
|
|
93
93
|
$ pisama-cc status
|
|
94
94
|
|
|
95
|
-
📊
|
|
95
|
+
📊 Pisama Status
|
|
96
96
|
========================================
|
|
97
97
|
|
|
98
98
|
🔧 Hook Installation:
|
|
@@ -155,10 +155,13 @@ OTEL export uses [GenAI semantic conventions](https://opentelemetry.io/docs/spec
|
|
|
155
155
|
| `pisama-cc usage` | Token usage breakdown (`--by-model`, `--by-tool`) |
|
|
156
156
|
| `pisama-cc export` | Export to JSONL or OTEL (`--format otel`, `--compress`) |
|
|
157
157
|
| `pisama-cc export-otel` | Export to OpenTelemetry collector (`-e ENDPOINT`) |
|
|
158
|
-
| `pisama-cc connect` | Connect to
|
|
158
|
+
| `pisama-cc connect` | Connect to Pisama platform (forwarding is opt-in; add `--auto-sync` to forward every session) |
|
|
159
159
|
| `pisama-cc sync` | Upload traces to platform |
|
|
160
160
|
| `pisama-cc analyze` | Run failure detection (requires platform) |
|
|
161
|
-
| `pisama-cc
|
|
161
|
+
| `pisama-cc proxy serve` | Run the opt-in reasoning proxy for a session (experimental) |
|
|
162
|
+
| `pisama-cc proxy install --always-on` | Always-on reasoning capture (macOS launchd) |
|
|
163
|
+
| `pisama-cc proxy status` / `uninstall` | Proxy health / teardown |
|
|
164
|
+
| `pisama-cc vault status` | Show PII tokenization vault status (`[core]`) |
|
|
162
165
|
|
|
163
166
|
## Model Pricing
|
|
164
167
|
|
|
@@ -173,10 +176,17 @@ Supported models and pricing (per 1M tokens):
|
|
|
173
176
|
|
|
174
177
|
## Privacy & Security
|
|
175
178
|
|
|
176
|
-
- **Local-first**:
|
|
177
|
-
- **
|
|
178
|
-
|
|
179
|
-
- **
|
|
179
|
+
- **Local-first**: all traces are stored in `~/.claude/pisama/traces/`.
|
|
180
|
+
- **Forwarding is opt-in**: `connect` defaults to no auto-sync. Nothing leaves
|
|
181
|
+
your machine until you run `pisama-cc sync` or reconnect with `--auto-sync`.
|
|
182
|
+
- **Secrets scrubbed by default**: credential-shaped strings (API keys, JWTs,
|
|
183
|
+
cloud tokens) are redacted from content before forwarding — no extras needed.
|
|
184
|
+
The optional `[core]` extra adds pisama-core's reversible keychain vault.
|
|
185
|
+
- **Paths anonymized**: home-directory paths are replaced with `~`.
|
|
186
|
+
- **Reasoning proxy is experimental + opt-in**: `pisama-cc proxy` routes API
|
|
187
|
+
traffic through a local logging proxy to recover extended-thinking. It defaults
|
|
188
|
+
to API-key usage. **Subscription (OAuth) users**: it handles your account token,
|
|
189
|
+
which is ToS-sensitive — use only knowingly.
|
|
180
190
|
|
|
181
191
|
See [SECURITY.md](SECURITY.md) for our security policy.
|
|
182
192
|
|
|
@@ -187,16 +197,20 @@ After installation, the hooks are automatically configured. To customize, edit `
|
|
|
187
197
|
```json
|
|
188
198
|
{
|
|
189
199
|
"hooks": {
|
|
190
|
-
"
|
|
200
|
+
"PostToolUse": [
|
|
191
201
|
{
|
|
192
|
-
"
|
|
193
|
-
"
|
|
202
|
+
"matcher": "*",
|
|
203
|
+
"hooks": [
|
|
204
|
+
{ "type": "command", "command": "~/.claude/hooks/pisama-post.sh", "timeout": 10, "async": true }
|
|
205
|
+
]
|
|
194
206
|
}
|
|
195
207
|
],
|
|
196
|
-
"
|
|
208
|
+
"Stop": [
|
|
197
209
|
{
|
|
198
|
-
"
|
|
199
|
-
"
|
|
210
|
+
"matcher": "*",
|
|
211
|
+
"hooks": [
|
|
212
|
+
{ "type": "command", "command": "~/.claude/hooks/pisama-forward.sh", "timeout": 30, "async": true }
|
|
213
|
+
]
|
|
200
214
|
}
|
|
201
215
|
]
|
|
202
216
|
}
|
|
@@ -205,7 +219,7 @@ After installation, the hooks are automatically configured. To customize, edit `
|
|
|
205
219
|
|
|
206
220
|
## Platform Integration (Optional)
|
|
207
221
|
|
|
208
|
-
For advanced features like failure detection and self-healing, connect to the
|
|
222
|
+
For advanced features like failure detection and self-healing, connect to the Pisama platform:
|
|
209
223
|
|
|
210
224
|
```bash
|
|
211
225
|
pisama-cc connect # Authenticate
|
|
@@ -214,14 +228,14 @@ pisama-cc analyze # Run detection
|
|
|
214
228
|
```
|
|
215
229
|
|
|
216
230
|
Platform features:
|
|
217
|
-
-
|
|
231
|
+
- 25 MAST failure mode detection
|
|
218
232
|
- AI-powered fix suggestions
|
|
219
233
|
- Self-healing automation
|
|
220
234
|
- Visual dashboard
|
|
221
235
|
|
|
222
|
-
## Part of the
|
|
236
|
+
## Part of the Pisama Platform
|
|
223
237
|
|
|
224
|
-
`pisama-claude-code` is the Claude Code integration for the broader **
|
|
238
|
+
`pisama-claude-code` is the Claude Code integration for the broader **Pisama** multi-agent failure detection platform, which supports multiple agent frameworks:
|
|
225
239
|
|
|
226
240
|
| Framework | Package | Status |
|
|
227
241
|
|-----------|---------|--------|
|
|
@@ -262,8 +276,8 @@ MIT License - see [LICENSE](LICENSE) for details.
|
|
|
262
276
|
|
|
263
277
|
## Links
|
|
264
278
|
|
|
265
|
-
- [Documentation](https://pisama.
|
|
266
|
-
- [
|
|
279
|
+
- [Documentation](https://docs.pisama.ai/claude-code)
|
|
280
|
+
- [Pisama Platform](https://pisama.ai)
|
|
267
281
|
- [Issue Tracker](https://github.com/tn-pisama/pisama-claude-code/issues)
|
|
268
282
|
- [Discussions](https://github.com/tn-pisama/pisama-claude-code/discussions)
|
|
269
283
|
|
|
@@ -4,8 +4,8 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pisama-claude-code"
|
|
7
|
-
version = "0.
|
|
8
|
-
description = "Trace capture for Claude Code sessions - sync to
|
|
7
|
+
version = "0.6.3"
|
|
8
|
+
description = "Trace capture for Claude Code sessions - sync to Pisama platform for analysis"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
11
11
|
requires-python = ">=3.10"
|
|
@@ -13,7 +13,7 @@ authors = [
|
|
|
13
13
|
{ name = "Tuomo Nikulainen" }
|
|
14
14
|
]
|
|
15
15
|
maintainers = [
|
|
16
|
-
{ name = "
|
|
16
|
+
{ name = "Pisama Team", email = "team@pisama.ai" }
|
|
17
17
|
]
|
|
18
18
|
keywords = [
|
|
19
19
|
"claude",
|
|
@@ -67,21 +67,30 @@ otel = [
|
|
|
67
67
|
"opentelemetry-sdk>=1.20.0",
|
|
68
68
|
"opentelemetry-exporter-otlp-proto-http>=1.20.0",
|
|
69
69
|
]
|
|
70
|
+
lite = [
|
|
71
|
+
"pyyaml>=6.0",
|
|
72
|
+
]
|
|
73
|
+
proxy = [
|
|
74
|
+
"aiohttp>=3.9.0",
|
|
75
|
+
]
|
|
70
76
|
dev = [
|
|
71
77
|
"pytest>=7.0.0",
|
|
72
78
|
"pytest-asyncio>=0.21.0",
|
|
73
79
|
"pytest-cov>=4.0.0",
|
|
80
|
+
"aiohttp>=3.9.0",
|
|
81
|
+
"pisama-core>=1.7.0",
|
|
82
|
+
"pyyaml>=6.0",
|
|
74
83
|
]
|
|
75
84
|
all = [
|
|
76
|
-
"pisama-claude-code[core,otel]",
|
|
85
|
+
"pisama-claude-code[core,otel,lite,proxy]",
|
|
77
86
|
]
|
|
78
87
|
|
|
79
88
|
[project.scripts]
|
|
80
89
|
pisama-cc = "pisama_claude_code.cli:main"
|
|
81
90
|
|
|
82
91
|
[project.urls]
|
|
83
|
-
Homepage = "https://pisama.
|
|
84
|
-
Documentation = "https://pisama.
|
|
92
|
+
Homepage = "https://pisama.ai"
|
|
93
|
+
Documentation = "https://pisama.ai/docs/claude-code"
|
|
85
94
|
Repository = "https://github.com/tn-pisama/pisama-claude-code"
|
|
86
95
|
Issues = "https://github.com/tn-pisama/pisama-claude-code/issues"
|
|
87
96
|
Changelog = "https://github.com/tn-pisama/pisama-claude-code/blob/main/CHANGELOG.md"
|
|
@@ -90,6 +99,12 @@ Discussions = "https://github.com/tn-pisama/pisama-claude-code/discussions"
|
|
|
90
99
|
[tool.hatch.build.targets.wheel]
|
|
91
100
|
packages = ["src/pisama_claude_code"]
|
|
92
101
|
|
|
102
|
+
[tool.hatch.build.targets.sdist]
|
|
103
|
+
include = [
|
|
104
|
+
"/src",
|
|
105
|
+
"/tests",
|
|
106
|
+
]
|
|
107
|
+
|
|
93
108
|
[tool.pytest.ini_options]
|
|
94
109
|
asyncio_mode = "auto"
|
|
95
110
|
testpaths = ["tests"]
|
|
@@ -100,3 +115,6 @@ target-version = "py310"
|
|
|
100
115
|
|
|
101
116
|
[tool.ruff.lint]
|
|
102
117
|
select = ["E", "F", "I", "N", "W"]
|
|
118
|
+
# Line length is enforced loosely (formatter's job); N806 allows short module
|
|
119
|
+
# aliases (e.g. `P = proxy module`). Keep the substantive F/I/W rules.
|
|
120
|
+
ignore = ["E501", "N806"]
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"""
|
|
1
|
+
"""Pisama Claude Code Integration - Trace capture, failure detection, and self-healing."""
|
|
2
2
|
|
|
3
|
-
__version__ = "0.
|
|
3
|
+
__version__ = "0.6.3"
|
|
4
4
|
|
|
5
5
|
# Lazy imports to avoid loading everything at startup
|
|
6
6
|
def install(force: bool = False):
|
|
7
|
-
"""Install
|
|
7
|
+
"""Install Pisama hooks to ~/.claude/hooks/."""
|
|
8
8
|
from .install import install as _install
|
|
9
9
|
return _install(force=force)
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
def uninstall():
|
|
13
|
-
"""Remove
|
|
13
|
+
"""Remove Pisama hooks from ~/.claude/hooks/."""
|
|
14
14
|
from .install import uninstall as _uninstall
|
|
15
15
|
return _uninstall()
|
|
16
16
|
|
|
@@ -5,17 +5,18 @@ detection, and fix injection through Claude's hook and MCP systems.
|
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
7
|
import sys
|
|
8
|
+
import tempfile
|
|
8
9
|
from dataclasses import dataclass, field
|
|
9
10
|
from datetime import datetime, timezone
|
|
10
11
|
from pathlib import Path
|
|
11
12
|
from typing import Any, Optional
|
|
12
13
|
|
|
13
|
-
from pisama_core.adapters import
|
|
14
|
+
from pisama_core.adapters import InjectionMethod, InjectionResult, PlatformAdapter
|
|
14
15
|
from pisama_core.injection import EnforcementLevel
|
|
15
|
-
from pisama_core.traces import Platform, Span
|
|
16
|
+
from pisama_core.traces import Platform, Span
|
|
16
17
|
|
|
17
|
-
from pisama_claude_code.trace_converter import TraceConverter
|
|
18
18
|
from pisama_claude_code.storage import TraceStorage
|
|
19
|
+
from pisama_claude_code.trace_converter import TraceConverter
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
@dataclass
|
|
@@ -46,7 +47,7 @@ class ClaudeCodeAdapter(PlatformAdapter):
|
|
|
46
47
|
):
|
|
47
48
|
self.pisama_dir = pisama_dir or (Path.home() / ".claude" / "pisama")
|
|
48
49
|
self.traces_dir = self.pisama_dir / "traces"
|
|
49
|
-
self.alert_path = Path("
|
|
50
|
+
self.alert_path = Path(tempfile.gettempdir()) / "pisama-alert.json"
|
|
50
51
|
|
|
51
52
|
self.converter = TraceConverter()
|
|
52
53
|
self.storage = storage or TraceStorage(self.traces_dir)
|