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.
Files changed (59) hide show
  1. {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/PKG-INFO +49 -26
  2. {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/README.md +35 -21
  3. {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/pyproject.toml +24 -6
  4. {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/src/pisama_claude_code/__init__.py +4 -4
  5. {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/src/pisama_claude_code/adapter.py +5 -4
  6. pisama_claude_code-0.6.3/src/pisama_claude_code/cli.py +2652 -0
  7. {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/src/pisama_claude_code/guardian.py +4 -5
  8. {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/src/pisama_claude_code/hooks/capture_hook.py +156 -99
  9. pisama_claude_code-0.6.3/src/pisama_claude_code/hooks/forward_hook.py +90 -0
  10. pisama_claude_code-0.6.3/src/pisama_claude_code/install.py +518 -0
  11. pisama_claude_code-0.6.3/src/pisama_claude_code/lite.py +675 -0
  12. pisama_claude_code-0.6.3/src/pisama_claude_code/lite_config.py +176 -0
  13. pisama_claude_code-0.6.3/src/pisama_claude_code/lite_storage.py +520 -0
  14. {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/src/pisama_claude_code/otel_export.py +67 -17
  15. pisama_claude_code-0.6.3/src/pisama_claude_code/proxy.py +658 -0
  16. pisama_claude_code-0.6.3/src/pisama_claude_code/sample_traces/__init__.py +5 -0
  17. pisama_claude_code-0.6.3/src/pisama_claude_code/sample_traces/demo_loop.jsonl +5 -0
  18. pisama_claude_code-0.6.3/src/pisama_claude_code/skills/__init__.py +0 -0
  19. pisama_claude_code-0.6.3/src/pisama_claude_code/skills/pisama-diagnose/SKILL.codex.md +49 -0
  20. pisama_claude_code-0.6.3/src/pisama_claude_code/skills/pisama-diagnose/SKILL.md +137 -0
  21. pisama_claude_code-0.6.3/src/pisama_claude_code/skills/pisama-diagnose/diagnose.py +502 -0
  22. {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/src/pisama_claude_code/storage.py +2 -3
  23. {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/src/pisama_claude_code/trace_converter.py +1 -1
  24. {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/src/pisama_claude_code/trace_types.py +17 -17
  25. pisama_claude_code-0.6.3/tests/test_agent_identity.py +163 -0
  26. pisama_claude_code-0.6.3/tests/test_capture_parser.py +88 -0
  27. {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/tests/test_cli.py +72 -50
  28. pisama_claude_code-0.6.3/tests/test_diagnose.py +162 -0
  29. pisama_claude_code-0.6.3/tests/test_forward.py +366 -0
  30. pisama_claude_code-0.6.3/tests/test_install_settings.py +124 -0
  31. pisama_claude_code-0.6.3/tests/test_lite.py +800 -0
  32. pisama_claude_code-0.6.3/tests/test_proxy.py +292 -0
  33. pisama_claude_code-0.4.2/.github/ISSUE_TEMPLATE/bug_report.yml +0 -117
  34. pisama_claude_code-0.4.2/.github/ISSUE_TEMPLATE/config.yml +0 -8
  35. pisama_claude_code-0.4.2/.github/ISSUE_TEMPLATE/feature_request.yml +0 -93
  36. pisama_claude_code-0.4.2/.github/PULL_REQUEST_TEMPLATE.md +0 -61
  37. pisama_claude_code-0.4.2/.github/workflows/ci.yml +0 -80
  38. pisama_claude_code-0.4.2/.github/workflows/publish.yml +0 -68
  39. pisama_claude_code-0.4.2/CHANGELOG.md +0 -115
  40. pisama_claude_code-0.4.2/CODE_OF_CONDUCT.md +0 -133
  41. pisama_claude_code-0.4.2/CONTRIBUTING.md +0 -168
  42. pisama_claude_code-0.4.2/SECURITY.md +0 -97
  43. pisama_claude_code-0.4.2/assets/demo.gif +0 -0
  44. pisama_claude_code-0.4.2/demo/README.md +0 -78
  45. pisama_claude_code-0.4.2/demo/demo-simulated.sh +0 -131
  46. pisama_claude_code-0.4.2/demo/demo.cast +0 -153
  47. pisama_claude_code-0.4.2/demo/record-demo.sh +0 -82
  48. pisama_claude_code-0.4.2/src/pisama_claude_code/cli.py +0 -1275
  49. pisama_claude_code-0.4.2/src/pisama_claude_code/install.py +0 -181
  50. {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/.gitignore +0 -0
  51. {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/LICENSE +0 -0
  52. {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/src/pisama_claude_code/hooks/__init__.py +0 -0
  53. {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/src/pisama_claude_code/hooks/guardian_hook.py +0 -0
  54. {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/src/pisama_claude_code/py.typed +0 -0
  55. {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/tests/__init__.py +0 -0
  56. {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/tests/conftest.py +0 -0
  57. {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/tests/test_adapter.py +0 -0
  58. {pisama_claude_code-0.4.2 → pisama_claude_code-0.6.3}/tests/test_guardian.py +0 -0
  59. {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.2
4
- Summary: Trace capture for Claude Code sessions - sync to PISAMA platform for analysis
5
- Project-URL: Homepage, https://pisama.dev
6
- Project-URL: Documentation, https://pisama.dev/docs/claude-code
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: PISAMA Team <team@pisama.dev>
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
  ![pisama-claude-code demo](assets/demo.gif)
71
80
 
72
- ## Why PISAMA?
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 │ │ PISAMA Platform │
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
- 📊 PISAMA Status
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 PISAMA platform (optional) |
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 vault status` | Show PII tokenization vault status |
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**: All traces stored in `~/.claude/pisama/traces/`
231
- - **Secrets redacted**: API keys, passwords, and tokens are automatically removed
232
- - **Paths anonymized**: Home directory paths replaced with `~`
233
- - **Platform sync is opt-in**: Nothing leaves your machine without explicit action
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
- "PreToolCall": [
263
+ "PostToolUse": [
245
264
  {
246
- "command": "~/.claude/hooks/pisama-pre.sh",
247
- "timeout": 2000
265
+ "matcher": "*",
266
+ "hooks": [
267
+ { "type": "command", "command": "~/.claude/hooks/pisama-post.sh", "timeout": 10, "async": true }
268
+ ]
248
269
  }
249
270
  ],
250
- "PostToolCall": [
271
+ "Stop": [
251
272
  {
252
- "command": "~/.claude/hooks/pisama-post.sh",
253
- "timeout": 2000
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 PISAMA platform:
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
- - 28 MAST failure mode detection
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 PISAMA Platform
299
+ ## Part of the Pisama Platform
277
300
 
278
- `pisama-claude-code` is the Claude Code integration for the broader **PISAMA (Platform for Intelligent Self-healing AI Multi-Agent) Testing Platform**, which supports multiple agent frameworks:
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.dev/docs/claude-code)
320
- - [PISAMA Platform](https://pisama.dev)
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
  ![pisama-claude-code demo](assets/demo.gif)
17
17
 
18
- ## Why PISAMA?
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 │ │ PISAMA Platform │
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
- 📊 PISAMA Status
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 PISAMA platform (optional) |
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 vault status` | Show PII tokenization vault status |
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**: All traces stored in `~/.claude/pisama/traces/`
177
- - **Secrets redacted**: API keys, passwords, and tokens are automatically removed
178
- - **Paths anonymized**: Home directory paths replaced with `~`
179
- - **Platform sync is opt-in**: Nothing leaves your machine without explicit action
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
- "PreToolCall": [
200
+ "PostToolUse": [
191
201
  {
192
- "command": "~/.claude/hooks/pisama-pre.sh",
193
- "timeout": 2000
202
+ "matcher": "*",
203
+ "hooks": [
204
+ { "type": "command", "command": "~/.claude/hooks/pisama-post.sh", "timeout": 10, "async": true }
205
+ ]
194
206
  }
195
207
  ],
196
- "PostToolCall": [
208
+ "Stop": [
197
209
  {
198
- "command": "~/.claude/hooks/pisama-post.sh",
199
- "timeout": 2000
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 PISAMA platform:
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
- - 28 MAST failure mode detection
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 PISAMA Platform
236
+ ## Part of the Pisama Platform
223
237
 
224
- `pisama-claude-code` is the Claude Code integration for the broader **PISAMA (Platform for Intelligent Self-healing AI Multi-Agent) Testing Platform**, which supports multiple agent frameworks:
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.dev/docs/claude-code)
266
- - [PISAMA Platform](https://pisama.dev)
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.4.2"
8
- description = "Trace capture for Claude Code sessions - sync to PISAMA platform for analysis"
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 = "PISAMA Team", email = "team@pisama.dev" }
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.dev"
84
- Documentation = "https://pisama.dev/docs/claude-code"
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
- """PISAMA Claude Code Integration - Trace capture, failure detection, and self-healing."""
1
+ """Pisama Claude Code Integration - Trace capture, failure detection, and self-healing."""
2
2
 
3
- __version__ = "0.4.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 PISAMA hooks to ~/.claude/hooks/."""
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 PISAMA hooks from ~/.claude/hooks/."""
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 PlatformAdapter, InjectionResult, InjectionMethod
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, SpanKind, SpanStatus
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("/tmp/pisama-alert.json")
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)