deepagents-code 0.2.4__py3-none-any.whl → 0.2.5__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.
- deepagents_code/_build_info.py +1 -1
- deepagents_code/_version.py +1 -1
- deepagents_code/app.py +24 -12
- deepagents_code/client/commands/extras.py +19 -4
- deepagents_code/main.py +12 -4
- deepagents_code/offload_middleware.py +37 -2
- deepagents_code/output_truncation.py +26 -3
- deepagents_code/update_check.py +171 -60
- {deepagents_code-0.2.4.dist-info → deepagents_code-0.2.5.dist-info}/METADATA +18 -18
- {deepagents_code-0.2.4.dist-info → deepagents_code-0.2.5.dist-info}/RECORD +14 -14
- {deepagents_code-0.2.4.data → deepagents_code-0.2.5.data}/data/deepagents_code/default_agent_prompt.md +0 -0
- {deepagents_code-0.2.4.dist-info → deepagents_code-0.2.5.dist-info}/WHEEL +0 -0
- {deepagents_code-0.2.4.dist-info → deepagents_code-0.2.5.dist-info}/entry_points.txt +0 -0
- {deepagents_code-0.2.4.dist-info → deepagents_code-0.2.5.dist-info}/licenses/LICENSE +0 -0
deepagents_code/_build_info.py
CHANGED
deepagents_code/_version.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Keep the `x-release-please-version` annotation — release-please uses it to
|
|
4
4
|
# bump `__version__` in sync with `pyproject.toml` on every release PR.
|
|
5
|
-
__version__ = "0.2.
|
|
5
|
+
__version__ = "0.2.5" # x-release-please-version
|
|
6
6
|
|
|
7
7
|
DOCS_URL = "https://docs.langchain.com/oss/python/deepagents/code"
|
|
8
8
|
"""URL for `deepagents-code` documentation."""
|
deepagents_code/app.py
CHANGED
|
@@ -8094,22 +8094,26 @@ class DeepAgentsApp(App):
|
|
|
8094
8094
|
AppMessage("Skipped dependency refresh (debug mode)."),
|
|
8095
8095
|
)
|
|
8096
8096
|
return
|
|
8097
|
-
|
|
8097
|
+
outcome = await perform_dependency_refresh(
|
|
8098
8098
|
include_prereleases=include_prereleases,
|
|
8099
8099
|
)
|
|
8100
|
-
if
|
|
8100
|
+
if outcome.deferred:
|
|
8101
|
+
# Nothing ran; the guidance names the command to run instead.
|
|
8102
|
+
await self._mount_message(AppMessage(outcome.output))
|
|
8103
|
+
return
|
|
8104
|
+
if not outcome.success:
|
|
8101
8105
|
# Lead with the start of the output for parity with the upgrade
|
|
8102
8106
|
# failure path; uv prints the actionable summary (e.g. "No solution
|
|
8103
8107
|
# found") first. The full output is persisted to the update log.
|
|
8104
|
-
detail = f": {output[:200]}" if output else ""
|
|
8108
|
+
detail = f": {outcome.output[:200]}" if outcome.output else ""
|
|
8105
8109
|
await self._mount_message(
|
|
8106
8110
|
AppMessage(
|
|
8107
8111
|
f"Dependency refresh failed{detail}",
|
|
8108
8112
|
),
|
|
8109
8113
|
)
|
|
8110
8114
|
return
|
|
8111
|
-
changes = parse_dependency_changes(output)
|
|
8112
|
-
if output.strip() and not changes:
|
|
8115
|
+
changes = parse_dependency_changes(outcome.output)
|
|
8116
|
+
if outcome.output.strip() and not changes:
|
|
8113
8117
|
# The refresh succeeded but nothing parsed out of uv's diff. Either
|
|
8114
8118
|
# nothing moved, or uv's output format drifted past our parser. Leave
|
|
8115
8119
|
# a breadcrumb so the latter doesn't masquerade as "up to date"
|
|
@@ -8454,6 +8458,11 @@ class DeepAgentsApp(App):
|
|
|
8454
8458
|
)
|
|
8455
8459
|
return False
|
|
8456
8460
|
|
|
8461
|
+
if outcome.deferred:
|
|
8462
|
+
# Nothing ran; the guidance names the command to run instead.
|
|
8463
|
+
await self._mount_message(AppMessage(outcome.output))
|
|
8464
|
+
return False
|
|
8465
|
+
|
|
8457
8466
|
if not outcome.success:
|
|
8458
8467
|
# Tail the last 200 chars — uv resolver prints the resolved
|
|
8459
8468
|
# error at the end, not the beginning.
|
|
@@ -8662,7 +8671,7 @@ class DeepAgentsApp(App):
|
|
|
8662
8671
|
)
|
|
8663
8672
|
)
|
|
8664
8673
|
raise asyncio.CancelledError
|
|
8665
|
-
if outcome.extra_was_absent:
|
|
8674
|
+
if outcome.extra_was_absent or outcome.deferred:
|
|
8666
8675
|
await self._mount_message(AppMessage(outcome.output))
|
|
8667
8676
|
return
|
|
8668
8677
|
if not outcome.success:
|
|
@@ -8822,7 +8831,7 @@ class DeepAgentsApp(App):
|
|
|
8822
8831
|
AppMessage(f"Installing package '{package}'..."),
|
|
8823
8832
|
)
|
|
8824
8833
|
try:
|
|
8825
|
-
|
|
8834
|
+
outcome = await perform_install_package(package, log_path=log_path)
|
|
8826
8835
|
except OSError as exc:
|
|
8827
8836
|
# Let `asyncio.CancelledError` propagate: on the message pump
|
|
8828
8837
|
# swallowing it would suppress shutdown, and on the detached
|
|
@@ -8835,8 +8844,13 @@ class DeepAgentsApp(App):
|
|
|
8835
8844
|
)
|
|
8836
8845
|
return
|
|
8837
8846
|
|
|
8838
|
-
if
|
|
8839
|
-
|
|
8847
|
+
if outcome.deferred:
|
|
8848
|
+
# Nothing ran; the guidance names the command to run instead.
|
|
8849
|
+
await self._mount_message(AppMessage(outcome.output))
|
|
8850
|
+
return
|
|
8851
|
+
|
|
8852
|
+
if not outcome.success:
|
|
8853
|
+
detail = f": {outcome.output[-200:]}" if outcome.output else ""
|
|
8840
8854
|
await self._mount_message(
|
|
8841
8855
|
ErrorMessage(
|
|
8842
8856
|
f"Install failed{detail}\nLog: {log_path}",
|
|
@@ -28061,9 +28075,7 @@ class DeepAgentsApp(App):
|
|
|
28061
28075
|
return
|
|
28062
28076
|
self._notice_registry.remove(entry.key)
|
|
28063
28077
|
if deferred:
|
|
28064
|
-
logger.info(
|
|
28065
|
-
"Deferred the Python migration for v%s", payload.latest
|
|
28066
|
-
)
|
|
28078
|
+
logger.info("Deferred the update to v%s", payload.latest)
|
|
28067
28079
|
screen.mark_warning("Update deferred. See details.")
|
|
28068
28080
|
return
|
|
28069
28081
|
logger.warning(
|
|
@@ -123,6 +123,10 @@ def run_uninstall_request(*, name: str) -> int:
|
|
|
123
123
|
if outcome.extra_was_absent:
|
|
124
124
|
console.print(escape(outcome.output), highlight=False)
|
|
125
125
|
return 0
|
|
126
|
+
if outcome.deferred:
|
|
127
|
+
# Nothing ran. `soft_wrap` keeps the command on one line to paste.
|
|
128
|
+
console.print(outcome.output, markup=False, highlight=False, soft_wrap=True)
|
|
129
|
+
return 1
|
|
126
130
|
if outcome.success:
|
|
127
131
|
console.print(
|
|
128
132
|
f"[green]Uninstalled extra '{name}'.[/green] Its packages are already "
|
|
@@ -260,15 +264,22 @@ def _run_install_package(*, name: str, yes: bool) -> int:
|
|
|
260
264
|
highlight=False,
|
|
261
265
|
markup=False,
|
|
262
266
|
)
|
|
263
|
-
|
|
264
|
-
perform_install_package(
|
|
267
|
+
outcome = asyncio.run(
|
|
268
|
+
perform_install_package(
|
|
269
|
+
package,
|
|
270
|
+
log_path=pkg_log_path,
|
|
271
|
+
)
|
|
265
272
|
)
|
|
266
|
-
if success:
|
|
273
|
+
if outcome.success:
|
|
267
274
|
console.print(f"[green]Installed package '{package}'.[/green]")
|
|
268
275
|
return 0
|
|
276
|
+
if outcome.deferred:
|
|
277
|
+
# Nothing ran. `soft_wrap` keeps the command on one line to paste.
|
|
278
|
+
console.print(outcome.output, markup=False, highlight=False, soft_wrap=True)
|
|
279
|
+
return 1
|
|
269
280
|
# Tail the last 200 chars — uv prints the resolved error at the end.
|
|
270
281
|
# The full output is in the log.
|
|
271
|
-
detail = f": {output[-200:]}" if output else ""
|
|
282
|
+
detail = f": {outcome.output[-200:]}" if outcome.output else ""
|
|
272
283
|
console.print(
|
|
273
284
|
f"[bold red]Install failed[/bold red]{escape(detail)}\nLog: {pkg_log_path}",
|
|
274
285
|
markup=True,
|
|
@@ -376,6 +387,10 @@ def _run_install_extra(*, name: str, yes: bool) -> int:
|
|
|
376
387
|
if outcome.success:
|
|
377
388
|
console.print(f"[green]Installed extra '{extra}'.[/green]")
|
|
378
389
|
return 0
|
|
390
|
+
if outcome.deferred:
|
|
391
|
+
# Nothing ran. `soft_wrap` keeps the command on one line to paste.
|
|
392
|
+
console.print(outcome.output, markup=False, highlight=False, soft_wrap=True)
|
|
393
|
+
return 1
|
|
379
394
|
# Tail the last 200 chars — uv resolver prints the resolved error at
|
|
380
395
|
# the end, not the beginning.
|
|
381
396
|
detail = f": {outcome.output[-200:]}" if outcome.output else ""
|
deepagents_code/main.py
CHANGED
|
@@ -616,6 +616,7 @@ def _run_startup_auto_update(console: Console) -> None:
|
|
|
616
616
|
from deepagents_code._version import __version__ as cli_version
|
|
617
617
|
from deepagents_code.config import _is_editable_install
|
|
618
618
|
from deepagents_code.update_check import (
|
|
619
|
+
_is_windows,
|
|
619
620
|
clear_startup_auto_update_failure,
|
|
620
621
|
create_update_log_file,
|
|
621
622
|
detect_shadowed_dcode_safe,
|
|
@@ -764,7 +765,9 @@ def _run_startup_auto_update(console: Console) -> None:
|
|
|
764
765
|
from deepagents_code._session_lock import is_sole_session
|
|
765
766
|
|
|
766
767
|
sole_session = is_sole_session()
|
|
767
|
-
|
|
768
|
+
# Windows defers every uv install, not only migrations, so there
|
|
769
|
+
# `perform_upgrade` picks which deferral guidance to repeat.
|
|
770
|
+
if retrying_deferral and not sole_session and not _is_windows():
|
|
768
771
|
# Repeat the deferral without re-fetching the release's Python
|
|
769
772
|
# requirement or announcing an update that will not happen.
|
|
770
773
|
console.print(
|
|
@@ -797,7 +800,8 @@ def _run_startup_auto_update(console: Console) -> None:
|
|
|
797
800
|
|
|
798
801
|
def show_notice(message: str) -> None:
|
|
799
802
|
notices.append(message)
|
|
800
|
-
|
|
803
|
+
# A notice can name a command to paste, so keep it on one line.
|
|
804
|
+
console.print(message, markup=False, highlight=False, soft_wrap=True)
|
|
801
805
|
|
|
802
806
|
success, output, _installed = asyncio.run(
|
|
803
807
|
perform_upgrade(
|
|
@@ -866,7 +870,7 @@ def _run_startup_auto_update(console: Console) -> None:
|
|
|
866
870
|
if unverified:
|
|
867
871
|
_exit_after_unverified_update(console, persisted=persisted)
|
|
868
872
|
if deferred:
|
|
869
|
-
# Nothing failed: the notice above explains how to
|
|
873
|
+
# Nothing failed: the notice above explains how to update.
|
|
870
874
|
note = escape(_session_lock_unavailable_note())
|
|
871
875
|
message = f"{note}Continuing with v{cli_version}."
|
|
872
876
|
elif notices:
|
|
@@ -6198,7 +6202,11 @@ def cli_main() -> None:
|
|
|
6198
6202
|
|
|
6199
6203
|
def show_notice(message: str) -> None:
|
|
6200
6204
|
notices.append(message)
|
|
6201
|
-
|
|
6205
|
+
# A notice can name a command to paste, so keep it on
|
|
6206
|
+
# one line.
|
|
6207
|
+
console.print(
|
|
6208
|
+
message, markup=False, highlight=False, soft_wrap=True
|
|
6209
|
+
)
|
|
6202
6210
|
|
|
6203
6211
|
success, output, _installed = asyncio.run(
|
|
6204
6212
|
perform_upgrade(
|
|
@@ -1161,8 +1161,17 @@ class CLICompactionMiddleware(SummarizationToolMiddleware):
|
|
|
1161
1161
|
Returns:
|
|
1162
1162
|
The model response.
|
|
1163
1163
|
"""
|
|
1164
|
-
|
|
1164
|
+
original = request
|
|
1165
|
+
call_model = partial(
|
|
1166
|
+
super().wrap_model_call,
|
|
1167
|
+
handler=lambda updated: handler(
|
|
1168
|
+
updated.override(
|
|
1169
|
+
model=original.model, model_settings=original.model_settings
|
|
1170
|
+
)
|
|
1171
|
+
),
|
|
1172
|
+
)
|
|
1165
1173
|
summarization = self._summarization_for_runtime(request.runtime)
|
|
1174
|
+
request = self._summarization_request(request, summarization)
|
|
1166
1175
|
prepared = self._auto_compaction_request(request, summarization)
|
|
1167
1176
|
if prepared is not None:
|
|
1168
1177
|
if not self._pre_auto_compact(prepared):
|
|
@@ -1219,10 +1228,19 @@ class CLICompactionMiddleware(SummarizationToolMiddleware):
|
|
|
1219
1228
|
Returns:
|
|
1220
1229
|
The model response.
|
|
1221
1230
|
"""
|
|
1222
|
-
|
|
1231
|
+
original = request
|
|
1232
|
+
call_model = partial(
|
|
1233
|
+
super().awrap_model_call,
|
|
1234
|
+
handler=lambda updated: handler(
|
|
1235
|
+
updated.override(
|
|
1236
|
+
model=original.model, model_settings=original.model_settings
|
|
1237
|
+
)
|
|
1238
|
+
),
|
|
1239
|
+
)
|
|
1223
1240
|
summarization = await asyncio.to_thread(
|
|
1224
1241
|
self._summarization_for_runtime, request.runtime
|
|
1225
1242
|
)
|
|
1243
|
+
request = self._summarization_request(request, summarization)
|
|
1226
1244
|
prepared = self._auto_compaction_request(request, summarization)
|
|
1227
1245
|
if prepared is not None:
|
|
1228
1246
|
if not self._pre_auto_compact(prepared):
|
|
@@ -1327,6 +1345,23 @@ class CLICompactionMiddleware(SummarizationToolMiddleware):
|
|
|
1327
1345
|
coroutine=async_compact,
|
|
1328
1346
|
)
|
|
1329
1347
|
|
|
1348
|
+
@staticmethod
|
|
1349
|
+
def _summarization_request(
|
|
1350
|
+
request: ModelRequest, summarization: SummarizationMiddleware
|
|
1351
|
+
) -> ModelRequest:
|
|
1352
|
+
"""Prepare selected-model budget checks without changing downstream selection.
|
|
1353
|
+
|
|
1354
|
+
Returns:
|
|
1355
|
+
A request using the cached summarizer's main model and runtime settings.
|
|
1356
|
+
"""
|
|
1357
|
+
config = _runtime_model_config(request.runtime)
|
|
1358
|
+
if not config.model_spec:
|
|
1359
|
+
return request
|
|
1360
|
+
return request.override(
|
|
1361
|
+
model=summarization.model,
|
|
1362
|
+
model_settings={**request.model_settings, **config.model_params},
|
|
1363
|
+
)
|
|
1364
|
+
|
|
1330
1365
|
def _summarization_for_runtime(
|
|
1331
1366
|
self, runtime: _HasRunContext
|
|
1332
1367
|
) -> SummarizationMiddleware:
|
|
@@ -15,9 +15,11 @@ from typing import TYPE_CHECKING, Final, Literal, override
|
|
|
15
15
|
|
|
16
16
|
from langchain.agents.middleware.types import (
|
|
17
17
|
AgentMiddleware,
|
|
18
|
+
ModelResponse,
|
|
18
19
|
TracePolicy,
|
|
19
20
|
omit_payload,
|
|
20
21
|
)
|
|
22
|
+
from langchain_core.exceptions import ModelRefusalError
|
|
21
23
|
from langchain_core.messages import AIMessage, ToolMessage
|
|
22
24
|
|
|
23
25
|
from deepagents_code.local_context import _FORKED_CONTEXT_KEY
|
|
@@ -27,7 +29,6 @@ if TYPE_CHECKING:
|
|
|
27
29
|
|
|
28
30
|
from langchain.agents.middleware.types import (
|
|
29
31
|
ModelRequest,
|
|
30
|
-
ModelResponse,
|
|
31
32
|
ToolCallRequest,
|
|
32
33
|
)
|
|
33
34
|
from langchain_core.language_models import BaseChatModel
|
|
@@ -373,10 +374,21 @@ class EmptyTruncatedReplyMiddleware(AgentMiddleware):
|
|
|
373
374
|
) -> ModelResponse:
|
|
374
375
|
"""Raise when the reply was cut off before any output.
|
|
375
376
|
|
|
377
|
+
A `ModelRefusalError` from inner middleware is turned back into the
|
|
378
|
+
refused reply, so refusals get the same handling as other cut-off replies.
|
|
379
|
+
|
|
376
380
|
Returns:
|
|
377
381
|
The unchanged model response.
|
|
382
|
+
|
|
383
|
+
Raises:
|
|
384
|
+
ModelRefusalError: If the refusal carries no reply message.
|
|
378
385
|
"""
|
|
379
|
-
|
|
386
|
+
try:
|
|
387
|
+
response = handler(request)
|
|
388
|
+
except ModelRefusalError as error:
|
|
389
|
+
if not isinstance(error.raw_message, AIMessage):
|
|
390
|
+
raise
|
|
391
|
+
response = ModelResponse(result=[error.raw_message])
|
|
380
392
|
self._check(response, request)
|
|
381
393
|
return response
|
|
382
394
|
|
|
@@ -387,10 +399,21 @@ class EmptyTruncatedReplyMiddleware(AgentMiddleware):
|
|
|
387
399
|
) -> ModelResponse:
|
|
388
400
|
"""Raise when the reply was cut off before any output.
|
|
389
401
|
|
|
402
|
+
A `ModelRefusalError` from inner middleware is turned back into the
|
|
403
|
+
refused reply, so refusals get the same handling as other cut-off replies.
|
|
404
|
+
|
|
390
405
|
Returns:
|
|
391
406
|
The unchanged model response.
|
|
407
|
+
|
|
408
|
+
Raises:
|
|
409
|
+
ModelRefusalError: If the refusal carries no reply message.
|
|
392
410
|
"""
|
|
393
|
-
|
|
411
|
+
try:
|
|
412
|
+
response = await handler(request)
|
|
413
|
+
except ModelRefusalError as error:
|
|
414
|
+
if not isinstance(error.raw_message, AIMessage):
|
|
415
|
+
raise
|
|
416
|
+
response = ModelResponse(result=[error.raw_message])
|
|
394
417
|
self._check(response, request)
|
|
395
418
|
return response
|
|
396
419
|
|
deepagents_code/update_check.py
CHANGED
|
@@ -1650,6 +1650,25 @@ def _is_windows() -> bool:
|
|
|
1650
1650
|
return os.name == "nt"
|
|
1651
1651
|
|
|
1652
1652
|
|
|
1653
|
+
def _shell_quote(arg: str) -> str:
|
|
1654
|
+
"""Quote *arg* for a uv command that dcode runs or prints.
|
|
1655
|
+
|
|
1656
|
+
On Windows, `asyncio.create_subprocess_shell` runs commands through
|
|
1657
|
+
cmd.exe, which passes single quotes on to uv as part of the argument, and
|
|
1658
|
+
users paste printed commands into cmd.exe or PowerShell. Double quotes are
|
|
1659
|
+
the only quoting both shells remove. They suit every value quoted here:
|
|
1660
|
+
package names, versions, uv Python requests and Windows paths cannot
|
|
1661
|
+
contain a double quote.
|
|
1662
|
+
|
|
1663
|
+
Returns:
|
|
1664
|
+
*arg* quoted for POSIX `sh`, or for both cmd.exe and PowerShell on
|
|
1665
|
+
Windows.
|
|
1666
|
+
"""
|
|
1667
|
+
if not _is_windows():
|
|
1668
|
+
return shlex.quote(arg)
|
|
1669
|
+
return f'"{arg}"'
|
|
1670
|
+
|
|
1671
|
+
|
|
1653
1672
|
def _upgraded_entry_point(upgraded_bin_dir: Path, name: str) -> Path:
|
|
1654
1673
|
"""Find a console-script shim without searching outside uv's bin directory.
|
|
1655
1674
|
|
|
@@ -2787,13 +2806,10 @@ def migration_deferral_message(target_version: str) -> str:
|
|
|
2787
2806
|
Windows the uv command to run outside dcode.
|
|
2788
2807
|
"""
|
|
2789
2808
|
if _is_windows():
|
|
2790
|
-
|
|
2791
|
-
# environment that `dcode update` itself runs from.
|
|
2809
|
+
command = _windows_upgrade_command(target_version, python="3.14")
|
|
2792
2810
|
return (
|
|
2793
2811
|
f"v{target_version} requires migrating dcode to Python 3.14. "
|
|
2794
|
-
"
|
|
2795
|
-
"Nothing was installed. Quit every dcode session, then run from "
|
|
2796
|
-
f"your shell: {_windows_migration_command(target_version)}"
|
|
2812
|
+
f"{_windows_install_deferral(command)}"
|
|
2797
2813
|
)
|
|
2798
2814
|
from deepagents_code._invocation import invoked_name
|
|
2799
2815
|
|
|
@@ -2804,8 +2820,31 @@ def migration_deferral_message(target_version: str) -> str:
|
|
|
2804
2820
|
)
|
|
2805
2821
|
|
|
2806
2822
|
|
|
2807
|
-
def
|
|
2808
|
-
"""Return the uv
|
|
2823
|
+
def _windows_install_deferral(command: str) -> str:
|
|
2824
|
+
"""Return the guidance for a uv install that dcode must not run on Windows.
|
|
2825
|
+
|
|
2826
|
+
After installing, uv replaces the tool's entry points, but Windows keeps
|
|
2827
|
+
the running `dcode.exe` locked. uv then deletes the tool environment it
|
|
2828
|
+
could not finish replacing, and dcode cannot start until it is reinstalled
|
|
2829
|
+
by hand. So on Windows every install is left to the user's shell.
|
|
2830
|
+
|
|
2831
|
+
Returns:
|
|
2832
|
+
A user-facing message that names *command*.
|
|
2833
|
+
"""
|
|
2834
|
+
return (
|
|
2835
|
+
"On Windows, dcode cannot rebuild the environment it runs from. "
|
|
2836
|
+
"Nothing was installed. Quit every dcode session, then run from "
|
|
2837
|
+
f"your shell: {command}"
|
|
2838
|
+
)
|
|
2839
|
+
|
|
2840
|
+
|
|
2841
|
+
def _windows_upgrade_command(
|
|
2842
|
+
target_version: str,
|
|
2843
|
+
*,
|
|
2844
|
+
python: str | None = None,
|
|
2845
|
+
include_prereleases: bool | None = None,
|
|
2846
|
+
) -> str:
|
|
2847
|
+
"""Return the uv command that upgrades dcode from outside its environment.
|
|
2809
2848
|
|
|
2810
2849
|
Returns:
|
|
2811
2850
|
The receipt-preserving command, or a bare one with a reminder when
|
|
@@ -2814,16 +2853,22 @@ def _windows_migration_command(target_version: str) -> str:
|
|
|
2814
2853
|
from deepagents_code.extras_info import ExtrasIntrospectionError
|
|
2815
2854
|
|
|
2816
2855
|
try:
|
|
2817
|
-
return upgrade_install_command(
|
|
2856
|
+
return upgrade_install_command(
|
|
2857
|
+
include_prereleases=include_prereleases,
|
|
2858
|
+
version=target_version,
|
|
2859
|
+
python=python,
|
|
2860
|
+
)
|
|
2818
2861
|
except ExtrasIntrospectionError, ToolRequirementIntrospectionError:
|
|
2819
2862
|
logger.warning(
|
|
2820
|
-
"Could not read the uv receipt for the
|
|
2863
|
+
"Could not read the uv receipt for the upgrade command",
|
|
2821
2864
|
exc_info=True,
|
|
2822
2865
|
)
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
"(reselect extras and added packages)"
|
|
2866
|
+
command = upgrade_command(
|
|
2867
|
+
include_prereleases=include_prereleases, version=target_version
|
|
2826
2868
|
)
|
|
2869
|
+
if python is not None:
|
|
2870
|
+
command += f" --python {_shell_quote(python)}"
|
|
2871
|
+
return f"{command} (reselect extras and added packages)"
|
|
2827
2872
|
|
|
2828
2873
|
|
|
2829
2874
|
_MIGRATION_RECOVERY = (
|
|
@@ -2961,7 +3006,9 @@ async def perform_upgrade(
|
|
|
2961
3006
|
"""Attempt to upgrade `deepagents-code` using the detected install method.
|
|
2962
3007
|
|
|
2963
3008
|
Only tries the detected method — does not fall back to other package
|
|
2964
|
-
managers to avoid cross-environment contamination.
|
|
3009
|
+
managers to avoid cross-environment contamination. On Windows a uv upgrade
|
|
3010
|
+
is always deferred: the guidance names the command to run once dcode is
|
|
3011
|
+
closed (see `_windows_install_deferral`).
|
|
2965
3012
|
|
|
2966
3013
|
Args:
|
|
2967
3014
|
progress: Optional callback invoked for each output line.
|
|
@@ -2982,12 +3029,11 @@ async def perform_upgrade(
|
|
|
2982
3029
|
allow_python_migration: When `False` and the target needs a Python
|
|
2983
3030
|
migration, install nothing and return failure with deferral
|
|
2984
3031
|
guidance (also sent to `on_notice`). Disable wherever a rebuilt
|
|
2985
|
-
environment could break a running session.
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
deferral rather than a failure.
|
|
3032
|
+
environment could break a running session.
|
|
3033
|
+
on_migration_deferred: Called when the upgrade is deferred instead of
|
|
3034
|
+
run (a Python migration that `allow_python_migration` forbids, or
|
|
3035
|
+
any uv upgrade on Windows), so callers can report a deferral
|
|
3036
|
+
rather than a failure.
|
|
2991
3037
|
on_unverified_install: Called when uv exited successfully but the
|
|
2992
3038
|
installed version could not be verified. The tool environment has
|
|
2993
3039
|
changed, so a caller that has not loaded its code yet must not
|
|
@@ -3056,7 +3102,8 @@ async def perform_upgrade(
|
|
|
3056
3102
|
if (
|
|
3057
3103
|
python is not None
|
|
3058
3104
|
and target_version
|
|
3059
|
-
and
|
|
3105
|
+
and not allow_python_migration
|
|
3106
|
+
and not _is_windows()
|
|
3060
3107
|
):
|
|
3061
3108
|
logger.info("Deferred the Python 3.14 migration for v%s", target_version)
|
|
3062
3109
|
guidance = migration_deferral_message(target_version)
|
|
@@ -3078,6 +3125,26 @@ async def perform_upgrade(
|
|
|
3078
3125
|
if not resolved_include_prereleases and include_prereleases is None:
|
|
3079
3126
|
targeted_pins = release_prerelease_pins(target_version)
|
|
3080
3127
|
|
|
3128
|
+
if method == "uv" and target_version and _is_windows():
|
|
3129
|
+
logger.info("Deferred the update to v%s on Windows", target_version)
|
|
3130
|
+
# The printed command cannot reference the temporary constraints
|
|
3131
|
+
# file, so it admits pre-releases the way the manual hints do.
|
|
3132
|
+
command = _windows_upgrade_command(
|
|
3133
|
+
target_version,
|
|
3134
|
+
python=python,
|
|
3135
|
+
include_prereleases=resolved_include_prereleases or bool(targeted_pins),
|
|
3136
|
+
)
|
|
3137
|
+
guidance = _windows_install_deferral(command)
|
|
3138
|
+
if python is not None:
|
|
3139
|
+
guidance = (
|
|
3140
|
+
f"v{target_version} requires migrating dcode to Python 3.14. "
|
|
3141
|
+
+ guidance
|
|
3142
|
+
)
|
|
3143
|
+
if on_migration_deferred is not None:
|
|
3144
|
+
on_migration_deferred()
|
|
3145
|
+
await _emit_progress(on_notice, guidance)
|
|
3146
|
+
return False, guidance, None
|
|
3147
|
+
|
|
3081
3148
|
if resolved_include_prereleases or targeted_pins:
|
|
3082
3149
|
supported, reason = prerelease_upgrade_supported(method)
|
|
3083
3150
|
if not supported:
|
|
@@ -3203,18 +3270,28 @@ async def perform_upgrade(
|
|
|
3203
3270
|
return success, output, installed_version
|
|
3204
3271
|
|
|
3205
3272
|
|
|
3273
|
+
class InstallOutcome(NamedTuple):
|
|
3274
|
+
"""Result of an install, including guidance when execution was deferred."""
|
|
3275
|
+
|
|
3276
|
+
success: bool
|
|
3277
|
+
output: str
|
|
3278
|
+
deferred: bool = False
|
|
3279
|
+
|
|
3280
|
+
|
|
3206
3281
|
async def perform_dependency_refresh(
|
|
3207
3282
|
*,
|
|
3208
3283
|
progress: UpgradeProgressCallback | None = None,
|
|
3209
3284
|
log_path: Path | None = None,
|
|
3210
3285
|
include_prereleases: bool | None = None,
|
|
3211
|
-
) ->
|
|
3286
|
+
) -> InstallOutcome:
|
|
3212
3287
|
"""Refresh dependencies while keeping `deepagents-code` on this version.
|
|
3213
3288
|
|
|
3214
3289
|
Runs `uv tool install -U deepagents-code==<current>` instead of
|
|
3215
3290
|
`uv tool upgrade deepagents-code`, so compatible dependency releases can be
|
|
3216
3291
|
picked up without crossing to a newer app version. Only uv-managed installs
|
|
3217
3292
|
are supported; other install methods cannot safely express this operation.
|
|
3293
|
+
On Windows the refresh is deferred to the user's shell instead (see
|
|
3294
|
+
`_windows_install_deferral`).
|
|
3218
3295
|
|
|
3219
3296
|
Args:
|
|
3220
3297
|
progress: Optional callback invoked for each output line.
|
|
@@ -3223,16 +3300,16 @@ async def perform_dependency_refresh(
|
|
|
3223
3300
|
`None`, follows the installed version's channel.
|
|
3224
3301
|
|
|
3225
3302
|
Returns:
|
|
3226
|
-
|
|
3303
|
+
The install outcome. `output` is the combined stdout/stderr, or an
|
|
3227
3304
|
explanatory message when the install method is unsupported, `uv` is
|
|
3228
|
-
unavailable, requirement introspection fails,
|
|
3229
|
-
fails or times out.
|
|
3305
|
+
unavailable, requirement introspection fails, the refresh is
|
|
3306
|
+
deferred, or the subprocess fails or times out.
|
|
3230
3307
|
"""
|
|
3231
3308
|
supported, reason = dependency_refresh_supported()
|
|
3232
3309
|
if not supported:
|
|
3233
|
-
return False, reason or ""
|
|
3310
|
+
return InstallOutcome(False, reason or "")
|
|
3234
3311
|
if not shutil.which("uv"):
|
|
3235
|
-
return False, "`uv` not found on PATH."
|
|
3312
|
+
return InstallOutcome(False, "`uv` not found on PATH.")
|
|
3236
3313
|
|
|
3237
3314
|
from deepagents_code.extras_info import ExtrasIntrospectionError
|
|
3238
3315
|
|
|
@@ -3245,8 +3322,12 @@ async def perform_dependency_refresh(
|
|
|
3245
3322
|
ToolRequirementIntrospectionError,
|
|
3246
3323
|
ValueError,
|
|
3247
3324
|
) as exc:
|
|
3248
|
-
return False, f"{type(exc).__name__}: {exc}"
|
|
3249
|
-
|
|
3325
|
+
return InstallOutcome(False, f"{type(exc).__name__}: {exc}")
|
|
3326
|
+
if _is_windows():
|
|
3327
|
+
return InstallOutcome(False, _windows_install_deferral(cmd), deferred=True)
|
|
3328
|
+
return InstallOutcome(
|
|
3329
|
+
*await _run_install_subprocess(cmd, progress=progress, log_path=log_path)
|
|
3330
|
+
)
|
|
3250
3331
|
|
|
3251
3332
|
|
|
3252
3333
|
async def perform_dependency_refresh_dry_run(
|
|
@@ -3674,7 +3755,8 @@ def _dcode_extras_requirement(
|
|
|
3674
3755
|
extras survive a `uv tool install` reinstall — a bare `deepagents-code`
|
|
3675
3756
|
request would replace the tool and drop them. Returns plain
|
|
3676
3757
|
`deepagents-code` when no extras or version are selected; otherwise the
|
|
3677
|
-
|
|
3758
|
+
requirement quoted by `_shell_quote`, which keeps zsh from globbing
|
|
3759
|
+
brackets.
|
|
3678
3760
|
|
|
3679
3761
|
Args:
|
|
3680
3762
|
extras: Extra names to encode. Each is validated against PEP 508
|
|
@@ -3711,7 +3793,7 @@ def _dcode_extras_requirement(
|
|
|
3711
3793
|
requirement = f"deepagents-code{extras_part}{version_suffix}"
|
|
3712
3794
|
if not names and version is None:
|
|
3713
3795
|
return requirement
|
|
3714
|
-
return
|
|
3796
|
+
return _shell_quote(requirement)
|
|
3715
3797
|
|
|
3716
3798
|
|
|
3717
3799
|
def _uv_tool_install_command(
|
|
@@ -3746,7 +3828,7 @@ def _uv_tool_install_command(
|
|
|
3746
3828
|
`--with` packages. Names already present (compared canonically) are
|
|
3747
3829
|
not duplicated; genuinely new names are appended after the preserved
|
|
3748
3830
|
ones. Callers must validate these names before passing them — the
|
|
3749
|
-
builder only
|
|
3831
|
+
builder only quotes them with `_shell_quote`.
|
|
3750
3832
|
python: Interpreter to pass as `--python` (e.g. `'3.14'`), overriding
|
|
3751
3833
|
the receipt. When `None`, the receipt's interpreter is reused.
|
|
3752
3834
|
reinstall: When `True`, add `--reinstall` so uv rebuilds the tool
|
|
@@ -3807,7 +3889,7 @@ def _uv_tool_install_command(
|
|
|
3807
3889
|
cmd = "uv tool install --reinstall -U" if reinstall else "uv tool install -U"
|
|
3808
3890
|
python = python if python is not None else _uv_tool_python(data=receipt)
|
|
3809
3891
|
if python is not None:
|
|
3810
|
-
cmd += f" --python {
|
|
3892
|
+
cmd += f" --python {_shell_quote(python)}"
|
|
3811
3893
|
cmd += f" {requirement}"
|
|
3812
3894
|
with_packages = list(
|
|
3813
3895
|
_uv_tool_with_packages(distribution_name=distribution_name, data=receipt)
|
|
@@ -3818,7 +3900,7 @@ def _uv_tool_install_command(
|
|
|
3818
3900
|
with_packages.append(package)
|
|
3819
3901
|
known.add(canonicalize_name(package))
|
|
3820
3902
|
for package in with_packages:
|
|
3821
|
-
cmd += f" --with {
|
|
3903
|
+
cmd += f" --with {_shell_quote(package)}"
|
|
3822
3904
|
if constraints_path is not None or prerelease_strategy is not None:
|
|
3823
3905
|
return _append_uv_prerelease_flags(
|
|
3824
3906
|
cmd,
|
|
@@ -3840,14 +3922,14 @@ def _append_uv_prerelease_flags(
|
|
|
3840
3922
|
|
|
3841
3923
|
Emits the scoped pre-release form: a constraints file pinning the exact
|
|
3842
3924
|
pre-release dependency plus a non-`allow` strategy (e.g.
|
|
3843
|
-
`if-necessary-or-explicit`). The constraints path is
|
|
3844
|
-
the strategy is a fixed internal literal.
|
|
3925
|
+
`if-necessary-or-explicit`). The constraints path is quoted with
|
|
3926
|
+
`_shell_quote`; the strategy is a fixed internal literal.
|
|
3845
3927
|
|
|
3846
3928
|
Returns:
|
|
3847
3929
|
`cmd` with any `--constraints`/`--prerelease` flags appended.
|
|
3848
3930
|
"""
|
|
3849
3931
|
if constraints_path is not None:
|
|
3850
|
-
cmd += f" --constraints {
|
|
3932
|
+
cmd += f" --constraints {_shell_quote(str(constraints_path))}"
|
|
3851
3933
|
if prerelease_strategy is not None:
|
|
3852
3934
|
cmd += f" --prerelease {prerelease_strategy}"
|
|
3853
3935
|
return cmd
|
|
@@ -4023,11 +4105,11 @@ def dependency_refresh_dry_run_command(
|
|
|
4023
4105
|
requirement = _dcode_extras_requirement(extras, version=version)
|
|
4024
4106
|
cmd = (
|
|
4025
4107
|
"uv pip install --dry-run --python "
|
|
4026
|
-
f"{
|
|
4108
|
+
f"{_shell_quote(target_python)} -U {requirement}"
|
|
4027
4109
|
)
|
|
4028
4110
|
with_packages = _uv_tool_with_packages(distribution_name=distribution_name)
|
|
4029
4111
|
for package in with_packages:
|
|
4030
|
-
cmd += f" {
|
|
4112
|
+
cmd += f" {_shell_quote(package)}"
|
|
4031
4113
|
if _resolve_include_prereleases(include_prereleases):
|
|
4032
4114
|
cmd += " --prerelease allow"
|
|
4033
4115
|
return cmd
|
|
@@ -4043,7 +4125,7 @@ def install_package_command(
|
|
|
4043
4125
|
The result is built for *execution* (via `perform_install_package`), not for
|
|
4044
4126
|
display — surfacing raw `uv tool` invocations to the user is intentionally
|
|
4045
4127
|
avoided. `package` is validated here against PEP 508 grammar and then
|
|
4046
|
-
|
|
4128
|
+
quoted by the shared builder: the validation already blocks shell
|
|
4047
4129
|
metacharacters, so the quoting is defense in depth that keeps the command
|
|
4048
4130
|
safe even if the pattern is later loosened.
|
|
4049
4131
|
|
|
@@ -4497,6 +4579,9 @@ class ExtraInstallOutcome(NamedTuple):
|
|
|
4497
4579
|
the update lock another process still holds.
|
|
4498
4580
|
"""
|
|
4499
4581
|
|
|
4582
|
+
deferred: bool = False
|
|
4583
|
+
"""Whether output is guidance for an install that did not run."""
|
|
4584
|
+
|
|
4500
4585
|
|
|
4501
4586
|
async def perform_install_extra(
|
|
4502
4587
|
extra: str,
|
|
@@ -4512,7 +4597,9 @@ async def perform_install_extra(
|
|
|
4512
4597
|
concurrent install, removal, or upgrade cannot rebuild from a stale receipt.
|
|
4513
4598
|
Editable installs are refused — the caller should rerun their
|
|
4514
4599
|
`uv tool install --editable` command with `--with 'deepagents-code[<extra>]'`
|
|
4515
|
-
added so the extra is resolved against the editable source.
|
|
4600
|
+
added so the extra is resolved against the editable source. On Windows the
|
|
4601
|
+
install is deferred to the user's shell instead (see
|
|
4602
|
+
`_windows_install_deferral`).
|
|
4516
4603
|
|
|
4517
4604
|
Args:
|
|
4518
4605
|
extra: The extra name to install. Must satisfy `is_valid_extra_name`;
|
|
@@ -4582,6 +4669,10 @@ async def perform_install_extra(
|
|
|
4582
4669
|
ValueError,
|
|
4583
4670
|
) as exc:
|
|
4584
4671
|
return ExtraInstallOutcome(False, f"{type(exc).__name__}: {exc}")
|
|
4672
|
+
if _is_windows():
|
|
4673
|
+
return ExtraInstallOutcome(
|
|
4674
|
+
False, _windows_install_deferral(cmd), deferred=True
|
|
4675
|
+
)
|
|
4585
4676
|
return ExtraInstallOutcome(
|
|
4586
4677
|
*await _run_install_subprocess(cmd, progress=progress, log_path=log_path)
|
|
4587
4678
|
)
|
|
@@ -4614,6 +4705,9 @@ class ExtraRemovalOutcome(NamedTuple):
|
|
|
4614
4705
|
interrupted: bool = False
|
|
4615
4706
|
"""Whether cancellation interrupted a rebuild after command generation."""
|
|
4616
4707
|
|
|
4708
|
+
deferred: bool = False
|
|
4709
|
+
"""Whether output is guidance for an install that did not run."""
|
|
4710
|
+
|
|
4617
4711
|
|
|
4618
4712
|
async def perform_uninstall_extra(
|
|
4619
4713
|
extra: str,
|
|
@@ -4626,7 +4720,9 @@ async def perform_uninstall_extra(
|
|
|
4626
4720
|
The install lock covers both receipt inspection and uv execution, so a
|
|
4627
4721
|
concurrent upgrade, install, or removal cannot rebuild from a receipt this
|
|
4628
4722
|
call is midway through replacing. It fail-opens when the lock file is unusable
|
|
4629
|
-
(see `update_install_lock`), so exclusion is best-effort.
|
|
4723
|
+
(see `update_install_lock`), so exclusion is best-effort. On Windows the
|
|
4724
|
+
rebuild is deferred to the user's shell instead (see
|
|
4725
|
+
`_windows_install_deferral`).
|
|
4630
4726
|
|
|
4631
4727
|
Args:
|
|
4632
4728
|
extra: Extra name to remove. Must satisfy `is_valid_extra_name`; invalid
|
|
@@ -4678,6 +4774,10 @@ async def perform_uninstall_extra(
|
|
|
4678
4774
|
return ExtraRemovalOutcome(
|
|
4679
4775
|
False, "`uv` not found on PATH; extras cannot be removed."
|
|
4680
4776
|
)
|
|
4777
|
+
if _is_windows():
|
|
4778
|
+
return ExtraRemovalOutcome(
|
|
4779
|
+
False, _windows_install_deferral(cmd), deferred=True
|
|
4780
|
+
)
|
|
4681
4781
|
try:
|
|
4682
4782
|
success, output = await _run_install_subprocess(
|
|
4683
4783
|
cmd, progress=progress, log_path=log_path
|
|
@@ -4707,7 +4807,7 @@ async def perform_install_package(
|
|
|
4707
4807
|
*,
|
|
4708
4808
|
progress: UpgradeProgressCallback | None = None,
|
|
4709
4809
|
log_path: Path | None = None,
|
|
4710
|
-
) ->
|
|
4810
|
+
) -> InstallOutcome:
|
|
4711
4811
|
"""Add an arbitrary `package` to the installed dcode tool environment.
|
|
4712
4812
|
|
|
4713
4813
|
Runs `uv tool install --reinstall -U 'deepagents-code[<extras>]==<current>'
|
|
@@ -4719,7 +4819,9 @@ async def perform_install_package(
|
|
|
4719
4819
|
rebuild from a stale receipt.
|
|
4720
4820
|
Editable installs are refused
|
|
4721
4821
|
— the caller should rerun their `uv tool install --editable` command with
|
|
4722
|
-
`--with <package>` added so it resolves against the editable source.
|
|
4822
|
+
`--with <package>` added so it resolves against the editable source. On
|
|
4823
|
+
Windows the install is deferred to the user's shell instead (see
|
|
4824
|
+
`_windows_install_deferral`).
|
|
4723
4825
|
|
|
4724
4826
|
Args:
|
|
4725
4827
|
package: The package name to install. Must satisfy
|
|
@@ -4730,52 +4832,57 @@ async def perform_install_package(
|
|
|
4730
4832
|
log_path: Optional path to persist command output.
|
|
4731
4833
|
|
|
4732
4834
|
Returns:
|
|
4733
|
-
|
|
4835
|
+
The install outcome. On success, `output` is the combined
|
|
4734
4836
|
stdout/stderr from the install. On failure it is an explanatory
|
|
4735
4837
|
message: when the install method is unsupported, `package` is
|
|
4736
|
-
malformed, `uv` is unavailable,
|
|
4737
|
-
times out.
|
|
4838
|
+
malformed, `uv` is unavailable, the install is deferred, or the
|
|
4839
|
+
install subprocess fails or times out.
|
|
4738
4840
|
"""
|
|
4739
4841
|
if not is_valid_package_name(package):
|
|
4740
|
-
return
|
|
4741
|
-
|
|
4842
|
+
return InstallOutcome(
|
|
4843
|
+
False,
|
|
4844
|
+
f"Invalid package name {package!r}: must match {_PACKAGE_NAME_RE.pattern}",
|
|
4742
4845
|
)
|
|
4743
4846
|
method = detect_install_method()
|
|
4744
4847
|
if method == "unknown":
|
|
4745
|
-
return
|
|
4848
|
+
return InstallOutcome(
|
|
4849
|
+
False,
|
|
4746
4850
|
"Editable install detected — cannot add packages automatically.\n"
|
|
4747
|
-
+ editable_package_hint(package)
|
|
4851
|
+
+ editable_package_hint(package),
|
|
4748
4852
|
)
|
|
4749
4853
|
if method == "brew":
|
|
4750
|
-
return
|
|
4854
|
+
return InstallOutcome(
|
|
4855
|
+
False,
|
|
4751
4856
|
"Homebrew install detected — packages can't be added to a brew "
|
|
4752
4857
|
"install. Reinstall dcode as a uv-managed tool (see the "
|
|
4753
|
-
"installation docs) to enable adding packages."
|
|
4858
|
+
"installation docs) to enable adding packages.",
|
|
4754
4859
|
)
|
|
4755
4860
|
if method == "other":
|
|
4756
|
-
return
|
|
4861
|
+
return InstallOutcome(
|
|
4862
|
+
False,
|
|
4757
4863
|
"Unsupported install method detected — cannot add packages without "
|
|
4758
4864
|
"knowing which environment provides `dcode`. Reinstall dcode "
|
|
4759
4865
|
"as a uv-managed tool (see the installation docs) to enable "
|
|
4760
|
-
"adding packages."
|
|
4866
|
+
"adding packages.",
|
|
4761
4867
|
)
|
|
4762
4868
|
|
|
4763
4869
|
if not shutil.which("uv"):
|
|
4764
|
-
return
|
|
4870
|
+
return InstallOutcome(
|
|
4871
|
+
False,
|
|
4765
4872
|
"Package installs require uv, which was not found. Reinstall "
|
|
4766
4873
|
"dcode following the installation docs so packages can be "
|
|
4767
|
-
"added."
|
|
4874
|
+
"added.",
|
|
4768
4875
|
)
|
|
4769
4876
|
|
|
4770
4877
|
with update_install_lock() as holding_update_lock:
|
|
4771
4878
|
if not holding_update_lock:
|
|
4772
|
-
return False, UPDATE_LOCK_CONTENDED_MESSAGE
|
|
4879
|
+
return InstallOutcome(False, UPDATE_LOCK_CONTENDED_MESSAGE)
|
|
4773
4880
|
from deepagents_code.extras_info import ExtrasIntrospectionError
|
|
4774
4881
|
|
|
4775
4882
|
try:
|
|
4776
4883
|
cmd = install_package_command(package)
|
|
4777
4884
|
except ValueError as exc:
|
|
4778
|
-
return False, f"{type(exc).__name__}: {exc}"
|
|
4885
|
+
return InstallOutcome(False, f"{type(exc).__name__}: {exc}")
|
|
4779
4886
|
except (ExtrasIntrospectionError, ToolRequirementIntrospectionError) as exc:
|
|
4780
4887
|
# Distinct from a malformed package name: the running distribution's own
|
|
4781
4888
|
# metadata, or the uv tool receipt, could not be read or parsed. Leave a
|
|
@@ -4787,8 +4894,12 @@ async def perform_install_package(
|
|
|
4787
4894
|
package,
|
|
4788
4895
|
exc_info=True,
|
|
4789
4896
|
)
|
|
4790
|
-
return False, f"{type(exc).__name__}: {exc}"
|
|
4791
|
-
|
|
4897
|
+
return InstallOutcome(False, f"{type(exc).__name__}: {exc}")
|
|
4898
|
+
if _is_windows():
|
|
4899
|
+
return InstallOutcome(False, _windows_install_deferral(cmd), deferred=True)
|
|
4900
|
+
return InstallOutcome(
|
|
4901
|
+
*await _run_install_subprocess(cmd, progress=progress, log_path=log_path)
|
|
4902
|
+
)
|
|
4792
4903
|
|
|
4793
4904
|
|
|
4794
4905
|
# ---------------------------------------------------------------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: deepagents-code
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.5
|
|
4
4
|
Summary: Terminal coding agent built on the Deep Agents SDK - works with any model, with persistent memory, customizable skills, subagents, and approval controls.
|
|
5
5
|
Project-URL: Homepage, https://www.langchain.com/dcode
|
|
6
6
|
Project-URL: Documentation, https://docs.langchain.com/oss/deepagents/code/overview
|
|
@@ -28,21 +28,21 @@ Requires-Python: <3.15,>=3.14
|
|
|
28
28
|
Requires-Dist: aiosqlite>=0.22.1
|
|
29
29
|
Requires-Dist: anyio>=4.14.2
|
|
30
30
|
Requires-Dist: deepagents-acp<1.0.0,>=0.0.13
|
|
31
|
-
Requires-Dist: deepagents==0.7.
|
|
31
|
+
Requires-Dist: deepagents==0.7.34
|
|
32
32
|
Requires-Dist: fastmcp>=4.0.0b4
|
|
33
33
|
Requires-Dist: filelock<4.3,>=3.29.7
|
|
34
34
|
Requires-Dist: genai-prices<0.2.0,>=0.1.13
|
|
35
35
|
Requires-Dist: httpx>=0.28.1
|
|
36
|
-
Requires-Dist: langchain-anthropic<2.0.0,>=1.7.
|
|
37
|
-
Requires-Dist: langchain-core<2.0.0,>=1.7.
|
|
38
|
-
Requires-Dist: langchain-google-genai<5.0.0,>=4.4.
|
|
39
|
-
Requires-Dist: langchain-openai<2.0.0,>=1.7.
|
|
36
|
+
Requires-Dist: langchain-anthropic<2.0.0,>=1.7.10
|
|
37
|
+
Requires-Dist: langchain-core<2.0.0,>=1.7.6
|
|
38
|
+
Requires-Dist: langchain-google-genai<5.0.0,>=4.4.3
|
|
39
|
+
Requires-Dist: langchain-openai<2.0.0,>=1.7.4
|
|
40
40
|
Requires-Dist: langchain-quickjs<0.4.0,>=0.3.11
|
|
41
|
-
Requires-Dist: langchain<2.0.0,>=1.4.
|
|
41
|
+
Requires-Dist: langchain<2.0.0,>=1.4.9
|
|
42
42
|
Requires-Dist: langgraph-checkpoint-sqlite<4.0.0,>=3.1.3
|
|
43
|
-
Requires-Dist: langgraph-cli[inmem]<1.0.0,>=0.4.
|
|
44
|
-
Requires-Dist: langgraph-runtime-inmem<1.0.0,>=0.37.
|
|
45
|
-
Requires-Dist: langgraph-sdk<1.0.0,>=0.4.
|
|
43
|
+
Requires-Dist: langgraph-cli[inmem]<1.0.0,>=0.4.41
|
|
44
|
+
Requires-Dist: langgraph-runtime-inmem<1.0.0,>=0.37.1
|
|
45
|
+
Requires-Dist: langgraph-sdk<1.0.0,>=0.4.13
|
|
46
46
|
Requires-Dist: langsmith[sandbox]>=0.14.17
|
|
47
47
|
Requires-Dist: markdownify>=1.2.3
|
|
48
48
|
Requires-Dist: mcp>=2.0.0
|
|
@@ -65,13 +65,13 @@ Provides-Extra: agentcore
|
|
|
65
65
|
Requires-Dist: langchain-agentcore-codeinterpreter<1.0.0,>=0.0.6; extra == 'agentcore'
|
|
66
66
|
Provides-Extra: all-providers
|
|
67
67
|
Requires-Dist: aiohttp>=3.14.3; extra == 'all-providers'
|
|
68
|
-
Requires-Dist: langchain-anthropic<2.0.0,>=1.7.
|
|
68
|
+
Requires-Dist: langchain-anthropic<2.0.0,>=1.7.10; extra == 'all-providers'
|
|
69
69
|
Requires-Dist: langchain-aws<2.0.0,>=1.9.1; extra == 'all-providers'
|
|
70
70
|
Requires-Dist: langchain-baseten<1.0.0,>=0.2.5; extra == 'all-providers'
|
|
71
71
|
Requires-Dist: langchain-cohere<1.0.0,>=0.6.0; extra == 'all-providers'
|
|
72
72
|
Requires-Dist: langchain-deepseek<2.0.0,>=1.1.1; extra == 'all-providers'
|
|
73
|
-
Requires-Dist: langchain-fireworks<2.0.0,>=1.7.
|
|
74
|
-
Requires-Dist: langchain-google-genai<5.0.0,>=4.4.
|
|
73
|
+
Requires-Dist: langchain-fireworks<2.0.0,>=1.7.2; extra == 'all-providers'
|
|
74
|
+
Requires-Dist: langchain-google-genai<5.0.0,>=4.4.3; extra == 'all-providers'
|
|
75
75
|
Requires-Dist: langchain-google-vertexai<4.0.0,>=3.2.5; extra == 'all-providers'
|
|
76
76
|
Requires-Dist: langchain-groq<2.0.0,>=1.1.3; extra == 'all-providers'
|
|
77
77
|
Requires-Dist: langchain-huggingface<2.0.0,>=1.2.3; extra == 'all-providers'
|
|
@@ -81,7 +81,7 @@ Requires-Dist: langchain-meta<2.0.0,>=0.5.0; extra == 'all-providers'
|
|
|
81
81
|
Requires-Dist: langchain-mistralai<2.0.0,>=1.1.6; extra == 'all-providers'
|
|
82
82
|
Requires-Dist: langchain-nvidia-ai-endpoints<2.0.0,>=1.5.0; extra == 'all-providers'
|
|
83
83
|
Requires-Dist: langchain-ollama<2.0.0,>=1.1.0; extra == 'all-providers'
|
|
84
|
-
Requires-Dist: langchain-openai<2.0.0,>=1.7.
|
|
84
|
+
Requires-Dist: langchain-openai<2.0.0,>=1.7.4; extra == 'all-providers'
|
|
85
85
|
Requires-Dist: langchain-openrouter<2.0.0,>=0.2.9; extra == 'all-providers'
|
|
86
86
|
Requires-Dist: langchain-perplexity<2.0.0,>=1.4.2; extra == 'all-providers'
|
|
87
87
|
Requires-Dist: langchain-together<2.0.0,>=0.4.0; extra == 'all-providers'
|
|
@@ -94,7 +94,7 @@ Requires-Dist: langchain-nvidia-openshell>=0.1.1; extra == 'all-sandboxes'
|
|
|
94
94
|
Requires-Dist: langchain-runloop>=0.0.7; extra == 'all-sandboxes'
|
|
95
95
|
Requires-Dist: langchain-vercel-sandbox>=0.0.2; extra == 'all-sandboxes'
|
|
96
96
|
Provides-Extra: anthropic
|
|
97
|
-
Requires-Dist: langchain-anthropic<2.0.0,>=1.7.
|
|
97
|
+
Requires-Dist: langchain-anthropic<2.0.0,>=1.7.10; extra == 'anthropic'
|
|
98
98
|
Provides-Extra: baseten
|
|
99
99
|
Requires-Dist: langchain-baseten<1.0.0,>=0.2.5; extra == 'baseten'
|
|
100
100
|
Provides-Extra: bedrock
|
|
@@ -106,9 +106,9 @@ Requires-Dist: langchain-daytona>=0.0.9; extra == 'daytona'
|
|
|
106
106
|
Provides-Extra: deepseek
|
|
107
107
|
Requires-Dist: langchain-deepseek<2.0.0,>=1.1.1; extra == 'deepseek'
|
|
108
108
|
Provides-Extra: fireworks
|
|
109
|
-
Requires-Dist: langchain-fireworks<2.0.0,>=1.7.
|
|
109
|
+
Requires-Dist: langchain-fireworks<2.0.0,>=1.7.2; extra == 'fireworks'
|
|
110
110
|
Provides-Extra: google-genai
|
|
111
|
-
Requires-Dist: langchain-google-genai<5.0.0,>=4.4.
|
|
111
|
+
Requires-Dist: langchain-google-genai<5.0.0,>=4.4.3; extra == 'google-genai'
|
|
112
112
|
Provides-Extra: groq
|
|
113
113
|
Requires-Dist: langchain-groq<2.0.0,>=1.1.3; extra == 'groq'
|
|
114
114
|
Provides-Extra: huggingface
|
|
@@ -132,7 +132,7 @@ Requires-Dist: langchain-nvidia-ai-endpoints<2.0.0,>=1.5.0; extra == 'nvidia'
|
|
|
132
132
|
Provides-Extra: ollama
|
|
133
133
|
Requires-Dist: langchain-ollama<2.0.0,>=1.1.0; extra == 'ollama'
|
|
134
134
|
Provides-Extra: openai
|
|
135
|
-
Requires-Dist: langchain-openai<2.0.0,>=1.7.
|
|
135
|
+
Requires-Dist: langchain-openai<2.0.0,>=1.7.4; extra == 'openai'
|
|
136
136
|
Provides-Extra: openrouter
|
|
137
137
|
Requires-Dist: langchain-openrouter<2.0.0,>=0.2.9; extra == 'openrouter'
|
|
138
138
|
Provides-Extra: openshell
|
|
@@ -2,7 +2,7 @@ deepagents_code/__init__.py,sha256=73a8obvgWKoHOkvV-npfpuJwVQTq4fy56ITb8ZkuTVo,2
|
|
|
2
2
|
deepagents_code/__main__.py,sha256=5ew3bdnHNft6Pbx9Svfs8jkvPwVOmRBsY5hubL2OicY,142
|
|
3
3
|
deepagents_code/_ask_user_types.py,sha256=YqyBfBlW1J7LpHqsN3seOnMX0MqdM11lGoFRXkxwHuw,30794
|
|
4
4
|
deepagents_code/_async.py,sha256=oONFzkt5GsIAYIyU2-OHRBOuxifWcZKuBqO4INxP1uE,711
|
|
5
|
-
deepagents_code/_build_info.py,sha256=
|
|
5
|
+
deepagents_code/_build_info.py,sha256=a7eiY37iC3dWau0SwQVeL32xe8RdEn2oJBi8YbT1CnY,80
|
|
6
6
|
deepagents_code/_checkpointer_adapter.py,sha256=0jEqLDDdGFPXLGiFsZiQb93uZzioA8PxpLBoU510Bnc,3558
|
|
7
7
|
deepagents_code/_cli_context.py,sha256=BsjGF9ytVLsVexLLKnHeLXDsSUgK2clpAUlW4eNJMC8,10345
|
|
8
8
|
deepagents_code/_constants.py,sha256=rvXyA-PNVZG49-fh1zWEHXrzvZlC7bAXq41rblRC7yk,5230
|
|
@@ -34,10 +34,10 @@ deepagents_code/_tool_free.py,sha256=i2-Ycq3gp7zT3UyagDSd4-5O9kigprR137ptO70hpfE
|
|
|
34
34
|
deepagents_code/_tool_stream.py,sha256=lXVM-0gObwmkik8ElEoPwaZI3PPq_ATar1fvPraW5Vk,39111
|
|
35
35
|
deepagents_code/_trace_redaction.py,sha256=ZEjAYg1BlH9hJu7K64jhjhnKVofw5pS0JnIYTOW37FU,5215
|
|
36
36
|
deepagents_code/_tracing.py,sha256=-Zucmritu9TreUHFcpwjiwPxkqmeJleL4dTDxKqPzLk,2530
|
|
37
|
-
deepagents_code/_version.py,sha256=
|
|
37
|
+
deepagents_code/_version.py,sha256=JYe8kQmI_wGzUewdl2eFI65KqgsdmV4KFCE8nPuYBRw,975
|
|
38
38
|
deepagents_code/acp.py,sha256=WCJcpmvUU_lX8yutv3CESV6TG5xPY6AflK0hFwSbuy8,4525
|
|
39
39
|
deepagents_code/agent.py,sha256=TF2AQog1lXY8OQcgdor3KeYCi2vP5ovrBtTaiS4HvF0,156437
|
|
40
|
-
deepagents_code/app.py,sha256=
|
|
40
|
+
deepagents_code/app.py,sha256=RLHHXnt1GW3gehg6d4VbWjw9Srodm_6c2CT2369xh9Y,1439000
|
|
41
41
|
deepagents_code/app.tcss,sha256=q8SmGF7t2xM7OGnKFr6jxGSqLPcwQ1mT-WQOEX_iX5Q,10728
|
|
42
42
|
deepagents_code/approval_mode.py,sha256=CTBUNNuXalzj5NxYeT0m3xH2d675JE5uT9fxZ0YhJZ4,19336
|
|
43
43
|
deepagents_code/ask_user.py,sha256=ice3x1SsOyXGoxpzM60MfuVxlVJGapOa782mxw7GVVo,24499
|
|
@@ -75,7 +75,7 @@ deepagents_code/input.py,sha256=WwrD0UMJ3x-Y6bgfVVJYBsj7e9noHyu9b6BE-i42hnM,3859
|
|
|
75
75
|
deepagents_code/iterm_cursor_guide.py,sha256=l2lcBb9N84ucTEsdI-SHBQ2h6grddNaXNMdLCLWewY8,5989
|
|
76
76
|
deepagents_code/json_types.py,sha256=lwkG1m0-flVumX4an4zaK4nLpkbAAl3tqJqUaOBy7SY,616
|
|
77
77
|
deepagents_code/local_context.py,sha256=PDIgSzTvosfGtz_bJtWkkillTMXFc00WPOUuxSknTDU,39295
|
|
78
|
-
deepagents_code/main.py,sha256=
|
|
78
|
+
deepagents_code/main.py,sha256=meBfFwSrEF_TjqwE5M8AnvZaRGxxhWZMbETiXK9aKCk,282889
|
|
79
79
|
deepagents_code/managed_tools.py,sha256=_UdVnot-sf7hbDzgPirHZXgp3l3G5DFuhuVL43vJfIQ,32993
|
|
80
80
|
deepagents_code/mcp_auth.py,sha256=9kwj3hmF4jOYAPuFchGdrfrbdoHZSKHLPPIAcLltI-M,97480
|
|
81
81
|
deepagents_code/mcp_config.py,sha256=3gcdbs13V3O5GizojB3rlgUbcbUDrFv9t2t_52yAkFU,7951
|
|
@@ -95,10 +95,10 @@ deepagents_code/model_retry.py,sha256=hdZY-mAi7kPYuyRBvhLHiWdq4xSHZiugnDE8QkN9AJ
|
|
|
95
95
|
deepagents_code/notifications.py,sha256=YybzJX5HLaDdNFk_WlHEXsefBchT9MCxO2M80CnBcAY,8441
|
|
96
96
|
deepagents_code/offload.py,sha256=s8u7il7WegoL0MwsB0uExAnmcy0cqQeBI8vk5ojxTLY,18198
|
|
97
97
|
deepagents_code/offload_api.py,sha256=u5EdSeenPsjKrqKMXxk0xymX_FWxZauxz-2AxiRUJ60,58503
|
|
98
|
-
deepagents_code/offload_middleware.py,sha256=
|
|
98
|
+
deepagents_code/offload_middleware.py,sha256=ogtYWewy64upkfHM_ebHXGoK0wJ5DNIkGXxX7m1blV8,76821
|
|
99
99
|
deepagents_code/onboarding.py,sha256=OAQV4hhVwULcJDB1S46B-CoFnf_uCjRQaEMK5xtLJmY,9772
|
|
100
100
|
deepagents_code/output.py,sha256=W8j1BleVaQ7M07nDRV9pgW4xSaRwlA5KfWyLtOeUrP0,2044
|
|
101
|
-
deepagents_code/output_truncation.py,sha256=
|
|
101
|
+
deepagents_code/output_truncation.py,sha256=jQpKecRRsbGEAKlF3FnBB_sibQ1yP8Lj_oUxSyhCyUs,15947
|
|
102
102
|
deepagents_code/paste_collapse.py,sha256=nukxFCmvMERwaf0ERVH5XuH7Y_TfoiKz7b5Y0ays8qc,3153
|
|
103
103
|
deepagents_code/project_utils.py,sha256=yGqY4qILS1hMLnVGd1AqU4KIGVRUXBbLhjTaj3iNXNc,8245
|
|
104
104
|
deepagents_code/provider_tool_search.py,sha256=tEClWbmMwMAJ39CvDBTyz3Xe4mxJ_EI7pgXXOhsVVtA,7370
|
|
@@ -124,7 +124,7 @@ deepagents_code/tools.py,sha256=LDRNbQvbH1in4o0Vgs8hHmTmaMoYNihsDmnreiEErak,2151
|
|
|
124
124
|
deepagents_code/turn_trace.py,sha256=sLSECRh4sgz6OpnsgbS-D7PdF-NbRk4zkahFKSTVFu8,4643
|
|
125
125
|
deepagents_code/ui.py,sha256=PMTJf_I8mipKIzRKMGR6GkIsOKOITtxSbz9UjM1gjFY,41365
|
|
126
126
|
deepagents_code/unicode_security.py,sha256=1j5lZPnsdQiKwMH9uCa_nfSaL6eCWvpM-nb2ECZbSFk,18563
|
|
127
|
-
deepagents_code/update_check.py,sha256=
|
|
127
|
+
deepagents_code/update_check.py,sha256=aAkdMmYTYpqjsfG1CPmj8eaagVIxseliPdX8ZV7iBLY,209811
|
|
128
128
|
deepagents_code/workspace.py,sha256=khy70RiXA4jfvaiULJUaUPNm3fi8eK6cpS-Xu0p2hg0,32422
|
|
129
129
|
deepagents_code/workspace_diagnostics.py,sha256=e12xrj-XOPoymsJ_0RqeEnt9TkUrkPRjyM1sp2T716E,16044
|
|
130
130
|
deepagents_code/built_in_skills/__init__.py,sha256=eBIGmXIRC-wrHxfYaY6C536YQ-VlTXHkZ6JgRL5J7jc,190
|
|
@@ -143,7 +143,7 @@ deepagents_code/client/session_cost.py,sha256=wWJZSg0Ec5Wd9yiVZiki9OlTHMKr84slHn
|
|
|
143
143
|
deepagents_code/client/commands/__init__.py,sha256=M8P0uUzuXpTzIUlxyz1vFZ3TyWlkrhVDse8IKIWs6BE,49
|
|
144
144
|
deepagents_code/client/commands/auth.py,sha256=Pkmk5vGvqgyzqJxwgf807bqI5m7lpxB4IGOjBBd6XWA,18717
|
|
145
145
|
deepagents_code/client/commands/config.py,sha256=JxDwmIAWT0TaeedQYyXFACNhoYphpx_aumYONbDpnts,49880
|
|
146
|
-
deepagents_code/client/commands/extras.py,sha256=
|
|
146
|
+
deepagents_code/client/commands/extras.py,sha256=TRt0Emd0x8a9MLZs9_JmQh2-ZfmZMxDnOkxNUgSm7Hc,15986
|
|
147
147
|
deepagents_code/client/commands/mcp.py,sha256=QEH0WuyOn-3LHNwI6_WooBrRg-55gmxV0rmrjgv4XEQ,17013
|
|
148
148
|
deepagents_code/client/commands/tools.py,sha256=y5NaeiJL4TYjyJfxukKfkj3jSa4h-m71j-HOSQ1oqWA,15858
|
|
149
149
|
deepagents_code/client/launch/__init__.py,sha256=yMGWZVpgZYkij5Jq8tTqhcigpppuTVazMmIYCNImiwk,74
|
|
@@ -318,9 +318,9 @@ deepagents_code/tui/widgets/final_markdown/_parse.py,sha256=NeclNxZwNmGkJZXefCVr
|
|
|
318
318
|
deepagents_code/tui/widgets/final_markdown/_rows.py,sha256=nsmk7N-2Lrueb4LvC0Y1zdZ__ywcqaKI1vaGaO5chDU,3947
|
|
319
319
|
deepagents_code/tui/widgets/final_markdown/_table.py,sha256=qZDsE0tpwMBI4ZZEg03L4Wc0FOXf10XUKwMHjn9V1iQ,4823
|
|
320
320
|
deepagents_code/tui/widgets/final_markdown/_widget.py,sha256=1BU2OAGaapEc4l4xKQOe-VgGDmQqrBs5zr4LKPd8cAg,11265
|
|
321
|
-
deepagents_code-0.2.
|
|
322
|
-
deepagents_code-0.2.
|
|
323
|
-
deepagents_code-0.2.
|
|
324
|
-
deepagents_code-0.2.
|
|
325
|
-
deepagents_code-0.2.
|
|
326
|
-
deepagents_code-0.2.
|
|
321
|
+
deepagents_code-0.2.5.data/data/deepagents_code/default_agent_prompt.md,sha256=4I23oEsscs0X-VqXJ6JiC_Tl3FV0f-Na4iIbs5tqVbQ,336
|
|
322
|
+
deepagents_code-0.2.5.dist-info/METADATA,sha256=k_zYlbh1qqLNY04K9GI1Ca9m30_C3rmTRYEyNrwRr_E,11616
|
|
323
|
+
deepagents_code-0.2.5.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
324
|
+
deepagents_code-0.2.5.dist-info/entry_points.txt,sha256=_6mmNRQU3vBqMDX-REOesqVwwqijvs-WASYDEvasGzQ,94
|
|
325
|
+
deepagents_code-0.2.5.dist-info/licenses/LICENSE,sha256=TsZ-TKbmch26hJssqCJhWXyGph7iFLvyFBYAa3stBHg,1067
|
|
326
|
+
deepagents_code-0.2.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|