evals 2.3.0 → 2.5.0

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.
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2026 Arize AI
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,6 @@
1
+ a9cede65f98d3415b13e1c6a437d0fdee27286bfff0186dd72bb65d9869b7864 LICENSE-coding-harness-tracing
2
+ 62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775 certifi-2026.7.22-py3-none-any.whl
3
+ e17d86afa36365ddd451325b7b2ed3e35ba85801fb10e35401fded609095f550 coding_harness_tracing-0.1.0-py3-none-any.whl
4
+ aca14e09ca99c253d2a142e2d5c5c38c8c7cf90840d3cb10b241c29929871fa4 harness-install.bat
5
+ a7ba18a98280e236b20ab4cb9f8a4006068b454586a2af50bf23fb0dbe70583d harness-install.sh
6
+ b81ee9561e9ca4004139c6cbba3a238c32b03e4894671e181b671e8cb8425d61 python_dotenv-1.2.1-py3-none-any.whl
@@ -0,0 +1,351 @@
1
+ @echo off
2
+ setlocal enabledelayedexpansion
3
+ REM Arize Coding Harness Tracing — Windows installer router
4
+ REM
5
+ REM Usage:
6
+ REM install.bat <harness> [--with-skills] [--branch NAME]
7
+ REM install.bat uninstall [harness]
8
+ REM install.bat update
9
+
10
+ REM --- Constants ---
11
+ set "REPO_URL=https://github.com/Arize-ai/coding-harness-tracing.git"
12
+ if not defined ARIZE_INSTALL_BRANCH set "ARIZE_INSTALL_BRANCH=main"
13
+ set "INSTALL_BRANCH=%ARIZE_INSTALL_BRANCH%"
14
+ set "TARBALL_URL=https://github.com/Arize-ai/coding-harness-tracing/archive/refs/heads/%INSTALL_BRANCH%.tar.gz"
15
+ set "INSTALL_DIR=%USERPROFILE%\.arize\harness"
16
+ set "VENV_DIR=%INSTALL_DIR%\venv"
17
+ set "VENV_PYTHON=%VENV_DIR%\Scripts\python.exe"
18
+ set "VENV_PIP=%VENV_DIR%\Scripts\pip.exe"
19
+ REM When set, install from local wheels in this directory instead of fetching the
20
+ REM repo: no network and no remote code execution. Mirrors install.sh --wheel-dir.
21
+ if not defined ARIZE_WHEEL_DIR set "ARIZE_WHEEL_DIR="
22
+ set "WHEEL_DIR=%ARIZE_WHEEL_DIR%"
23
+
24
+ REM --- Parse arguments ---
25
+ set "COMMAND="
26
+ set "UNINSTALL_HARNESS="
27
+ set "WITH_SKILLS="
28
+ set "STATUS_ARGS="
29
+ :parse_args
30
+ if "%~1"=="" goto :done_args
31
+ if /i "%~1"=="-h" goto :usage
32
+ if /i "%~1"=="--help" goto :usage
33
+ if /i "%~1"=="help" goto :usage
34
+ if /i "%~1"=="--with-skills" ( set "WITH_SKILLS=--with-skills" & shift & goto :parse_args )
35
+ if /i "%~1"=="--non-interactive" ( set "ARIZE_NONINTERACTIVE=1" & shift & goto :parse_args )
36
+ if /i "%~1"=="-y" ( set "ARIZE_NONINTERACTIVE=1" & shift & goto :parse_args )
37
+ if /i "%~1"=="--json" ( set "STATUS_ARGS=--json" & shift & goto :parse_args )
38
+ if /i "%~1"=="--wheel-dir" (
39
+ set "WHEEL_DIR=%~2"
40
+ if not exist "%~2\" ( echo [arize] --wheel-dir needs a directory; got '%~2' >&2 & exit /b 1 )
41
+ if not exist "%~2\coding_harness_tracing-*.whl" ( echo [arize] No coding_harness_tracing-*.whl in %~2 >&2 & exit /b 1 )
42
+ shift & shift & goto :parse_args
43
+ )
44
+ if /i "%~1"=="--branch" ( set "INSTALL_BRANCH=%~2" & set "TARBALL_URL=https://github.com/Arize-ai/coding-harness-tracing/archive/refs/heads/%~2.tar.gz" & shift & shift & goto :parse_args )
45
+
46
+ for %%C in (claude codex copilot cursor gemini kiro antigravity opencode omp devin) do if /i "%~1"=="%%C" ( set "COMMAND=%%C" & shift & goto :parse_args )
47
+ if /i "%~1"=="update" ( set "COMMAND=update" & shift & goto :parse_args )
48
+ if /i "%~1"=="status" ( set "COMMAND=status" & shift & goto :parse_args )
49
+ if /i "%~1"=="uninstall" (
50
+ set "COMMAND=uninstall" & shift
51
+ for %%C in (claude codex copilot cursor gemini kiro antigravity opencode omp devin) do if /i "%~1"=="%%C" ( set "UNINSTALL_HARNESS=%%C" & shift )
52
+ goto :parse_args
53
+ )
54
+ echo [arize] Unknown argument: %~1 >&2
55
+ goto :usage
56
+ :done_args
57
+ if "%COMMAND%"=="" ( echo [arize] No command specified >&2 & goto :usage )
58
+
59
+ REM --- Harness name -> directory mapping ---
60
+ REM claude->tracing\claude_code codex->tracing\codex copilot->tracing\copilot cursor->tracing\cursor gemini->tracing\gemini kiro->tracing\kiro antigravity->tracing\antigravity opencode->tracing\opencode omp->tracing\omp devin->tracing\devin
61
+
62
+ REM --- Dispatch ---
63
+ if "%COMMAND%"=="status" goto :cmd_status
64
+ if "%COMMAND%"=="update" goto :cmd_update
65
+ if "%COMMAND%"=="uninstall" goto :cmd_uninstall
66
+
67
+ REM --- Install a harness ---
68
+ call :find_python
69
+ if "%FOUND_PYTHON%"=="" ( echo [arize] Error: Python 3.9+ is required >&2 & exit /b 1 )
70
+ echo [arize] Found Python: %FOUND_PYTHON%
71
+ call :bootstrap_repo
72
+ if %ERRORLEVEL% neq 0 exit /b 1
73
+ call :setup_venv
74
+ if %ERRORLEVEL% neq 0 exit /b 1
75
+ REM Migrate legacy config.yaml -> config.json (no-op if nothing to migrate)
76
+ if exist "%VENV_PYTHON%" "%VENV_PYTHON%" -m core.config migrate
77
+ echo [arize] Running %COMMAND% install...
78
+ call :run_harness_py "%COMMAND%" install "%WITH_SKILLS%"
79
+ exit /b %ERRORLEVEL%
80
+
81
+ REM --- cmd_status ---
82
+ :cmd_status
83
+ if not exist "%VENV_PYTHON%" ( echo [arize] Venv not found - nothing installed >&2 & exit /b 1 )
84
+ "%VENV_PYTHON%" -m core.setup.status %STATUS_ARGS%
85
+ exit /b %ERRORLEVEL%
86
+
87
+ REM --- cmd_update ---
88
+ :cmd_update
89
+ if not exist "%INSTALL_DIR%" ( echo [arize] Not installed at %INSTALL_DIR% >&2 & exit /b 1 )
90
+ call :find_python
91
+ if "%FOUND_PYTHON%"=="" ( echo [arize] Error: Python 3.9+ is required >&2 & exit /b 1 )
92
+ REM Re-registering runs each harness's installer, which prompts for the project
93
+ REM name. With no console to answer on that dies with an EOFError, so fall back
94
+ REM to stored values there — and only there, so an interactive update keeps
95
+ REM every prompt it has today. cmd has no -t test; ask Python instead.
96
+ %FOUND_PYTHON% -c "import sys; sys.exit(0 if sys.stdin.isatty() else 1)" >nul 2>&1 || set "ARIZE_NONINTERACTIVE=1"
97
+ set "_UPDATE_NEED_VENV=0"
98
+ if not defined WHEEL_DIR if not exist "%INSTALL_DIR%\.git" if not exist "%INSTALL_DIR%\pyproject.toml" (
99
+ echo [arize] This looks like an offline install with no source tree to update. >&2
100
+ echo [arize] Re-run the installer that created it, or pass --wheel-dir with a newer wheel. >&2
101
+ exit /b 1
102
+ )
103
+ if defined WHEEL_DIR (
104
+ echo [arize] Updating from local wheels in %WHEEL_DIR%...
105
+ ) else if exist "%INSTALL_DIR%\.git" (
106
+ echo [arize] Pulling latest changes...
107
+ git -C "%INSTALL_DIR%" pull --ff-only >nul 2>&1
108
+ if !ERRORLEVEL! neq 0 (
109
+ echo [arize] Pull failed — re-cloning
110
+ rmdir /s /q "%INSTALL_DIR%" 2>nul
111
+ call :bootstrap_repo
112
+ if !ERRORLEVEL! neq 0 exit /b 1
113
+ set "_UPDATE_NEED_VENV=1"
114
+ )
115
+ ) else (
116
+ rmdir /s /q "%INSTALL_DIR%" 2>nul
117
+ call :bootstrap_repo
118
+ if !ERRORLEVEL! neq 0 exit /b 1
119
+ set "_UPDATE_NEED_VENV=1"
120
+ )
121
+ REM Re-create venv if it was wiped along with INSTALL_DIR
122
+ if "!_UPDATE_NEED_VENV!"=="1" (
123
+ call :setup_venv
124
+ if !ERRORLEVEL! neq 0 exit /b 1
125
+ ) else if exist "%VENV_PIP%" (
126
+ echo [arize] Reinstalling package...
127
+ call :pip_install_harness "-U"
128
+ REM Stop here on failure: migrating config and re-registering hooks against
129
+ REM the package that is still installed would report success for an update
130
+ REM that did not happen.
131
+ if !ERRORLEVEL! neq 0 exit /b 1
132
+ )
133
+ REM Migrate legacy config.yaml -> config.json (no-op if nothing to migrate)
134
+ if exist "%VENV_PYTHON%" "%VENV_PYTHON%" -m core.config migrate
135
+ if exist "%VENV_PYTHON%" (
136
+ for /f "usebackq delims=" %%H in (`"%VENV_PYTHON%" -c "from core.setup import list_installed_harnesses; [print(h) for h in list_installed_harnesses()]" 2^>nul`) do (
137
+ echo [arize] Reinstalling %%H...
138
+ call :run_harness_py "%%H" install
139
+ if !ERRORLEVEL! neq 0 echo [arize] %%H re-registration failed ^(continuing^) >&2
140
+ )
141
+ )
142
+ echo [arize] Update complete!
143
+ exit /b 0
144
+
145
+ REM --- cmd_uninstall ---
146
+ :cmd_uninstall
147
+ if not "%UNINSTALL_HARNESS%"=="" (
148
+ if not exist "%VENV_PYTHON%" ( echo [arize] Venv not found >&2 & exit /b 1 )
149
+ echo [arize] Uninstalling %UNINSTALL_HARNESS%...
150
+ call :run_harness_py "%UNINSTALL_HARNESS%" uninstall
151
+ exit /b !ERRORLEVEL!
152
+ )
153
+ REM Full wipe
154
+ echo [arize] Uninstalling coding-harness-tracing
155
+ if exist "%VENV_PYTHON%" (
156
+ for /f "usebackq delims=" %%H in (`"%VENV_PYTHON%" -c "from core.setup import list_installed_harnesses; [print(h) for h in list_installed_harnesses()]" 2^>nul`) do (
157
+ call :run_harness_py "%%H" uninstall
158
+ )
159
+ "%VENV_PYTHON%" -c "from core.setup.wipe import wipe_shared_runtime; wipe_shared_runtime()" 2>nul
160
+ )
161
+ REM Everything after this point must live on one line. A full uninstall deletes
162
+ REM the directory this script is running from, and cmd reads a batch file from
163
+ REM disk line by line — so once it is gone there is no next line to read. The
164
+ REM uninstall then succeeded while reporting "The system cannot find the path
165
+ REM specified" and a non-zero exit. Parsed as one line, cmd never looks back.
166
+ if exist "%INSTALL_DIR%" ( rmdir /s /q "%INSTALL_DIR%" 2>nul & echo [arize] Removed %INSTALL_DIR% & echo [arize] Uninstall complete. & exit /b 0 )
167
+ echo [arize] Uninstall complete.
168
+ exit /b 0
169
+
170
+ REM ===================================================================
171
+ REM Helpers
172
+ REM ===================================================================
173
+
174
+ REM --- find_python: locate Python >= 3.9 (try py -3, python3, python, then known paths) ---
175
+ :find_python
176
+ set "FOUND_PYTHON="
177
+ REM Try py -3 first (Windows Python Launcher — ensures Python 3)
178
+ where py >nul 2>&1 && ( py -3 -c "import sys; assert sys.version_info >= (3, 9)" >nul 2>&1 && ( set "FOUND_PYTHON=py -3" & goto :eof ) )
179
+ REM Then python3 and python on PATH
180
+ for %%P in (python3 python) do (
181
+ where %%P >nul 2>&1 && ( %%P -c "import sys; assert sys.version_info >= (3, 9)" >nul 2>&1 && ( set "FOUND_PYTHON=%%P" & goto :eof ) )
182
+ )
183
+ for %%V in (313 312 311 310 39) do (
184
+ for %%D in ("%LOCALAPPDATA%\Programs\Python\Python%%V\python.exe" "C:\Python%%V\python.exe") do (
185
+ if exist %%~D ( %%~D -c "import sys; assert sys.version_info >= (3, 9)" >nul 2>&1 && ( set "FOUND_PYTHON=%%~D" & goto :eof ) )
186
+ )
187
+ )
188
+ goto :eof
189
+
190
+ REM --- bootstrap_repo: clone or tarball into INSTALL_DIR ---
191
+ :bootstrap_repo
192
+ if defined WHEEL_DIR (
193
+ if not exist "%INSTALL_DIR%" mkdir "%INSTALL_DIR%"
194
+ REM `status`, `update` and `uninstall` are documented as running from
195
+ REM %INSTALL_DIR%\install.bat, which repo mode gets via the extract. Skip the
196
+ REM copy when we are already running from there, or it would truncate itself.
197
+ if /i not "%~f0"=="%INSTALL_DIR%\install.bat" copy /y "%~f0" "%INSTALL_DIR%\install.bat" >nul
198
+ goto :eof
199
+ )
200
+ if exist "%INSTALL_DIR%\.git" (
201
+ echo [arize] Repository at %INSTALL_DIR%, syncing...
202
+ git -C "%INSTALL_DIR%" fetch --depth 1 origin "%INSTALL_BRANCH%" >nul 2>&1 && git -C "%INSTALL_DIR%" checkout -B "%INSTALL_BRANCH%" FETCH_HEAD >nul 2>&1 && goto :eof
203
+ git -C "%INSTALL_DIR%" pull --ff-only >nul 2>&1 && goto :eof
204
+ echo [arize] git update failed — re-cloning
205
+ rmdir /s /q "%INSTALL_DIR%" 2>nul
206
+ )
207
+ if exist "%INSTALL_DIR%" if not exist "%INSTALL_DIR%\.git" ( rmdir /s /q "%INSTALL_DIR%" 2>nul )
208
+ where git >nul 2>&1 && (
209
+ echo [arize] Cloning coding-harness-tracing...
210
+ git clone --depth 1 --branch "%INSTALL_BRANCH%" "%REPO_URL%" "%INSTALL_DIR%" >nul 2>&1 && goto :eof
211
+ echo [arize] git clone failed — falling back to tarball
212
+ )
213
+ call :download_tarball
214
+ goto :eof
215
+
216
+ REM --- download_tarball ---
217
+ :download_tarball
218
+ echo [arize] Downloading tarball...
219
+ set "TMPZIP=%TEMP%\arize-install-%RANDOM%.tar.gz"
220
+ powershell -NoProfile -Command "Invoke-WebRequest -Uri '%TARBALL_URL%' -OutFile '%TMPZIP%'" >nul 2>&1
221
+ if !ERRORLEVEL! neq 0 ( curl -sSfL "%TARBALL_URL%" -o "%TMPZIP%" 2>nul || ( echo [arize] Download failed >&2 & exit /b 1 ) )
222
+ if not exist "%INSTALL_DIR%" mkdir "%INSTALL_DIR%"
223
+ tar xzf "%TMPZIP%" --strip-components=1 -C "%INSTALL_DIR%" >nul 2>&1
224
+ if !ERRORLEVEL! neq 0 (
225
+ set "TMPDIR=%TEMP%\arize-extract-%RANDOM%"
226
+ mkdir "!TMPDIR!" 2>nul
227
+ powershell -NoProfile -Command "& { $gz=[IO.File]::OpenRead('%TMPZIP%'); $d=New-Object IO.Compression.GZipStream($gz,[IO.Compression.CompressionMode]::Decompress); $f=[IO.File]::Create('!TMPDIR!\a.tar'); $d.CopyTo($f); $f.Close(); $d.Close(); $gz.Close() }" >nul 2>&1
228
+ tar xf "!TMPDIR!\a.tar" --strip-components=1 -C "%INSTALL_DIR%" >nul 2>&1
229
+ if !ERRORLEVEL! neq 0 ( rmdir /s /q "!TMPDIR!" 2>nul & del "%TMPZIP%" 2>nul & echo [arize] Extraction failed >&2 & exit /b 1 )
230
+ rmdir /s /q "!TMPDIR!" 2>nul
231
+ )
232
+ del "%TMPZIP%" 2>nul
233
+ echo [arize] Extracted to %INSTALL_DIR%
234
+ goto :eof
235
+
236
+ REM --- setup_venv ---
237
+ :setup_venv
238
+ if exist "%VENV_PYTHON%" ( "%VENV_PYTHON%" -c "import core" >nul 2>&1 && ( echo [arize] Venv ready & goto :eof ) )
239
+ echo [arize] Creating venv...
240
+ %FOUND_PYTHON% -m venv "%VENV_DIR%" >nul 2>&1
241
+ if !ERRORLEVEL! neq 0 ( echo [arize] Failed to create venv >&2 & exit /b 1 )
242
+ if not exist "%VENV_PIP%" ( echo [arize] pip not found in venv >&2 & exit /b 1 )
243
+ echo [arize] Installing coding-harness-tracing...
244
+ call :pip_install_harness ""
245
+ if !ERRORLEVEL! neq 0 exit /b 1
246
+ echo [arize] Venv ready at %VENV_DIR%
247
+ goto :eof
248
+
249
+ REM --- pip_install_harness: install the package into the venv ---
250
+ REM Extra args are passed through to pip (-U for update).
251
+ REM
252
+ REM Shared so the two callers cannot drift: setup_venv checked ERRORLEVEL and
253
+ REM cmd_update did not, so a failed offline reinstall let update carry on to
254
+ REM migrate config and re-register every harness against the OLD package, then
255
+ REM print "Update complete!" and exit 0. install.sh has always checked this.
256
+ REM
257
+ REM Wheel mode deliberately does not send stderr to nul — pip's "No matching
258
+ REM distribution found" is the only thing that explains the failure, and matching
259
+ REM install.sh means a Windows user sees it too.
260
+ :pip_install_harness
261
+ if defined WHEEL_DIR (
262
+ "%VENV_PIP%" install --quiet %~1 --no-index --find-links "%WHEEL_DIR%" coding-harness-tracing
263
+ if !ERRORLEVEL! neq 0 ( echo [arize] Failed to install coding-harness-tracing from %WHEEL_DIR% >&2 & exit /b 1 )
264
+ ) else (
265
+ "%VENV_PIP%" install --quiet %~1 "%INSTALL_DIR%" >nul 2>&1
266
+ if !ERRORLEVEL! neq 0 ( echo [arize] Failed to install coding-harness-tracing package >&2 & exit /b 1 )
267
+ )
268
+ exit /b 0
269
+
270
+ REM --- run_harness_py: invoke a harness installer ---
271
+ REM %1 harness key, %2 verb (install/uninstall), %3 optional flags.
272
+ REM Repo mode runs install.py from the source tree; wheel mode has no source tree
273
+ REM and runs the same code as a module. Both import core.* from site-packages.
274
+ :run_harness_py
275
+ call :resolve_dir "%~1"
276
+ if !ERRORLEVEL! neq 0 exit /b 1
277
+ set "_PY=%INSTALL_DIR%\!HARNESS_DIR!\install.py"
278
+ set "_MOD=!HARNESS_DIR:\=.!.install"
279
+ if exist "!_PY!" (
280
+ "%VENV_PYTHON%" "!_PY!" %~2 %~3
281
+ ) else (
282
+ "%VENV_PYTHON%" -m "!_MOD!" %~2 %~3
283
+ )
284
+ exit /b !ERRORLEVEL!
285
+
286
+ REM --- resolve_dir: map command/harness name to directory ---
287
+ :resolve_dir
288
+ set "HARNESS_DIR="
289
+ if /i "%~1"=="claude" set "HARNESS_DIR=tracing\claude_code"
290
+ if /i "%~1"=="claude-code" set "HARNESS_DIR=tracing\claude_code"
291
+ if /i "%~1"=="codex" set "HARNESS_DIR=tracing\codex"
292
+ if /i "%~1"=="copilot" set "HARNESS_DIR=tracing\copilot"
293
+ if /i "%~1"=="cursor" set "HARNESS_DIR=tracing\cursor"
294
+ if /i "%~1"=="gemini" set "HARNESS_DIR=tracing\gemini"
295
+ if /i "%~1"=="kiro" set "HARNESS_DIR=tracing\kiro"
296
+ if /i "%~1"=="antigravity" set "HARNESS_DIR=tracing\antigravity"
297
+ if /i "%~1"=="opencode" set "HARNESS_DIR=tracing\opencode"
298
+ if /i "%~1"=="omp" set "HARNESS_DIR=tracing\omp"
299
+ if /i "%~1"=="devin" set "HARNESS_DIR=tracing\devin"
300
+ if "%HARNESS_DIR%"=="" ( echo [arize] Unknown harness: %~1 >&2 & exit /b 1 )
301
+ goto :eof
302
+
303
+ REM --- Usage ---
304
+ :usage
305
+ echo.
306
+ echo Arize Coding Harness Tracing Installer
307
+ echo.
308
+ echo Usage: install.bat ^<command^> [flags]
309
+ echo.
310
+ echo Commands:
311
+ echo claude Install tracing for Claude Code / Agent SDK
312
+ echo codex Install tracing for OpenAI Codex CLI
313
+ echo copilot Install tracing for GitHub Copilot
314
+ echo cursor Install tracing for Cursor IDE
315
+ echo gemini Install tracing for Gemini CLI
316
+ echo kiro Install tracing for Kiro CLI
317
+ echo antigravity Install tracing for Google Antigravity CLI/IDE
318
+ echo opencode Install tracing for opencode
319
+ echo omp Install tracing for Oh My Pi (omp)
320
+ echo devin Install tracing for Devin CLI
321
+ echo status Report configured harnesses and hook wiring
322
+ echo update Update to latest and reinstall all harnesses
323
+ echo uninstall [harness] Remove one harness or full wipe
324
+ echo.
325
+ echo Flags:
326
+ echo --with-skills Symlink harness skills into .agents\skills\
327
+ echo --wheel-dir DIR Install from local wheels in DIR instead of downloading
328
+ echo the repo. No network and no remote code execution; also
329
+ echo settable as ARIZE_WHEEL_DIR.
330
+ echo --branch NAME Install from a specific git branch (default: main)
331
+ echo --json With status: emit machine-readable JSON
332
+ echo --non-interactive, -y Ask nothing; read values from the environment
333
+ echo or the file named by ARIZE_ENV_FILE. Missing required
334
+ echo values are an error.
335
+ echo.
336
+ echo Non-interactive install reads the environment, plus a dotenv file named
337
+ echo with ARIZE_ENV_FILE — no automatic .env search: ARIZE_API_KEY and ARIZE_SPACE_ID for Arize AX,
338
+ echo PHOENIX_ENDPOINT and PHOENIX_API_KEY for Phoenix, plus optional
339
+ echo ARIZE_BACKEND, ARIZE_PROJECT_NAME, ARIZE_USER_ID, ARIZE_OTLP_ENDPOINT,
340
+ echo ARIZE_LOG_PROMPTS, ARIZE_LOG_TOOL_DETAILS, ARIZE_LOG_TOOL_CONTENT — all
341
+ echo off unless set to true.
342
+ echo.
343
+ echo Examples:
344
+ echo install.bat claude
345
+ echo install.bat codex --with-skills
346
+ echo install.bat cursor --branch dev
347
+ echo install.bat uninstall claude
348
+ echo install.bat uninstall
349
+ echo install.bat update
350
+ echo.
351
+ exit /b 1