solvewright 0.1.0__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.
- solvewright-0.1.0/.gitignore +6 -0
- solvewright-0.1.0/LICENSE +21 -0
- solvewright-0.1.0/PKG-INFO +132 -0
- solvewright-0.1.0/README.md +109 -0
- solvewright-0.1.0/pyproject.toml +41 -0
- solvewright-0.1.0/src/solvewright/__init__.py +3 -0
- solvewright-0.1.0/src/solvewright/__main__.py +3 -0
- solvewright-0.1.0/src/solvewright/agents.py +450 -0
- solvewright-0.1.0/src/solvewright/cli.py +263 -0
- solvewright-0.1.0/src/solvewright/connection.py +137 -0
- solvewright-0.1.0/src/solvewright/interviewer/cases/portals/brief.txt +13 -0
- solvewright-0.1.0/src/solvewright/interviewer/cases/portals/interviewer.txt +49 -0
- solvewright-0.1.0/src/solvewright/interviewer/cases/portals/reported-round.txt +34 -0
- solvewright-0.1.0/src/solvewright/interviewer/data/portal-samples/sample-01.json +967 -0
- solvewright-0.1.0/src/solvewright/interviewer/data/portal-samples/sample-02.json +967 -0
- solvewright-0.1.0/src/solvewright/interviewer/data/portal-samples/sample-03.json +967 -0
- solvewright-0.1.0/src/solvewright/interviewer/data/portal-samples/sample-04.json +967 -0
- solvewright-0.1.0/src/solvewright/interviewer/data/portal-samples/sample-05.json +967 -0
- solvewright-0.1.0/src/solvewright/interviewer/data/portal-samples/sample-06.json +967 -0
- solvewright-0.1.0/src/solvewright/interviewer/data/portal-samples/sample-07.json +967 -0
- solvewright-0.1.0/src/solvewright/interviewer/data/portal-samples/sample-08.json +967 -0
- solvewright-0.1.0/src/solvewright/interviewer/interviewer.txt +113 -0
- solvewright-0.1.0/src/solvewright/interviewer/references/case-generation.txt +52 -0
- solvewright-0.1.0/src/solvewright/interviewer/references/curriculum.txt +21 -0
- solvewright-0.1.0/src/solvewright/interviewer/references/scoring.txt +66 -0
- solvewright-0.1.0/src/solvewright/interviewer/references/session-format.txt +60 -0
- solvewright-0.1.0/src/solvewright/interviewer/tools/portal_lab.py +217 -0
- solvewright-0.1.0/src/solvewright/runtime.py +673 -0
- solvewright-0.1.0/src/solvewright/service.py +52 -0
- solvewright-0.1.0/src/solvewright/settings.py +52 -0
- solvewright-0.1.0/src/solvewright/worker.py +159 -0
- solvewright-0.1.0/tests/test_connection.py +127 -0
- solvewright-0.1.0/tests/test_runtime.py +334 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Riad Darwish
|
|
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.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: solvewright
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Connect your own Claude Code or Codex to Solvewright Interview Lab for mock technical interviews.
|
|
5
|
+
Project-URL: Homepage, https://solvewright.app/coding/interviews
|
|
6
|
+
Project-URL: Source, https://github.com/fus3r/solvewright-connector
|
|
7
|
+
Project-URL: Privacy, https://solvewright.app/privacy#privacy-interviews
|
|
8
|
+
Author: Riad Darwish
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: claude code,codex,interview,mock interview,practice
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: MacOS
|
|
16
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
17
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
20
|
+
Classifier: Topic :: Education
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
24
|
+
# Solvewright connector
|
|
25
|
+
|
|
26
|
+
Practise live technical interviews in [Solvewright Interview Lab](https://solvewright.app/coding/interviews)
|
|
27
|
+
with the Claude Code or Codex you already use. The interviewer runs on your computer, under your own
|
|
28
|
+
sign-in and plan. Solvewright provides the room: the problem, the editor, the tests, the conversation,
|
|
29
|
+
your history and your skill profile.
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
uvx solvewright
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
No uv? `pipx run solvewright` works the same way, or `python3 -m pip install --user solvewright` and
|
|
36
|
+
then `solvewright`. Python 3.10 or newer. The package has no dependencies.
|
|
37
|
+
|
|
38
|
+
## What happens when you run it
|
|
39
|
+
|
|
40
|
+
1. The terminal lists this computer, the agents it found and where interviews are kept.
|
|
41
|
+
2. It prints a short code and opens `solvewright.app/connect`. Check that the page shows the same
|
|
42
|
+
code, then press **Connect this computer**. You must be signed in to Solvewright.
|
|
43
|
+
3. The terminal says which account it joined. Keep the window open while you practise; it prints one
|
|
44
|
+
line for each thing it does (a round prepared, a reply, tests recorded).
|
|
45
|
+
4. Press Ctrl+C to stop. Nothing keeps running in the background, and nothing starts again by itself.
|
|
46
|
+
|
|
47
|
+
Next time, `solvewright` reconnects without a new code. `solvewright disconnect` removes this
|
|
48
|
+
computer from your account; you can also remove it from Interview Lab, which stops its key at once.
|
|
49
|
+
|
|
50
|
+
| Command | Does |
|
|
51
|
+
| --- | --- |
|
|
52
|
+
| `solvewright` | Connect if needed, then wait for rounds |
|
|
53
|
+
| `solvewright connect` | Approve this computer again, with a new key |
|
|
54
|
+
| `solvewright status` | Show the connection and the agents found here |
|
|
55
|
+
| `solvewright disconnect` | Remove this computer from your account |
|
|
56
|
+
| `solvewright doctor` | Check Python, Claude Code, Codex and the sandbox |
|
|
57
|
+
|
|
58
|
+
## What it can and cannot do
|
|
59
|
+
|
|
60
|
+
The connector is deliberately small. Every request it accepts is one of a fixed list: report its
|
|
61
|
+
status, start a round, pass your message to the interviewer, save your files, record a test result,
|
|
62
|
+
stop the interviewer, and sync your history. There is no request that runs a command.
|
|
63
|
+
|
|
64
|
+
- **It opens no port.** It connects out to Solvewright over HTTPS and asks for work.
|
|
65
|
+
- **It only takes requests from your account.** This computer's key is issued after you approve it
|
|
66
|
+
in the browser, is stored only here (`connection.json`, readable by you alone), and the service
|
|
67
|
+
keeps a hash of it.
|
|
68
|
+
- **It never sees your Claude or ChatGPT credentials.** It starts the official `claude` or `codex`
|
|
69
|
+
program, unmodified, which signs in the way it always does. Usage counts against your own plan.
|
|
70
|
+
- **It never runs your code.** Public tests run in your browser, in Pyodide (Python compiled to
|
|
71
|
+
WebAssembly). The connector only stores the files you tested and the result.
|
|
72
|
+
- **It does not update itself.** What runs is the version you installed from PyPI. The interviewer's
|
|
73
|
+
instructions ship inside the package (`src/solvewright/interviewer/`), so you can read exactly what
|
|
74
|
+
your agent is told.
|
|
75
|
+
|
|
76
|
+
### The interviewer's sandbox
|
|
77
|
+
|
|
78
|
+
The interviewer writes the problem and checks its own reference solution, so it needs to run code.
|
|
79
|
+
It does that inside its own agent's sandbox, confined to the folder of the current round:
|
|
80
|
+
|
|
81
|
+
| | Commands | Files | Network |
|
|
82
|
+
| --- | --- | --- | --- |
|
|
83
|
+
| Claude Code, macOS and Linux | Claude Code's OS sandbox | Read and write only in the round folder; the rest of your home folder is unreadable | None |
|
|
84
|
+
| Codex, macOS and Linux | Codex's sandbox with a Solvewright permission profile | Read and write in your interview folders; the rest of your home folder is unreadable | None |
|
|
85
|
+
| Claude Code, native Windows | No command tool at all: its sandbox needs macOS, Linux or WSL2 | The file tools stay in the round folder | None |
|
|
86
|
+
|
|
87
|
+
Claude Code runs with `--restricted --safe-mode --strict-mcp-config`: your own CLAUDE.md, hooks,
|
|
88
|
+
plugins and MCP servers are not loaded. Codex runs through its documented app-server with its plugins,
|
|
89
|
+
apps, hooks, web search, memories and every MCP server you configured switched off for the interview.
|
|
90
|
+
If a platform cannot provide one of these limits, the connector removes the capability rather than the
|
|
91
|
+
limit, and says so in the terminal and in Interview Lab. On Linux, Claude Code's sandbox needs
|
|
92
|
+
`bubblewrap` and `socat`.
|
|
93
|
+
|
|
94
|
+
## What is stored where
|
|
95
|
+
|
|
96
|
+
On this computer, in one folder (`solvewright status` prints it):
|
|
97
|
+
|
|
98
|
+
| System | Folder |
|
|
99
|
+
| --- | --- |
|
|
100
|
+
| macOS | `~/Library/Application Support/Solvewright` |
|
|
101
|
+
| Windows | `%LOCALAPPDATA%\Solvewright` |
|
|
102
|
+
| Linux | `$XDG_DATA_HOME/solvewright`, by default `~/.local/share/solvewright` |
|
|
103
|
+
|
|
104
|
+
Each round is a folder holding the candidate files, the interviewer's private files, snapshots of
|
|
105
|
+
what you submitted, and the conversation. When you are signed in, Interview Lab also keeps a copy in
|
|
106
|
+
your Solvewright account so you can continue on another computer; deleting your account deletes it.
|
|
107
|
+
Your agent sends what it reads to its own provider (Anthropic or OpenAI) under your account's terms,
|
|
108
|
+
as it does in any other session. Details: [solvewright.app/privacy](https://solvewright.app/privacy#privacy-interviews).
|
|
109
|
+
|
|
110
|
+
## Read the code
|
|
111
|
+
|
|
112
|
+
About 1,800 lines of Python in `src/solvewright/`:
|
|
113
|
+
|
|
114
|
+
| File | Role |
|
|
115
|
+
| --- | --- |
|
|
116
|
+
| `cli.py` | The commands and everything the terminal prints |
|
|
117
|
+
| `connection.py` | The browser approval and the saved key |
|
|
118
|
+
| `service.py` | The only network calls: HTTPS to Solvewright's account service |
|
|
119
|
+
| `worker.py` | The fixed list of requests and the loop that fetches them |
|
|
120
|
+
| `agents.py` | How Claude Code and Codex are started, and their sandbox settings |
|
|
121
|
+
| `runtime.py` | Rounds on disk, account-history sync, the interviewer's turns |
|
|
122
|
+
| `interviewer/` | The instructions and references the interviewer reads |
|
|
123
|
+
|
|
124
|
+
The account service address and its publishable key are in `settings.py`. They are the same public
|
|
125
|
+
values every visitor's browser receives from solvewright.app.
|
|
126
|
+
|
|
127
|
+
Run the tests from this folder with `PYTHONPATH=src python -m unittest discover -s tests` (on Windows, set `PYTHONPATH=src` first).
|
|
128
|
+
|
|
129
|
+
## Licence
|
|
130
|
+
|
|
131
|
+
MIT. Solvewright is not affiliated with Anthropic or OpenAI. Claude Code and Codex are their
|
|
132
|
+
respective owners' products; this program runs the versions you installed.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Solvewright connector
|
|
2
|
+
|
|
3
|
+
Practise live technical interviews in [Solvewright Interview Lab](https://solvewright.app/coding/interviews)
|
|
4
|
+
with the Claude Code or Codex you already use. The interviewer runs on your computer, under your own
|
|
5
|
+
sign-in and plan. Solvewright provides the room: the problem, the editor, the tests, the conversation,
|
|
6
|
+
your history and your skill profile.
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
uvx solvewright
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
No uv? `pipx run solvewright` works the same way, or `python3 -m pip install --user solvewright` and
|
|
13
|
+
then `solvewright`. Python 3.10 or newer. The package has no dependencies.
|
|
14
|
+
|
|
15
|
+
## What happens when you run it
|
|
16
|
+
|
|
17
|
+
1. The terminal lists this computer, the agents it found and where interviews are kept.
|
|
18
|
+
2. It prints a short code and opens `solvewright.app/connect`. Check that the page shows the same
|
|
19
|
+
code, then press **Connect this computer**. You must be signed in to Solvewright.
|
|
20
|
+
3. The terminal says which account it joined. Keep the window open while you practise; it prints one
|
|
21
|
+
line for each thing it does (a round prepared, a reply, tests recorded).
|
|
22
|
+
4. Press Ctrl+C to stop. Nothing keeps running in the background, and nothing starts again by itself.
|
|
23
|
+
|
|
24
|
+
Next time, `solvewright` reconnects without a new code. `solvewright disconnect` removes this
|
|
25
|
+
computer from your account; you can also remove it from Interview Lab, which stops its key at once.
|
|
26
|
+
|
|
27
|
+
| Command | Does |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| `solvewright` | Connect if needed, then wait for rounds |
|
|
30
|
+
| `solvewright connect` | Approve this computer again, with a new key |
|
|
31
|
+
| `solvewright status` | Show the connection and the agents found here |
|
|
32
|
+
| `solvewright disconnect` | Remove this computer from your account |
|
|
33
|
+
| `solvewright doctor` | Check Python, Claude Code, Codex and the sandbox |
|
|
34
|
+
|
|
35
|
+
## What it can and cannot do
|
|
36
|
+
|
|
37
|
+
The connector is deliberately small. Every request it accepts is one of a fixed list: report its
|
|
38
|
+
status, start a round, pass your message to the interviewer, save your files, record a test result,
|
|
39
|
+
stop the interviewer, and sync your history. There is no request that runs a command.
|
|
40
|
+
|
|
41
|
+
- **It opens no port.** It connects out to Solvewright over HTTPS and asks for work.
|
|
42
|
+
- **It only takes requests from your account.** This computer's key is issued after you approve it
|
|
43
|
+
in the browser, is stored only here (`connection.json`, readable by you alone), and the service
|
|
44
|
+
keeps a hash of it.
|
|
45
|
+
- **It never sees your Claude or ChatGPT credentials.** It starts the official `claude` or `codex`
|
|
46
|
+
program, unmodified, which signs in the way it always does. Usage counts against your own plan.
|
|
47
|
+
- **It never runs your code.** Public tests run in your browser, in Pyodide (Python compiled to
|
|
48
|
+
WebAssembly). The connector only stores the files you tested and the result.
|
|
49
|
+
- **It does not update itself.** What runs is the version you installed from PyPI. The interviewer's
|
|
50
|
+
instructions ship inside the package (`src/solvewright/interviewer/`), so you can read exactly what
|
|
51
|
+
your agent is told.
|
|
52
|
+
|
|
53
|
+
### The interviewer's sandbox
|
|
54
|
+
|
|
55
|
+
The interviewer writes the problem and checks its own reference solution, so it needs to run code.
|
|
56
|
+
It does that inside its own agent's sandbox, confined to the folder of the current round:
|
|
57
|
+
|
|
58
|
+
| | Commands | Files | Network |
|
|
59
|
+
| --- | --- | --- | --- |
|
|
60
|
+
| Claude Code, macOS and Linux | Claude Code's OS sandbox | Read and write only in the round folder; the rest of your home folder is unreadable | None |
|
|
61
|
+
| Codex, macOS and Linux | Codex's sandbox with a Solvewright permission profile | Read and write in your interview folders; the rest of your home folder is unreadable | None |
|
|
62
|
+
| Claude Code, native Windows | No command tool at all: its sandbox needs macOS, Linux or WSL2 | The file tools stay in the round folder | None |
|
|
63
|
+
|
|
64
|
+
Claude Code runs with `--restricted --safe-mode --strict-mcp-config`: your own CLAUDE.md, hooks,
|
|
65
|
+
plugins and MCP servers are not loaded. Codex runs through its documented app-server with its plugins,
|
|
66
|
+
apps, hooks, web search, memories and every MCP server you configured switched off for the interview.
|
|
67
|
+
If a platform cannot provide one of these limits, the connector removes the capability rather than the
|
|
68
|
+
limit, and says so in the terminal and in Interview Lab. On Linux, Claude Code's sandbox needs
|
|
69
|
+
`bubblewrap` and `socat`.
|
|
70
|
+
|
|
71
|
+
## What is stored where
|
|
72
|
+
|
|
73
|
+
On this computer, in one folder (`solvewright status` prints it):
|
|
74
|
+
|
|
75
|
+
| System | Folder |
|
|
76
|
+
| --- | --- |
|
|
77
|
+
| macOS | `~/Library/Application Support/Solvewright` |
|
|
78
|
+
| Windows | `%LOCALAPPDATA%\Solvewright` |
|
|
79
|
+
| Linux | `$XDG_DATA_HOME/solvewright`, by default `~/.local/share/solvewright` |
|
|
80
|
+
|
|
81
|
+
Each round is a folder holding the candidate files, the interviewer's private files, snapshots of
|
|
82
|
+
what you submitted, and the conversation. When you are signed in, Interview Lab also keeps a copy in
|
|
83
|
+
your Solvewright account so you can continue on another computer; deleting your account deletes it.
|
|
84
|
+
Your agent sends what it reads to its own provider (Anthropic or OpenAI) under your account's terms,
|
|
85
|
+
as it does in any other session. Details: [solvewright.app/privacy](https://solvewright.app/privacy#privacy-interviews).
|
|
86
|
+
|
|
87
|
+
## Read the code
|
|
88
|
+
|
|
89
|
+
About 1,800 lines of Python in `src/solvewright/`:
|
|
90
|
+
|
|
91
|
+
| File | Role |
|
|
92
|
+
| --- | --- |
|
|
93
|
+
| `cli.py` | The commands and everything the terminal prints |
|
|
94
|
+
| `connection.py` | The browser approval and the saved key |
|
|
95
|
+
| `service.py` | The only network calls: HTTPS to Solvewright's account service |
|
|
96
|
+
| `worker.py` | The fixed list of requests and the loop that fetches them |
|
|
97
|
+
| `agents.py` | How Claude Code and Codex are started, and their sandbox settings |
|
|
98
|
+
| `runtime.py` | Rounds on disk, account-history sync, the interviewer's turns |
|
|
99
|
+
| `interviewer/` | The instructions and references the interviewer reads |
|
|
100
|
+
|
|
101
|
+
The account service address and its publishable key are in `settings.py`. They are the same public
|
|
102
|
+
values every visitor's browser receives from solvewright.app.
|
|
103
|
+
|
|
104
|
+
Run the tests from this folder with `PYTHONPATH=src python -m unittest discover -s tests` (on Windows, set `PYTHONPATH=src` first).
|
|
105
|
+
|
|
106
|
+
## Licence
|
|
107
|
+
|
|
108
|
+
MIT. Solvewright is not affiliated with Anthropic or OpenAI. Claude Code and Codex are their
|
|
109
|
+
respective owners' products; this program runs the versions you installed.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.25"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "solvewright"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Connect your own Claude Code or Codex to Solvewright Interview Lab for mock technical interviews."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
license-files = ["LICENSE"]
|
|
12
|
+
requires-python = ">=3.10"
|
|
13
|
+
authors = [{ name = "Riad Darwish" }]
|
|
14
|
+
keywords = ["interview", "mock interview", "claude code", "codex", "practice"]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 4 - Beta",
|
|
17
|
+
"Environment :: Console",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"Operating System :: MacOS",
|
|
20
|
+
"Operating System :: Microsoft :: Windows",
|
|
21
|
+
"Operating System :: POSIX :: Linux",
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
24
|
+
"Topic :: Education",
|
|
25
|
+
]
|
|
26
|
+
# Deliberately empty: the connector uses the Python standard library only.
|
|
27
|
+
dependencies = []
|
|
28
|
+
|
|
29
|
+
[project.urls]
|
|
30
|
+
Homepage = "https://solvewright.app/coding/interviews"
|
|
31
|
+
Source = "https://github.com/fus3r/solvewright-connector"
|
|
32
|
+
Privacy = "https://solvewright.app/privacy#privacy-interviews"
|
|
33
|
+
|
|
34
|
+
[project.scripts]
|
|
35
|
+
solvewright = "solvewright.cli:main"
|
|
36
|
+
|
|
37
|
+
[tool.hatch.build.targets.wheel]
|
|
38
|
+
packages = ["src/solvewright"]
|
|
39
|
+
|
|
40
|
+
[tool.hatch.build.targets.sdist]
|
|
41
|
+
include = ["src/solvewright", "tests", "README.md", "LICENSE", "pyproject.toml"]
|