restory 0.1.1__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.
- restory-0.1.1/.gitignore +26 -0
- restory-0.1.1/LICENSE +21 -0
- restory-0.1.1/PKG-INFO +61 -0
- restory-0.1.1/README.md +50 -0
- restory-0.1.1/docs/demo.gif +0 -0
- restory-0.1.1/pyproject.toml +21 -0
- restory-0.1.1/restory/__init__.py +3 -0
- restory-0.1.1/restory/__main__.py +5 -0
- restory-0.1.1/restory/classify.py +672 -0
- restory-0.1.1/restory/cli.py +218 -0
- restory-0.1.1/restory/config.py +40 -0
- restory-0.1.1/restory/hook.py +89 -0
- restory-0.1.1/restory/server.py +92 -0
- restory-0.1.1/restory/snapshot.py +241 -0
- restory-0.1.1/restory/store.py +161 -0
- restory-0.1.1/restory/ui/app/globals.css +358 -0
- restory-0.1.1/restory/ui/app/layout.tsx +26 -0
- restory-0.1.1/restory/ui/app/page.tsx +152 -0
- restory-0.1.1/restory/ui/next-env.d.ts +5 -0
- restory-0.1.1/restory/ui/next.config.mjs +8 -0
- restory-0.1.1/restory/ui/package-lock.json +1664 -0
- restory-0.1.1/restory/ui/package.json +24 -0
- restory-0.1.1/restory/ui/postcss.config.js +6 -0
- restory-0.1.1/restory/ui/tailwind.config.ts +15 -0
- restory-0.1.1/restory/ui/tsconfig.json +21 -0
- restory-0.1.1/tests/test_classify.py +186 -0
restory-0.1.1/.gitignore
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.pyc
|
|
4
|
+
*.egg-info/
|
|
5
|
+
build/
|
|
6
|
+
dist/
|
|
7
|
+
.pytest_tmp/
|
|
8
|
+
.pytest-tmp/
|
|
9
|
+
|
|
10
|
+
# Node / UI
|
|
11
|
+
node_modules/
|
|
12
|
+
restory/ui/.next/
|
|
13
|
+
restory/ui/out/
|
|
14
|
+
|
|
15
|
+
# restory local data
|
|
16
|
+
.restory/
|
|
17
|
+
|
|
18
|
+
# Editor / OS
|
|
19
|
+
.vscode/
|
|
20
|
+
.idea/
|
|
21
|
+
Thumbs.db
|
|
22
|
+
.claude/
|
|
23
|
+
|
|
24
|
+
dist/
|
|
25
|
+
test-env/
|
|
26
|
+
*.whl
|
restory-0.1.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DarkAxiom93
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
restory-0.1.1/PKG-INFO
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: restory
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Restory CLI
|
|
5
|
+
License-File: LICENSE
|
|
6
|
+
Requires-Python: >=3.11
|
|
7
|
+
Requires-Dist: fastapi>=0.110
|
|
8
|
+
Requires-Dist: typer>=0.12
|
|
9
|
+
Requires-Dist: uvicorn>=0.29
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
|
|
12
|
+
# đâđĻē restory
|
|
13
|
+
|
|
14
|
+
**restory records everything your AI coding agent touches, blocks the dangerous stuff, and restores your tree with one command.** Local-only.
|
|
15
|
+
|
|
16
|
+

|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pip install restory && restory init
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Why this exists
|
|
25
|
+
|
|
26
|
+
AI coding agents (Claude Code, Cursor, Copilot) run as *you* â with your files, your keys, your shell. A single hallucination or a poisoned file in a repo can `rm -rf` your home dir or POST your `.env` to a pastebin. Allowlists don't catch it ([CVE-2026-22708](https://www.docker.com/blog/coding-agent-horror-stories-the-command-you-already-approved/)), and a container is too heavy for the inner loop.
|
|
27
|
+
|
|
28
|
+
**restory** sits between the agent and your machine: it inspects the *effect* of every command before it runs, records the whole session, and restores it with one keystroke.
|
|
29
|
+
|
|
30
|
+
## What it does
|
|
31
|
+
|
|
32
|
+
- đ **Blocks dangerous effects** â secret reads, network exfiltration, mass deletes, git-history nukes, writes outside the repo â *before* they execute.
|
|
33
|
+
- đŧ **Records everything** â a live, local timeline of every file your agent touched and every command it ran.
|
|
34
|
+
- âŠī¸ **One-command restore** â `restory undo --session` snaps your whole working tree back to where the session started.
|
|
35
|
+
- đ **Local-only** â no accounts, no cloud, nothing leaves your machine.
|
|
36
|
+
|
|
37
|
+
## Install
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pip install restory
|
|
41
|
+
restory init # installs hooks into .claude/settings.json
|
|
42
|
+
restory open # opens the live timeline at http://127.0.0.1:8765
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Works on Windows, macOS, and Linux. Hook-based â no kernel driver, no container.
|
|
46
|
+
|
|
47
|
+
## What restory does NOT do
|
|
48
|
+
|
|
49
|
+
Being honest, because security tools that overpromise get torn apart:
|
|
50
|
+
|
|
51
|
+
- It's **not a sandbox.** A determined attacker with code execution can bypass any command inspection â "argument inspection is theater." restory is defense-in-depth + visibility + instant restore, not a kernel jail.
|
|
52
|
+
- It **won't catch every obfuscation.** It nails the common, high-value danger classes (exfil, mass-delete, secret reads, pipe-to-shell). Novel encodings can slip the classifier â that's what the restore net is for.
|
|
53
|
+
- It **doesn't replace your judgment.** It surfaces what the agent tried and lets you reverse it. You're still the human in the loop.
|
|
54
|
+
|
|
55
|
+
## How it works
|
|
56
|
+
|
|
57
|
+
`restory init` installs `PreToolUse` / `PostToolUse` / `SessionStart` hooks. Every tool call the agent makes is classified for blast radius; dangerous effects are blocked with a reason, everything is logged to a local SQLite store, and the working tree is snapshotted to a shadow git repo so `undo` is exact.
|
|
58
|
+
|
|
59
|
+
## License
|
|
60
|
+
|
|
61
|
+
MIT
|
restory-0.1.1/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# đâđĻē restory
|
|
2
|
+
|
|
3
|
+
**restory records everything your AI coding agent touches, blocks the dangerous stuff, and restores your tree with one command.** Local-only.
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install restory && restory init
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Why this exists
|
|
14
|
+
|
|
15
|
+
AI coding agents (Claude Code, Cursor, Copilot) run as *you* â with your files, your keys, your shell. A single hallucination or a poisoned file in a repo can `rm -rf` your home dir or POST your `.env` to a pastebin. Allowlists don't catch it ([CVE-2026-22708](https://www.docker.com/blog/coding-agent-horror-stories-the-command-you-already-approved/)), and a container is too heavy for the inner loop.
|
|
16
|
+
|
|
17
|
+
**restory** sits between the agent and your machine: it inspects the *effect* of every command before it runs, records the whole session, and restores it with one keystroke.
|
|
18
|
+
|
|
19
|
+
## What it does
|
|
20
|
+
|
|
21
|
+
- đ **Blocks dangerous effects** â secret reads, network exfiltration, mass deletes, git-history nukes, writes outside the repo â *before* they execute.
|
|
22
|
+
- đŧ **Records everything** â a live, local timeline of every file your agent touched and every command it ran.
|
|
23
|
+
- âŠī¸ **One-command restore** â `restory undo --session` snaps your whole working tree back to where the session started.
|
|
24
|
+
- đ **Local-only** â no accounts, no cloud, nothing leaves your machine.
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pip install restory
|
|
30
|
+
restory init # installs hooks into .claude/settings.json
|
|
31
|
+
restory open # opens the live timeline at http://127.0.0.1:8765
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Works on Windows, macOS, and Linux. Hook-based â no kernel driver, no container.
|
|
35
|
+
|
|
36
|
+
## What restory does NOT do
|
|
37
|
+
|
|
38
|
+
Being honest, because security tools that overpromise get torn apart:
|
|
39
|
+
|
|
40
|
+
- It's **not a sandbox.** A determined attacker with code execution can bypass any command inspection â "argument inspection is theater." restory is defense-in-depth + visibility + instant restore, not a kernel jail.
|
|
41
|
+
- It **won't catch every obfuscation.** It nails the common, high-value danger classes (exfil, mass-delete, secret reads, pipe-to-shell). Novel encodings can slip the classifier â that's what the restore net is for.
|
|
42
|
+
- It **doesn't replace your judgment.** It surfaces what the agent tried and lets you reverse it. You're still the human in the loop.
|
|
43
|
+
|
|
44
|
+
## How it works
|
|
45
|
+
|
|
46
|
+
`restory init` installs `PreToolUse` / `PostToolUse` / `SessionStart` hooks. Every tool call the agent makes is classified for blast radius; dangerous effects are blocked with a reason, everything is logged to a local SQLite store, and the working tree is snapshotted to a shadow git repo so `undo` is exact.
|
|
47
|
+
|
|
48
|
+
## License
|
|
49
|
+
|
|
50
|
+
MIT
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "restory"
|
|
7
|
+
version = "0.1.1"
|
|
8
|
+
description = "Restory CLI"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
dependencies = [
|
|
12
|
+
"typer>=0.12",
|
|
13
|
+
"fastapi>=0.110",
|
|
14
|
+
"uvicorn>=0.29",
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
[project.scripts]
|
|
18
|
+
restory = "restory.cli:app"
|
|
19
|
+
|
|
20
|
+
[tool.hatch.build.targets.wheel]
|
|
21
|
+
packages = ["restory"]
|