shim 0.2.0__py3-none-any.whl

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. shim-0.2.0.dist-info/METADATA +382 -0
  2. shim-0.2.0.dist-info/RECORD +59 -0
  3. shim-0.2.0.dist-info/WHEEL +4 -0
  4. shim-0.2.0.dist-info/entry_points.txt +4 -0
  5. shim-0.2.0.dist-info/licenses/LICENSE +201 -0
  6. shim_guard/__init__.py +1 -0
  7. shim_guard/cli/__init__.py +0 -0
  8. shim_guard/cli/app.py +257 -0
  9. shim_guard/cli/configuration.py +190 -0
  10. shim_guard/cli/diagnostics.py +437 -0
  11. shim_guard/cli/integrations.py +264 -0
  12. shim_guard/cli/output.py +46 -0
  13. shim_guard/cli/privacy.py +94 -0
  14. shim_guard/cli/report.py +96 -0
  15. shim_guard/cli/resolution.py +97 -0
  16. shim_guard/cli/watch.py +88 -0
  17. shim_guard/clients/__init__.py +0 -0
  18. shim_guard/clients/claude/__init__.py +0 -0
  19. shim_guard/clients/claude/hook.py +21 -0
  20. shim_guard/clients/claude/settings.py +71 -0
  21. shim_guard/clients/claude/tool_events.py +125 -0
  22. shim_guard/clients/codex/__init__.py +0 -0
  23. shim_guard/clients/codex/hook.py +21 -0
  24. shim_guard/clients/codex/settings.py +90 -0
  25. shim_guard/clients/copilot/__init__.py +0 -0
  26. shim_guard/clients/copilot/hook.py +53 -0
  27. shim_guard/clients/copilot/settings.py +75 -0
  28. shim_guard/clients/hook_settings.py +146 -0
  29. shim_guard/clients/user_prompt_hook.py +117 -0
  30. shim_guard/config.py +170 -0
  31. shim_guard/events/__init__.py +0 -0
  32. shim_guard/events/diet.py +109 -0
  33. shim_guard/events/injection.py +85 -0
  34. shim_guard/events/payload.py +147 -0
  35. shim_guard/events/pipeline.py +195 -0
  36. shim_guard/guard/__init__.py +17 -0
  37. shim_guard/guard/analyze.py +177 -0
  38. shim_guard/guard/entities.py +31 -0
  39. shim_guard/guard/evaluate.py +26 -0
  40. shim_guard/guard/iban_patterns.py +96 -0
  41. shim_guard/guard/models.py +68 -0
  42. shim_guard/guard/normalize.py +159 -0
  43. shim_guard/guard/recognizers.py +514 -0
  44. shim_guard/guard/suffixes.py +7349 -0
  45. shim_guard/hook.py +473 -0
  46. shim_guard/policy.py +100 -0
  47. shim_guard/py.typed +1 -0
  48. shim_guard/session/__init__.py +5 -0
  49. shim_guard/session/ledger.py +162 -0
  50. shim_guard/session/record.py +93 -0
  51. shim_guard/session/spool.py +218 -0
  52. shim_guard/session/summary.py +210 -0
  53. shim_guard/settings_files/__init__.py +14 -0
  54. shim_guard/settings_files/files.py +354 -0
  55. shim_guard/settings_files/plan.py +77 -0
  56. shim_guard/watch/__init__.py +3 -0
  57. shim_guard/watch/measure.py +229 -0
  58. shim_guard/watch/proxy.py +248 -0
  59. shim_guard/watch/report.py +211 -0
@@ -0,0 +1,382 @@
1
+ Metadata-Version: 2.4
2
+ Name: shim
3
+ Version: 0.2.0
4
+ Summary: Local sensitive-data detection, prompt reporting, opt-in prompt blocking, verified Claude tool-event masking, and API-traffic watching
5
+ Author: shim Engineering
6
+ License-Expression: Apache-2.0
7
+ License-File: LICENSE
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Environment :: Console
10
+ Classifier: Operating System :: MacOS
11
+ Classifier: Operating System :: POSIX :: Linux
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Security
18
+ Requires-Dist: phonenumbers==9.0.37
19
+ Requires-Dist: rich==15.0.0
20
+ Requires-Dist: tomli==2.3.0 ; python_full_version < '3.11'
21
+ Requires-Dist: tomli-w==1.2.0
22
+ Requires-Dist: typer==0.23.2
23
+ Requires-Python: >=3.9, <3.14
24
+ Project-URL: Homepage, https://github.com/GetSHIM/shim-cli
25
+ Project-URL: Repository, https://github.com/GetSHIM/shim-cli
26
+ Project-URL: Issues, https://github.com/GetSHIM/shim-cli/issues
27
+ Project-URL: Documentation, https://github.com/GetSHIM/shim-cli#readme
28
+ Description-Content-Type: text/markdown
29
+
30
+ <p align="center">
31
+ <a href="https://getshim.tech">
32
+ <img src="https://raw.githubusercontent.com/GetSHIM/shim-cli/main/docs/assets/shim-logo.svg" alt="shim" width="280">
33
+ </a>
34
+ </p>
35
+
36
+ <h1 align="center">shim Guard</h1>
37
+
38
+ <p align="center">
39
+ <strong>Local traffic visibility and privacy controls for coding agents.</strong><br>
40
+ <a href="https://getshim.tech">getshim.tech</a>
41
+ </p>
42
+
43
+ <p align="center">
44
+ <a href="https://pypi.org/project/shim/"><img src="https://img.shields.io/pypi/v/shim.svg?logo=pypi&amp;label=PyPI" alt="PyPI version"></a>
45
+ <a href="https://github.com/GetSHIM/shim-cli/actions/workflows/ci.yml"><img src="https://github.com/GetSHIM/shim-cli/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
46
+ <a href="https://pypi.org/project/shim/"><img src="https://img.shields.io/pypi/pyversions/shim.svg?logo=python&amp;logoColor=white" alt="Python versions"></a>
47
+ <a href="https://github.com/GetSHIM/shim-cli/blob/main/LICENSE"><img src="https://img.shields.io/github/license/GetSHIM/shim-cli.svg" alt="License"></a>
48
+ <a href="https://github.com/GetSHIM/shim-cli/stargazers"><img src="https://img.shields.io/github/stars/GetSHIM/shim-cli.svg?style=flat&amp;logo=github" alt="GitHub stars"></a>
49
+ </p>
50
+
51
+ shim Guard shows you what your coding agent actually sends to the model — how
52
+ many tokens went where, what the turn cost, and which secrets and personal data
53
+ were in it — and masks what it can before the model sees it. The hook and
54
+ detector add no network destination, account, API key, or telemetry. The opt-in
55
+ `shim watch` proxy forwards only to the provider the client already uses.
56
+
57
+ Two commands, two different questions:
58
+
59
+ | Command | Answers |
60
+ | --- | --- |
61
+ | `shim watch -- claude` | What did this session actually send, and what did it cost? |
62
+ | `shim install claude` | Mask secrets and personal data in eligible tool results, every session, automatically. |
63
+
64
+ > [!WARNING]
65
+ > shim Guard is alpha software and a best-effort guard, not a data-loss
66
+ > prevention boundary. Read the [privacy limitations](https://github.com/GetSHIM/shim-cli/blob/main/docs/privacy.md) before
67
+ > using it with sensitive data.
68
+
69
+ ## Measure a session
70
+
71
+ Nobody can tell you where their agent's context window actually goes. `shim
72
+ watch` puts a local proxy in front of the client for one command, forwards
73
+ every byte unchanged, and reports what went past:
74
+
75
+ ```console
76
+ shim watch -- claude
77
+ shim watch -- claude -p "explain this repo"
78
+ ```
79
+
80
+ ```text
81
+ shim watch — 8s, 1 requests
82
+ input 109,678 tokens (exact)
83
+ cache read 91,562 83%
84
+ cache write 18,114
85
+ output 157 tokens (exact)
86
+ where the input went (approximate — split by byte share)
87
+ tools ~ 90,001 82%
88
+ system ~ 10,361 9%
89
+ messages ~ 9,185 8%
90
+ @ files 1 inlined, 354 bytes (invisible to hooks)
91
+ found 2 EMAIL in traffic
92
+ spend ~$0.10 (approximate, 2026-08-30 prices)
93
+ ```
94
+
95
+ On the session above, **the tools array was 82% of the input tokens** — before
96
+ a single line of the user's own code. That is one session on one repository,
97
+ not a universal figure, which is the point: it is your number and you have no
98
+ other way to get it.
99
+
100
+ Token counts come from the provider's own `usage` block and are exact. How
101
+ they divide between sections has no ground truth on the wire, so it is
102
+ inferred from byte share, marked `~`, and always sums to the exact total.
103
+ Exact and inferred figures never share a column.
104
+
105
+ It also covers what hooks structurally cannot see: files pulled in with `@` are
106
+ inlined by the client while it builds the prompt, so no hook fires for them,
107
+ and the system prompt, the tools array and the token counts are never handed to
108
+ a hook at all.
109
+
110
+ **It forwards and measures. It does not modify.** Not one byte of a request is
111
+ changed, no request body is ever written to disk, and nothing is transmitted
112
+ anywhere except to the provider the client was already talking to. The proxy
113
+ binds to loopback, exists for the length of the command, and nothing is left
114
+ behind — no shell profile is edited and no setting is changed.
115
+
116
+ Overhead measured against a live session: about 6 ms of proxy plumbing plus a
117
+ 23 ms TLS handshake per request. Scanning the body costs more than that, but it
118
+ runs after the request has been sent, inside the window where the provider is
119
+ already thinking, so it does not delay anything.
120
+
121
+ Claude Code is verified. Codex runs with a warning — a ChatGPT sign-in behind a
122
+ third-party proxy is documented but untested. Copilot is out of scope: it
123
+ accepts a custom endpoint only through bring-your-own-key, which removes GitHub
124
+ authentication altogether, so there is nothing to watch.
125
+
126
+ ## Supported clients
127
+
128
+ | Client | Your typed prompt | Tool input and results |
129
+ | --- | --- | --- |
130
+ | [Claude Code](https://github.com/anthropics/claude-code) | Reports what it found and lets it through; blocks under `enforce` | Eligible structured arguments and inbound results are masked; commands and local writes are report-or-deny only |
131
+ | [Codex CLI](https://github.com/openai/codex) | Reports what it found and lets it through; blocks under `enforce` | Not installed — no verified native tool-event adapter |
132
+ | [GitHub Copilot CLI](https://github.com/github/copilot-cli) | Replaces the model-facing prompt with the redacted text | Not installed — no verified native tool-event adapter |
133
+
134
+ Tool coverage is verified against a running client, not derived from
135
+ documentation. `shim doctor <client>` prints exactly which events are installed
136
+ and what shim can and cannot change at each one.
137
+
138
+ shim Guard detects email addresses, phone numbers, credit cards, IBANs, IP and
139
+ MAC addresses, US SSNs, Turkish national and tax IDs, secrets, and database
140
+ URIs. Checksums are verified where they exist, so a mistyped IBAN or national
141
+ ID is not reported.
142
+
143
+ It deliberately stays quiet on values that name nobody: loopback and
144
+ unspecified addresses (`127.0.0.1`, `0.0.0.0`, `::1`) and connection strings to
145
+ them that carry no credentials (`redis://localhost:6379/0`). Private ranges,
146
+ real hosts, and anything with a `user:password@` are still detected. Once
147
+ `0.0.0.0` and `127.0.0.1` both read as `<IP_ADDRESS_1>`, the model can no
148
+ longer tell "listen on every interface" from "loopback only" — detection that
149
+ fires where there is nothing to find is how people learn to ignore it.
150
+
151
+ Detection runs locally without an account, API key, network request, daemon,
152
+ telemetry, or prompt history.
153
+
154
+ ## Install
155
+
156
+ shim Guard supports CPython 3.9 through 3.13 on macOS and Linux, including
157
+ the system `python3` on macOS. Choose one package manager:
158
+
159
+ ```console
160
+ uv tool install --compile-bytecode shim
161
+ # or
162
+ pipx install shim
163
+ ```
164
+
165
+ If you installed the previous `shim-guard` distribution, uninstall it before
166
+ installing `shim`; both distributions provide the same commands.
167
+
168
+ Preview and install the hook for your client:
169
+
170
+ ```console
171
+ shim install codex --dry-run
172
+ shim install codex
173
+ shim doctor codex
174
+ ```
175
+
176
+ Replace `codex` with `claude` or `copilot` as needed. Run `shim help` for all
177
+ commands.
178
+
179
+ ### Marketplace plugins
180
+
181
+ Codex and Claude Code users can install the repository's marketplace plugin:
182
+
183
+ ```console
184
+ codex plugin marketplace add GetSHIM/shim-cli
185
+ codex plugin add shim-guard@shim-guard
186
+ ```
187
+
188
+ ```text
189
+ /plugin marketplace add GetSHIM/shim-cli
190
+ /plugin install shim-guard@shim-guard
191
+ ```
192
+
193
+ The marketplace plugin and `shim install` are alternative hook-registration
194
+ methods. Do not use both for the same client. Release-tag Claude plugins bundle
195
+ the hook archive and need only Python 3.9 or newer; the Codex plugin currently
196
+ uses `shim-guard-hook` from the installed CLI package. A development checkout
197
+ may not contain the release archive.
198
+
199
+ ## Use
200
+
201
+ Once the hook is installed, use your client normally. To inspect text directly,
202
+ pipe it through `scan` or `redact`:
203
+
204
+ ```console
205
+ printf '%s' 'Contact me at alice@example.com' | shim scan
206
+ printf '%s' 'Contact me at alice@example.com' | shim redact
207
+ ```
208
+
209
+ Both commands read standard input. Do not pass real prompts as command-line
210
+ arguments, where they may be recorded in shell history or process listings.
211
+
212
+ > [!IMPORTANT]
213
+ > **With the default configuration, shim Guard does not prevent a secret you
214
+ > type into a prompt from reaching the model. It tells you afterwards.**
215
+ > Codex and Claude Code offer no field for rewriting a submitted prompt, so the
216
+ > only way to stop one is to refuse the sentence you just typed — which is
217
+ > disruptive and rare enough that it is not the default. Set
218
+ > `user-prompt = "enforce"` in `[mode]` to block instead. Copilot's
219
+ > `userPromptTransformed` event does support a model-facing replacement. Claude
220
+ > tool results are masked at the verified installed events.
221
+
222
+ ## See what it did
223
+
224
+ shim says nothing when it works, so it keeps a short record of its own
225
+ decisions. Claude's verified `Stop` hook shows the total at the end of a turn
226
+ where something changed:
227
+
228
+ ```text
229
+ shim — this session
230
+ masked 60 EMAIL (Read customers.csv)
231
+ 60 IBAN (Read customers.csv)
232
+ 60 PHONE (Read customers.csv)
233
+ 60 TR_NATIONAL_ID (Read customers.csv)
234
+ flagged 1 INSTRUCTION_OVERRIDE (Read runbook.md)
235
+ 1 HIDDEN_TEXT (Read runbook.md)
236
+ overhead 62 ms median, 119 ms p95
237
+ ```
238
+
239
+ That is a real session against Claude Code, not an illustration: a 5.5 KB
240
+ customer file, every value in it replaced before the model saw it, and a
241
+ document in the repository caught trying to give the agent instructions. Run
242
+ under `shim watch` at the same time, the proxy — which reads the actual wire,
243
+ independently of the hook — reported two email addresses in the whole session,
244
+ both from the client's own system messages. None of the sixty reached the
245
+ model.
246
+
247
+ `shim report` prints the same summary on demand, and `--json` makes it
248
+ scriptable. It reads the newest temporary spool first; if none remains, it
249
+ falls back to the retained ledger, if you turned that on.
250
+
251
+ ## Shrink tool results
252
+
253
+ At Claude's verified `PostToolUse` event, shim compacts eligible tool results
254
+ before the model reads them, so the context window fills more slowly. Nothing
255
+ is ever truncated or summarised, and a result that cannot be shrunk safely is
256
+ left unchanged by the diet. Two transforms ship; only lossless JSON compaction
257
+ is on by default:
258
+
259
+ | Transform | What it does |
260
+ | --- | --- |
261
+ | `json` | Removes the whitespace *between* JSON tokens. Every number literal, duplicate key and string survives byte-for-byte, because this is a lexer rather than a parse and re-serialise. Lossless. |
262
+ | `whitespace` | Strips trailing spaces and tabs from the end of each line. Line count is never changed. Not byte-for-byte: a Markdown hard line break is two trailing spaces, and it does not survive this. |
263
+
264
+ It applies to tool *results* only — never to a tool's arguments, never to
265
+ anything written to your disk, and never under `mode = "observe"`.
266
+
267
+ **The diet also never touches a result that shows you a file.** `Edit` matches its
268
+ `old_string` against what is on disk, not against what the model was shown, so
269
+ compacting a pretty-printed file on the way in makes the next edit of that file
270
+ miss. Reads, notebooks and edit results are unchanged by the diet; sensitive
271
+ values can still be masked according to policy. Fetched pages, command output
272
+ and tool results are where the saving comes from.
273
+
274
+ Turn it off with `shim config --no-diet`, or name individual transforms in the
275
+ config file. Trailing-whitespace removal is opt in because it can remove a
276
+ Markdown hard line break:
277
+
278
+ ```toml
279
+ diet = ["json", "whitespace"] # or false to disable entirely
280
+ ```
281
+
282
+ While reading results shim also flags text that is trying to give the model
283
+ orders — "ignore all previous instructions", impersonated system messages,
284
+ invisible characters. These are **reported and never acted on**: rewriting a
285
+ tool result because it reads as imperative would corrupt legitimate content.
286
+ They appear in the session summary as `flagged`, naming the file they came
287
+ from — which is the only part you can act on:
288
+
289
+ ```
290
+ flagged 1 INSTRUCTION_OVERRIDE (Read release-notes.md)
291
+ 1 HIDDEN_TEXT (Read release-notes.md)
292
+ ```
293
+
294
+ The record holds entity names, counts and the file or URL involved — never the
295
+ value that was found, and never a shell command. It lives in a private OS
296
+ temporary file. Claude's installed `SessionEnd` hook deletes that session's
297
+ file; clients without a verified lifecycle hook leave it to operating-system
298
+ temporary cleanup. `shim config --ledger` opts in to monthly retained copies.
299
+ A month becomes eligible for pruning 30 days after its end and is removed on a
300
+ later ledger write; `shim ledger purge` deletes all ledger files immediately.
301
+ Nothing is ever transmitted. See
302
+ [Privacy](https://github.com/GetSHIM/shim-cli/blob/main/docs/privacy.md#what-is-recorded).
303
+
304
+ ## Configure detection
305
+
306
+ All supported entity types are enabled by default. View or change the local
307
+ policy with:
308
+
309
+ ```console
310
+ shim config
311
+ shim config --only EMAIL --only SECRET
312
+ shim config --disable IP_ADDRESS --disable MAC_ADDRESS
313
+ shim config --reset
314
+ shim config --ledger # keep the session record past the session
315
+ shim config --no-diet # stop shrinking tool results
316
+ ```
317
+
318
+ `shim config` with no arguments prints the entity table plus the current
319
+ ledger and diet state, so what shim keeps and what it rewrites is answerable
320
+ without opening the file.
321
+
322
+ Detection can also be narrowed for one tool at a time, which the CLI has no
323
+ flag for — scan commands for secrets without scanning every file read for
324
+ phone numbers:
325
+
326
+ ```toml
327
+ [entities]
328
+ Bash = ["SECRET", "DB_URI"]
329
+ Read = ["SECRET"]
330
+ ```
331
+
332
+ Every key in the file is optional. A file holding only `[mode]` or only
333
+ `[entities]` is valid and everything else keeps its shipped default.
334
+
335
+ Changes are previewed before they are saved. The CLI, installed hook, `scan`,
336
+ and `redact` all use the same policy.
337
+
338
+ ## Privacy limitations
339
+
340
+ - The host client receives the raw prompt before its hook runs, and other hooks
341
+ may receive it concurrently.
342
+ - Detection is best-effort and may miss sensitive values.
343
+ - A disabled, untrusted, crashed, or timed-out hook may fail open according to
344
+ client behavior.
345
+ - Clients, providers, and other tools may retain data independently of shim.
346
+ - Redacted temporary files may still contain missed sensitive content. Review
347
+ them before resubmission and delete them when finished.
348
+
349
+ See [Privacy](https://github.com/GetSHIM/shim-cli/blob/main/docs/privacy.md) for the full trust boundary and
350
+ [Compatibility](https://github.com/GetSHIM/shim-cli/blob/main/docs/compatibility.md) for tested versions and evidence.
351
+
352
+ ## Uninstall
353
+
354
+ Remove shim Guard's hook before uninstalling the package:
355
+
356
+ ```console
357
+ shim revert codex
358
+ ```
359
+
360
+ Replace `codex` with the client you installed. `shim watch` needs no uninstall:
361
+ it edits nothing, so there is nothing to undo.
362
+
363
+ ## Project documentation
364
+
365
+ - [Architecture](https://github.com/GetSHIM/shim-cli/blob/main/docs/architecture.md)
366
+ - [Compatibility](https://github.com/GetSHIM/shim-cli/blob/main/docs/compatibility.md)
367
+ - [Privacy](https://github.com/GetSHIM/shim-cli/blob/main/docs/privacy.md)
368
+ - [0.2.0 release notes](https://github.com/GetSHIM/shim-cli/blob/main/docs/releases/0.2.0.md)
369
+ - [Contributing](https://github.com/GetSHIM/shim-cli/blob/main/CONTRIBUTING.md)
370
+ - [Security policy](https://github.com/GetSHIM/shim-cli/blob/main/SECURITY.md)
371
+
372
+ ## Development
373
+
374
+ Run the complete local check from the repository root:
375
+
376
+ ```console
377
+ python scripts/check.py
378
+ ```
379
+
380
+ ## License
381
+
382
+ Apache-2.0. See [LICENSE](https://github.com/GetSHIM/shim-cli/blob/main/LICENSE).
@@ -0,0 +1,59 @@
1
+ shim_guard/__init__.py,sha256=Zn1KFblwuFHiDRdRAiRnDBRkbPttWh44jKa5zG2ov0E,22
2
+ shim_guard/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ shim_guard/cli/app.py,sha256=jeM-VhTWMo7dOyzLf1X5U23igHGn9DCYKodcJ9Sa22s,7503
4
+ shim_guard/cli/configuration.py,sha256=pB03xu5fATBSSbS_zkLj4vMkhknG-d8sl_wAxarG3Wk,6103
5
+ shim_guard/cli/diagnostics.py,sha256=XkE34QPDZKSti8B2qGASLzILF7K1EKYAiBgdEfY9nxc,14095
6
+ shim_guard/cli/integrations.py,sha256=zkJibCkY4O8AAWL0-K3v716a4oFvqvgMm85_VskEy7s,8947
7
+ shim_guard/cli/output.py,sha256=e41nct7sV3dcTDbAlXRXY_HHGMWXJPP8w85WI60oZw8,1397
8
+ shim_guard/cli/privacy.py,sha256=L1kuQ1uB2F4WV8QLv7Q5Z4yk4esqseC2foy-tXKcWl0,2800
9
+ shim_guard/cli/report.py,sha256=HCpMGA9KlVlarzyZSdFZL5ZSJLz9nn07l9CcNkCTJMA,3062
10
+ shim_guard/cli/resolution.py,sha256=BtPiRZ9g5TeCxH_4Xt2uTKTS6w_KFeiEvdWaKe1nAVE,3037
11
+ shim_guard/cli/watch.py,sha256=Yc7ds6u9yBDRLON9u90ZH5T3nwU20idOGOPLDJ9J_FI,2560
12
+ shim_guard/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
+ shim_guard/clients/claude/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
+ shim_guard/clients/claude/hook.py,sha256=jVW1IMf5t12WQy_oEKCXTc_lOKZtxskUV9l8OplroQA,587
15
+ shim_guard/clients/claude/settings.py,sha256=Dvn0E18VaET0qVaVVJ9uUi14tXpjhgnqoPHhosViDTs,2367
16
+ shim_guard/clients/claude/tool_events.py,sha256=g6oL2DJ2TRnGcvSHPfVK6KYtDtzVYNNqQktV_HUApFE,3859
17
+ shim_guard/clients/codex/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
+ shim_guard/clients/codex/hook.py,sha256=FErdXZA7I_4KO_QC8OTColQsAIXYhGqw_CWd9r0vZWs,616
19
+ shim_guard/clients/codex/settings.py,sha256=mDxDofBjV6jihgbyyzcHFMSZRNEeWg2WhnGrRPSFNEk,2851
20
+ shim_guard/clients/copilot/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
+ shim_guard/clients/copilot/hook.py,sha256=MLvBtO85CdlDsNFHDBTtL3aE9dimMKvDIWHFmFO-D30,1578
22
+ shim_guard/clients/copilot/settings.py,sha256=kELPERWT_V9WKPcP60pPxDnghXbks1PMJdN6B1RAXlU,2423
23
+ shim_guard/clients/hook_settings.py,sha256=qkeXUidOVOK2qwdkCAi0FY3hSXagDU9puZQoapcZ0lA,4741
24
+ shim_guard/clients/user_prompt_hook.py,sha256=Q9LKtXO3aZpptOfb-uhQFL2pogzlARq59wVwQFdzRf8,3988
25
+ shim_guard/config.py,sha256=FoTf5cpZEg78jeZyNt_XKfLQwbiXYInLft_vZ8Vbajg,5721
26
+ shim_guard/events/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
+ shim_guard/events/diet.py,sha256=6oJV2aPhLgD9kV00o_Qo3OXIsvs7SdrWTEAdRISs79M,2690
28
+ shim_guard/events/injection.py,sha256=m2wydXGVI893xTmXL7OcGN_8InVfFrxprNwsLwTr2Nc,2242
29
+ shim_guard/events/payload.py,sha256=92l3gihtg_Pm5jOhMwFQDzTj1F3tfMQXAkL2k8NR0Mg,4258
30
+ shim_guard/events/pipeline.py,sha256=ieiPgurneE4LmT6m-80umzSWOx3aFI3lWZDtEeZKWPI,5261
31
+ shim_guard/guard/__init__.py,sha256=sgnWf9-ri-7OWiD2kOlElpYSl7VaTxMRrTdDft0zTqQ,462
32
+ shim_guard/guard/analyze.py,sha256=oZliXZ0tLylZHNDe-h8e1fwIPufRldgXQyyJh1nKNMQ,5912
33
+ shim_guard/guard/entities.py,sha256=y3XRb4XDCVLew0kdY9A5nCdwhkobUWImk95lOuNrSCM,832
34
+ shim_guard/guard/evaluate.py,sha256=QRn1sAl2TCYHzAmSHI-g9BACbRGMfoMVKj0jaDO_WWo,804
35
+ shim_guard/guard/iban_patterns.py,sha256=VMSlF6lOIKDH7zoHQQohJW9mloEUdtfG6wrPE1Q64L0,4193
36
+ shim_guard/guard/models.py,sha256=BpV4wRj5RwC-WopBsMGzUvPpBsrTpivwyVTAswqAhqU,2054
37
+ shim_guard/guard/normalize.py,sha256=Lvj7P9P4MnBcrZc6WfS0hrOi_sjCcsIfBCvjzXobX0I,5824
38
+ shim_guard/guard/recognizers.py,sha256=mTFFmAOgDB_1R39CcRBOzWklZGPXOg4KRt60tpxz_5w,15044
39
+ shim_guard/guard/suffixes.py,sha256=yPvnTFlvXLzjdAutkG37kOFCrBheRLt4ERPt_A5KIOo,83328
40
+ shim_guard/hook.py,sha256=k9yhvtKFzZcNphlSwVhoK8_7T9aaS_ziIadW5LO87AY,14866
41
+ shim_guard/policy.py,sha256=1SQd8OOVSyBSuOguOFcwlu5ZDEbV1_6Yis1mGNnv_AE,2626
42
+ shim_guard/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
43
+ shim_guard/session/__init__.py,sha256=QTdXVEq4vm9ISp5wrJry0PidVvZ9OCQYavRcYQr95p0,112
44
+ shim_guard/session/ledger.py,sha256=kPcTHaeZTVWn9EOLwFt_VdRdsZ25ix1s3y0Z4J-YJZ8,4720
45
+ shim_guard/session/record.py,sha256=m0w3FBtyqnqcooYEyTo5Y1F-08zAQkH0GSvHxKrrsOQ,2167
46
+ shim_guard/session/spool.py,sha256=3gxwyretFm-ZWgdunhMrQwIE4GzSsz4Dv31tfWW3_Zw,6422
47
+ shim_guard/session/summary.py,sha256=FXJbCX_eZ7GoAkuZvcL2xRLKj3dEuK6pXrfWeicnaBg,6519
48
+ shim_guard/settings_files/__init__.py,sha256=8DK5Ard46IO8QTf_wMvra6rOJWA4QgzLg3G29OW2o6g,312
49
+ shim_guard/settings_files/files.py,sha256=XMQLkF6_pxFqDpfJ9U_aVOPLIQHglMACn2JvqS7WOXg,12045
50
+ shim_guard/settings_files/plan.py,sha256=YignltdRrjVavrBtEwQZEVPopWiAtFJf1cmFOJl2G34,2180
51
+ shim_guard/watch/__init__.py,sha256=RzhHUMMcpvCr0FGhnkY2uTDq92jg63Z84jBQBAp0kSM,77
52
+ shim_guard/watch/measure.py,sha256=Ke8HsjBGkwymwwLmpof9y5QawgI-FfsfyPe_DUq6W-M,6728
53
+ shim_guard/watch/proxy.py,sha256=pXrf3YsGUT3evbcTkerJpB77Lrbmju6YLvvBnnmYHNY,7357
54
+ shim_guard/watch/report.py,sha256=hvhQINtkKFf7dSUNAbUpLdyhJw8hmlfVZKvxogtVs_Q,7022
55
+ shim-0.2.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
56
+ shim-0.2.0.dist-info/WHEEL,sha256=4OL6Foqnnp3xRY5wMkjgc25_i5YJC6dKsC6LPcjqEoU,80
57
+ shim-0.2.0.dist-info/entry_points.txt,sha256=5hz3v6bURUgKclGzILSC55m5sHTRk93AuXQ2R7YY4ZU,89
58
+ shim-0.2.0.dist-info/METADATA,sha256=S5BSrs1JPZxQkCqxP-CCOpvRlsq22IfShL0SvGtbRPc,16742
59
+ shim-0.2.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: uv 0.12.5
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,4 @@
1
+ [console_scripts]
2
+ shim = shim_guard.cli.app:main
3
+ shim-guard-hook = shim_guard.hook:main
4
+
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
shim_guard/__init__.py ADDED
@@ -0,0 +1 @@
1
+ __version__ = "0.2.0"
File without changes