euron-code 1.8.6__tar.gz → 1.8.8__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.
- {euron_code-1.8.6 → euron_code-1.8.8}/CHANGELOG.md +25 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/PKG-INFO +1 -1
- {euron_code-1.8.6 → euron_code-1.8.8}/pyproject.toml +1 -1
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/__init__.py +1 -1
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/agent.py +20 -4
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/llm/base.py +2 -1
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/repl.py +155 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/tools/ignore.py +75 -75
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_permissions.py +91 -91
- euron_code-1.8.8/tests/test_v187_sleep_wake.py +57 -0
- euron_code-1.8.8/tests/test_v188_typed_cli_commands.py +167 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/.gitignore +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/LICENSE +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/README.md +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/__main__.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/activity.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/api.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/attachments.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/auth.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/autoupdate.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/builtin_skills/build-from-reference/SKILL.md +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/builtin_skills/explain-codebase/SKILL.md +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/builtin_skills/review/SKILL.md +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/builtin_skills/test-writer/SKILL.md +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/cache.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/checkpoints.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/cli.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/codeindex.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/config.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/context.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/contextforge/LICENSE +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/contextforge/__init__.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/contextforge/text.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/contextforge/toolout.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/credentials.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/ctxstats.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/doctor.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/documents.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/dotnet.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/error_hints.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/errorlog.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/failures.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/friendly.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/frontmatter.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/hooks.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/keys.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/knowledge.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/licensing.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/llm/__init__.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/llm/anthropic.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/llm/openai_compat.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/llm/setup.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/logo.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/markdown_view.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/memory.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/migration.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/modes.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/mvc5.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/osscache.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/ossgithub.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/pasteinput.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/pathfix.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/permissions.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/progress.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/project_setup.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/prompts.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/repomap.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/rules.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/security_scan.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/sessions.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/skills.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/taskstate.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/textsafe.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/tls.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/tools/__init__.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/tools/background.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/tools/base.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/tools/db.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/tools/document.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/tools/erie.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/tools/fs.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/tools/normalize.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/tools/oss.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/tools/pathfind.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/tools/port.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/tools/reuse.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/tools/search.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/tools/shell.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/tools/skill.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/tools/symbols.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/tools/task.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/tools/todo.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/tools/web.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/tools/websearch.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/transcript.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/trust.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/ui.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/update_check.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/usage_view.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/version_info.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/src/euron_code/webforms.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/conftest.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/fake_providers.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/helpers.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/measure_floor.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/mock_gateway.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/serve_helper.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/sim_long_session.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_agent_mock.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_api_shell.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_bench.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_bench_harness.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_cli_e2e.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_context_memory_sessions.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_dashboard_fixes.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_dashboard_fixes_102.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_db.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_erie.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_knowledge_security.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_markdown_view.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_oss_local.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_powershell_exit_codes.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_qa_attach_secrets.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_qa_long_task.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_qa_print_output.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_qa_reuse_unrelated.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_qa_yolo_outside.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_render_ghost.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_repl.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_reuse_honesty.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_search.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_textsafe.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_tools_fs.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_transcript_ui.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_update_check.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v111_user_reports.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v113_fix_path.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v11_byo.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v11_speed.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v11_tool_fixes.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v130_cut_writes.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v130_reliability.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v140_parity.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v152_migration.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v153_user_errors.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v155_user_errors.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v156_autoupdate.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v156_paste_and_edits.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v157_zero_errors.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v15_hosted_models.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v15_reuse_off_subagent_hooks.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v160_stop_scope_atomic.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v161_residual_errors.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v170_v2.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v180_rescue_research_permissions.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v181_silent_failures_verified.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v182_zero_errors.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v184_selfupdate_pep668.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v186_bypass_and_waits.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v2_rules_skills_hooks.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v2_tokens_shortcuts.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v2_usage_headers.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v31_security.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v3_accounts_value_setup.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v3_activity.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v3_attachments.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v3_context.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v3_live_repl.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v3_single_login.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v4.py +0 -0
- {euron_code-1.8.6 → euron_code-1.8.8}/tests/test_v5.py +0 -0
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.8.8 (2026-11-20)
|
|
4
|
+
|
|
5
|
+
- **Typing a terminal command at the Euron Code prompt now does what you meant.** Many people typed
|
|
6
|
+
`euron --dangerously-skip-permissions` (or `--dangerously-skip-permissions`, `py -3 -m euron_code ...`) inside a
|
|
7
|
+
running session. It used to go to the model as a request, so bypass never turned on and the next edit still asked.
|
|
8
|
+
Now it turns bypass permissions mode on for the session (sub-agents too, the same as starting with the flag; turn it
|
|
9
|
+
off with `/permissions mode default`). Anything typed after the options is sent as your request, so
|
|
10
|
+
`euron --dangerously-skip-permissions fix the failing test` works in one line. `--permission-mode`, `--no-budget`,
|
|
11
|
+
`-c` / `--continue`, `--mode` and `--model` work the same way.
|
|
12
|
+
- `euron login`, `euron --version`, `euron usage`, `euron doctor`, `euron models ...` and `euron config ...` typed at the
|
|
13
|
+
prompt run the matching /command instead of being sent to the model, and `pip install -U euron-code` shows your
|
|
14
|
+
version (Euron Code updates itself when it starts).
|
|
15
|
+
- Asking in words ("don't ask me for permission") shows how to turn the questions off, and the request still runs.
|
|
16
|
+
- When your own model's provider rejects the key, the message also says `/model euron` takes you back to the Euron
|
|
17
|
+
model.
|
|
18
|
+
|
|
19
|
+
## 1.8.7 (2026-11-19)
|
|
20
|
+
|
|
21
|
+
- **A laptop that slept with a request open no longer ends the turn.** After waking, the first network error used
|
|
22
|
+
to stop the turn with "The Euron model has not answered for 27m 11s (1 tries)", because the sleep counted as
|
|
23
|
+
waiting. A request that was open for 5 minutes or more now restarts the retry clock, the line says "This computer
|
|
24
|
+
was asleep or offline for a while; reconnecting." and Euron Code reconnects and continues the turn.
|
|
25
|
+
- **"Busy" waits name the right cause.** When your account already has a request running (another Euron Code window,
|
|
26
|
+
or a sub-agent), the wait line says so instead of "your previous request is still finishing".
|
|
27
|
+
|
|
3
28
|
## 1.8.6 (2026-11-17)
|
|
4
29
|
|
|
5
30
|
- **`--dangerously-skip-permissions` stays on for the whole session, sub-agents included.** Shift+Tab, `/plan` off
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: euron-code
|
|
3
|
-
Version: 1.8.
|
|
3
|
+
Version: 1.8.8
|
|
4
4
|
Summary: Euron Code: an agentic coding assistant in your terminal for Euron Plus and Super 30 students.
|
|
5
5
|
Project-URL: Homepage, https://euron.one/code-agent
|
|
6
6
|
Author-email: Euron <contact@euron.one>
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "euron-code"
|
|
7
|
-
version = "1.8.
|
|
7
|
+
version = "1.8.8"
|
|
8
8
|
description = "Euron Code: an agentic coding assistant in your terminal for Euron Plus and Super 30 students."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -45,6 +45,11 @@ QUEUE_CODES = {"user_queue_full", "queue_timeout", "queue_full", "no_capacity"}
|
|
|
45
45
|
#: (ticket: ~14 minutes of "waiting for the model"; each queued try also waits up to 90 s at the gateway, so the
|
|
46
46
|
#: queue back-off alone could run ~45 minutes, not the "about 10" it promised)
|
|
47
47
|
RETRY_WALL_S = 600.0
|
|
48
|
+
#: 1.8.7: one request that stayed open this long ended because the computer slept (or the network was off), not
|
|
49
|
+
#: because the model did not answer: the gateway cuts a silent upstream at 120 s and a queue wait at 90 s. Prod
|
|
50
|
+
#: 2026-11-18: "The Euron model has not answered for 27m 11s (1 tries)" right after a laptop woke up (the same
|
|
51
|
+
#: second the DNS lookup failed), and the turn stopped. Such a call restarts the wall clock and reconnects.
|
|
52
|
+
SUSPENDED_CALL_S = 300.0
|
|
48
53
|
#: a visible line while one request has waited this long for its first token (seconds)
|
|
49
54
|
STILL_WAITING_AT = (120.0, 300.0)
|
|
50
55
|
SUBAGENT_RESUMES = 2 # a sub-agent stopped by a busy server or a dropped connection continues this many times
|
|
@@ -1426,9 +1431,18 @@ class Agent:
|
|
|
1426
1431
|
who = self.model_label
|
|
1427
1432
|
from euron_code import llm as _llm
|
|
1428
1433
|
t0 = time.monotonic()
|
|
1434
|
+
call_t0 = t0
|
|
1429
1435
|
tries = 0
|
|
1430
1436
|
|
|
1431
|
-
def over_wall() -> bool:
|
|
1437
|
+
def over_wall(offline: bool = False) -> bool:
|
|
1438
|
+
nonlocal t0, slept
|
|
1439
|
+
if not slept and time.monotonic() - call_t0 >= SUSPENDED_CALL_S:
|
|
1440
|
+
# this one call was open for minutes (a long stream, or the computer slept or went offline):
|
|
1441
|
+
# the time went to that call, not to retries; start counting again
|
|
1442
|
+
slept = True
|
|
1443
|
+
t0 = time.monotonic()
|
|
1444
|
+
if offline:
|
|
1445
|
+
self.ui.dim("This computer was asleep or offline for a while; reconnecting.")
|
|
1432
1446
|
return time.monotonic() - t0 >= RETRY_WALL_S
|
|
1433
1447
|
|
|
1434
1448
|
def gave_up(e: EuronError) -> EuronError:
|
|
@@ -1436,9 +1450,11 @@ class Agent:
|
|
|
1436
1450
|
f"The {who} has not answered for {fmt_elapsed(time.monotonic() - t0)} ({tries} tries). Your message "
|
|
1437
1451
|
"is kept: send /retry to try again" + (", or switch model with /model." if self.uses_euron else "."),
|
|
1438
1452
|
status=e.status, code=e.code)
|
|
1453
|
+
slept = False
|
|
1439
1454
|
while True:
|
|
1440
1455
|
tries += 1
|
|
1441
1456
|
self._retry_info = (tries, t0)
|
|
1457
|
+
call_t0 = time.monotonic()
|
|
1442
1458
|
try:
|
|
1443
1459
|
return call()
|
|
1444
1460
|
except _llm.ProviderError:
|
|
@@ -1491,7 +1507,7 @@ class Agent:
|
|
|
1491
1507
|
if e.retry_after is not None:
|
|
1492
1508
|
wait = max(wait, min(float(e.retry_after), 60.0))
|
|
1493
1509
|
queued += 1
|
|
1494
|
-
why = {"user_queue_full": "
|
|
1510
|
+
why = {"user_queue_full": "another request of yours is still running, in another window or a sub-agent",
|
|
1495
1511
|
"queue_timeout": "the queue is long", "queue_full": "the queue is full",
|
|
1496
1512
|
"no_capacity": "all servers are in use"}[str(e.code)]
|
|
1497
1513
|
self._wait(wait, f"The {who} is busy ({why}); waiting for a turn." if self.uses_euron
|
|
@@ -1513,7 +1529,7 @@ class Agent:
|
|
|
1513
1529
|
wait = max(wait, min(float(e.retry_after), 60.0))
|
|
1514
1530
|
busy += 1
|
|
1515
1531
|
why = {"no_capacity": "all servers are in use", "queue_timeout": "the queue is long",
|
|
1516
|
-
"user_queue_full": "
|
|
1532
|
+
"user_queue_full": "another request of yours is still running, in another window or a sub-agent",
|
|
1517
1533
|
"queue_full": "the queue is full"}.get(str(e.code or ""), "the servers are busy")
|
|
1518
1534
|
label = f"The {who} is busy ({why})" if self.uses_euron else f"{who} is busy or unreachable"
|
|
1519
1535
|
self._wait(wait, f"{label}; waiting and trying again (try {busy} of {len(BUSY_BACKOFF)}).")
|
|
@@ -1535,7 +1551,7 @@ class Agent:
|
|
|
1535
1551
|
except NetworkError as e:
|
|
1536
1552
|
if net >= len(NETWORK_BACKOFF):
|
|
1537
1553
|
raise
|
|
1538
|
-
if over_wall():
|
|
1554
|
+
if over_wall(offline=True):
|
|
1539
1555
|
raise gave_up(e) from None
|
|
1540
1556
|
wait = NETWORK_BACKOFF[net]
|
|
1541
1557
|
net += 1
|
|
@@ -89,7 +89,8 @@ def _provider_error(label: str, status: int, body: Any, retry_after: Optional[fl
|
|
|
89
89
|
return e
|
|
90
90
|
if status in (401, 403) or "invalid_api_key" in low or "authentication" in low:
|
|
91
91
|
e = ProviderError(f"{label} rejected the API key (HTTP {status}): {msg}. Set the key again with /model add"
|
|
92
|
-
+ (f" or {key_hint}" if key_hint else "") + "
|
|
92
|
+
+ (f" or {key_hint}" if key_hint else "") + ", or `/model euron` to go back to the Euron model "
|
|
93
|
+
"(included with your plan).", **kw)
|
|
93
94
|
e.code = "provider_auth"
|
|
94
95
|
return e
|
|
95
96
|
if status == 429 and not re.search(r"\b(credit|quota|balance)\b", msg, re.I):
|
|
@@ -4,6 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
6
|
import queue
|
|
7
|
+
import re
|
|
7
8
|
import shutil
|
|
8
9
|
import subprocess
|
|
9
10
|
import sys
|
|
@@ -103,6 +104,95 @@ SHORTCUTS = [
|
|
|
103
104
|
]
|
|
104
105
|
|
|
105
106
|
|
|
107
|
+
#: 1.8.8. Prod 6-20 Nov: 21+ people typed a terminal command into the Euron Code prompt (mostly
|
|
108
|
+
#: "euron --dangerously-skip-permissions", also "euron login", "euron --version", "pip install -U euron-code"). It went
|
|
109
|
+
#: to the model as a request, so bypass never turned on and the model guessed at what to do (one ran a 46-step job).
|
|
110
|
+
#: These are handled here instead, without a model call.
|
|
111
|
+
_CLI_PREFIX = re.compile(r"^\s*(?:(?:euron(?:-code)?|euron_code)(?:\.exe)?|(?:py|python[0-9.]*)(?:\s+-3(?:\.\d+)?)?\s+-m\s+euron_code)"
|
|
112
|
+
r"(?=\s|$)\s*(?P<rest>.*)$", re.I | re.S)
|
|
113
|
+
_PIP_SELF = re.compile(r"^\s*(?:(?:py|python[0-9.]*)(?:\s+-3(?:\.\d+)?)?\s+-m\s+)?pip3?\s+install\b[^\n]*\beuron[-_]code\b", re.I)
|
|
114
|
+
_BYPASS_FLAGS = {"--dangerously-skip-permissions", "--yolo", "--bypass", "--dangerously-skip-permission",
|
|
115
|
+
"--dangerously-skip-permissons", "--skip-permissions"}
|
|
116
|
+
_CLI_SUBCOMMANDS = {"login": "/login", "logout": "/logout", "whoami": "/whoami", "usage": "/usage", "users": "/usage",
|
|
117
|
+
"doctor": "/doctor", "version": "/version", "init": "/init", "config": "/config",
|
|
118
|
+
"models": "/model", "update": "/version", "upgrade": "/version"}
|
|
119
|
+
_KNOWN_FLAGS = _BYPASS_FLAGS | {"--permission-mode", "--no-budget", "-c", "--continue", "-v", "--version",
|
|
120
|
+
"--mode", "--model", "--no-reuse", "-y", "--yes", "--verbose", "-r", "--resume"}
|
|
121
|
+
_ASK_NO_PERMISSION = re.compile(
|
|
122
|
+
r"(\b(don'?t|do not|dont|stop|never|without)\b[^.\n]{0,25}\b(ask|asking|take)\b[^.\n]{0,20}\bpermission"
|
|
123
|
+
r"|\bpermission\b[^.\n]{0,25}\b(lene ki (jarurat|jrurat|zarurat)|mat (lo|maango|mango)|nahi chahiye)"
|
|
124
|
+
r"|allow all commands to run without asking)", re.I)
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def parse_typed_cli(text: str) -> Optional[Dict[str, Any]]:
|
|
128
|
+
"""A terminal command typed into the prompt: {"slash": [...], "bypass", "permission_mode", "no_budget",
|
|
129
|
+
"cont", "ignored": [...], "rest": str, "bare": bool, "pip": bool}, or None when the text is a normal request."""
|
|
130
|
+
t = (text or "").strip()
|
|
131
|
+
if not t or "\n" in t:
|
|
132
|
+
return None
|
|
133
|
+
if _PIP_SELF.match(t):
|
|
134
|
+
return {"slash": ["/version"], "pip": True, "rest": "", "ignored": []}
|
|
135
|
+
m = _CLI_PREFIX.match(t)
|
|
136
|
+
if m:
|
|
137
|
+
rest, bare = m.group("rest").strip(), False
|
|
138
|
+
elif t.split()[0].lower() in _KNOWN_FLAGS and t.startswith("--"):
|
|
139
|
+
rest, bare = t, True
|
|
140
|
+
else:
|
|
141
|
+
return None
|
|
142
|
+
out: Dict[str, Any] = {"slash": [], "bypass": False, "permission_mode": None, "no_budget": False, "cont": False,
|
|
143
|
+
"ignored": [], "rest": "", "bare": bare, "pip": False}
|
|
144
|
+
words = rest.split()
|
|
145
|
+
if not words:
|
|
146
|
+
out["just_euron"] = True
|
|
147
|
+
return out
|
|
148
|
+
first = words[0].lower()
|
|
149
|
+
if first in _CLI_SUBCOMMANDS:
|
|
150
|
+
cmd = _CLI_SUBCOMMANDS[first]
|
|
151
|
+
args = words[1:]
|
|
152
|
+
if first == "models" and args:
|
|
153
|
+
action = args[0].lower()
|
|
154
|
+
if action == "add":
|
|
155
|
+
cmd = "/model add" + ("" if len(args) < 2 else " " + args[1])
|
|
156
|
+
elif action in ("remove", "rm"):
|
|
157
|
+
cmd = "/model remove" + ("" if len(args) < 2 else " " + args[1])
|
|
158
|
+
elif action == "use" and len(args) > 1:
|
|
159
|
+
cmd = "/model " + args[1]
|
|
160
|
+
elif first == "config" and args:
|
|
161
|
+
cmd = "/config " + " ".join(args)
|
|
162
|
+
out["slash"].append(cmd)
|
|
163
|
+
return out
|
|
164
|
+
if not first.startswith("-"):
|
|
165
|
+
return None # "euron please fix the login page": a request that starts with the product's name
|
|
166
|
+
i = 0
|
|
167
|
+
while i < len(words) and words[i].startswith("-"):
|
|
168
|
+
w = words[i]
|
|
169
|
+
flag, _, val = w.partition("=")
|
|
170
|
+
low = flag.lower()
|
|
171
|
+
nxt = words[i + 1] if i + 1 < len(words) else ""
|
|
172
|
+
if low in _BYPASS_FLAGS:
|
|
173
|
+
out["bypass"] = True
|
|
174
|
+
elif low == "--permission-mode":
|
|
175
|
+
if not val and nxt and not nxt.startswith("-"):
|
|
176
|
+
val, i = nxt, i + 1
|
|
177
|
+
out["permission_mode"] = val or None
|
|
178
|
+
elif low == "--no-budget":
|
|
179
|
+
out["no_budget"] = True
|
|
180
|
+
elif low in ("-c", "--continue"):
|
|
181
|
+
out["cont"] = True
|
|
182
|
+
elif low in ("-v", "--version"):
|
|
183
|
+
out["slash"].append("/version")
|
|
184
|
+
elif low in ("--mode", "--model"):
|
|
185
|
+
if not val and nxt and not nxt.startswith("-"):
|
|
186
|
+
val, i = nxt, i + 1
|
|
187
|
+
if val:
|
|
188
|
+
out["slash"].append(("/mode " if low == "--mode" else "/model ") + val)
|
|
189
|
+
else:
|
|
190
|
+
out["ignored"].append(flag)
|
|
191
|
+
i += 1
|
|
192
|
+
out["rest"] = " ".join(words[i:]).strip().strip("\"'").strip()
|
|
193
|
+
return out
|
|
194
|
+
|
|
195
|
+
|
|
106
196
|
def path_candidates(root: Path, partial: str, limit: int = 60) -> List[str]:
|
|
107
197
|
"""Completions for `@partial`, relative to the project root (dirs end with /)."""
|
|
108
198
|
partial = partial.replace("\\", "/")
|
|
@@ -648,11 +738,70 @@ class Repl:
|
|
|
648
738
|
if text.startswith("#") and len(text) > 1:
|
|
649
739
|
self.add_memory(text[1:].strip())
|
|
650
740
|
return None
|
|
741
|
+
typed = parse_typed_cli(text)
|
|
742
|
+
if typed is not None:
|
|
743
|
+
rest = self._typed_cli(typed)
|
|
744
|
+
if rest is None:
|
|
745
|
+
return None
|
|
746
|
+
if isinstance(rest, int):
|
|
747
|
+
return rest
|
|
748
|
+
text = rest
|
|
749
|
+
elif _ASK_NO_PERMISSION.search(text) and self.agent.permissions.mode not in ("yolo", "plan"):
|
|
750
|
+
self.ui.dim("Tip: to stop the questions for this session, type --dangerously-skip-permissions here "
|
|
751
|
+
"(edits and commands then run without asking), or press Shift+Tab to auto-accept edits.")
|
|
651
752
|
return self.turn(text)
|
|
652
753
|
except KeyboardInterrupt:
|
|
653
754
|
self.ui.warn("Interrupted.")
|
|
654
755
|
return None
|
|
655
756
|
|
|
757
|
+
def _enable_bypass(self) -> None:
|
|
758
|
+
"""--dangerously-skip-permissions typed at the prompt: the same as starting with it (the user typed it)."""
|
|
759
|
+
p = self.agent.permissions
|
|
760
|
+
p.bypass_session = True
|
|
761
|
+
p._before_plan = None
|
|
762
|
+
p.mode = "yolo"
|
|
763
|
+
self.bypass_allowed = True
|
|
764
|
+
self._status_cache = (0.0, "")
|
|
765
|
+
when = " (from the next tool call)" if self._running else ""
|
|
766
|
+
self.ui.error("Bypass permissions mode is on for this session" + when + ": edits and commands run WITHOUT "
|
|
767
|
+
"asking (sub-agents too). Paths outside the project still ask. Turn it off with "
|
|
768
|
+
"/permissions mode default.")
|
|
769
|
+
|
|
770
|
+
def _typed_cli(self, typed: Dict[str, Any]):
|
|
771
|
+
"""Run a terminal command typed into the prompt. Returns the text still to send to the model, None when
|
|
772
|
+
nothing is left to send, or an exit code."""
|
|
773
|
+
if typed.get("pip"):
|
|
774
|
+
self.ui.info("Euron Code updates itself each time it starts, so there is no need to run pip here. "
|
|
775
|
+
"Your version:")
|
|
776
|
+
if typed.get("just_euron"):
|
|
777
|
+
self.ui.info("You are already in Euron Code: type what you want done. (Terminal commands such as "
|
|
778
|
+
"`euron login` work here too.)")
|
|
779
|
+
return None
|
|
780
|
+
if typed.get("bypass"):
|
|
781
|
+
self._enable_bypass()
|
|
782
|
+
mode = typed.get("permission_mode")
|
|
783
|
+
if mode:
|
|
784
|
+
from euron_code.permissions import MODE_ALIASES
|
|
785
|
+
if MODE_ALIASES.get(mode, mode) == "yolo":
|
|
786
|
+
self._enable_bypass()
|
|
787
|
+
else:
|
|
788
|
+
self._permissions("mode " + mode)
|
|
789
|
+
if typed.get("no_budget"):
|
|
790
|
+
self.agent.settings["taskTimeBudgetMinutes"] = 0
|
|
791
|
+
self.agent.settings["taskStepBudget"] = 0
|
|
792
|
+
self.ui.info("No time / step budget for this session (--no-budget).")
|
|
793
|
+
for cmd in typed.get("slash") or []:
|
|
794
|
+
res = self.execute(cmd)
|
|
795
|
+
if isinstance(res, int):
|
|
796
|
+
return res
|
|
797
|
+
if typed.get("ignored"):
|
|
798
|
+
self.ui.dim(f"{', '.join(typed['ignored'])}: only works when starting Euron Code from a terminal "
|
|
799
|
+
"(`euron <option>`), so it was ignored here.")
|
|
800
|
+
rest = str(typed.get("rest") or "").strip()
|
|
801
|
+
if typed.get("cont") and not rest:
|
|
802
|
+
rest = "continue"
|
|
803
|
+
return rest or None
|
|
804
|
+
|
|
656
805
|
# ---------------------------------------------------------- live mode
|
|
657
806
|
def _run_live(self, initial: Optional[str]) -> int:
|
|
658
807
|
from prompt_toolkit.patch_stdout import patch_stdout
|
|
@@ -744,6 +893,12 @@ class Repl:
|
|
|
744
893
|
text = text.strip()
|
|
745
894
|
if not text:
|
|
746
895
|
return
|
|
896
|
+
if self.busy:
|
|
897
|
+
typed = parse_typed_cli(text)
|
|
898
|
+
if typed and (typed.get("bypass") or typed.get("permission_mode")) and not typed.get("slash") \
|
|
899
|
+
and not typed.get("rest") and not typed.get("cont"):
|
|
900
|
+
self._typed_cli(typed) # applies from the running task's next tool call, no need to wait for it
|
|
901
|
+
return
|
|
747
902
|
if self.busy and text.startswith("/"):
|
|
748
903
|
cmd = text.split(maxsplit=1)[0].lower()
|
|
749
904
|
if cmd in MIDRUN_COMMANDS:
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
"""Best-effort ignore rules for the Python fallbacks of glob/grep/list_dir."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import fnmatch
|
|
6
|
-
import os
|
|
7
|
-
from pathlib import Path
|
|
8
|
-
from typing import Iterator, List, Tuple
|
|
9
|
-
|
|
10
|
-
ALWAYS_SKIP_DIRS = {
|
|
11
|
-
".git", ".hg", ".svn", "node_modules", "__pycache__", ".venv", "venv", "env", ".tox",
|
|
12
|
-
".mypy_cache", ".pytest_cache", ".ruff_cache", ".next", ".nuxt", "dist", "build",
|
|
13
|
-
".idea", ".gradle", "target", ".cache", "coverage", ".turbo", ".parcel-cache",
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class GitIgnore:
|
|
18
|
-
"""A small subset of .gitignore: root .gitignore, simple globs, dir patterns, negation ignored."""
|
|
19
|
-
|
|
20
|
-
def __init__(self, root: Path):
|
|
21
|
-
self.root = root
|
|
22
|
-
self.patterns: List[Tuple[str, bool]] = [] # (pattern, dir_only)
|
|
23
|
-
try:
|
|
24
|
-
with open(root / ".gitignore", "r", encoding="utf-8", errors="replace") as f:
|
|
25
|
-
for line in f:
|
|
26
|
-
line = line.strip()
|
|
27
|
-
if not line or line.startswith("#") or line.startswith("!"):
|
|
28
|
-
continue
|
|
29
|
-
dir_only = line.endswith("/")
|
|
30
|
-
self.patterns.append((line.strip("/"), dir_only))
|
|
31
|
-
except OSError:
|
|
32
|
-
pass
|
|
33
|
-
|
|
34
|
-
def ignored(self, rel_posix: str, is_dir: bool) -> bool:
|
|
35
|
-
name = rel_posix.rsplit("/", 1)[-1]
|
|
36
|
-
for pat, dir_only in self.patterns:
|
|
37
|
-
if dir_only and not is_dir:
|
|
38
|
-
continue
|
|
39
|
-
if "/" in pat:
|
|
40
|
-
if fnmatch.fnmatch(rel_posix, pat.lstrip("/")) or fnmatch.fnmatch(rel_posix, pat.lstrip("/") + "/*"):
|
|
41
|
-
return True
|
|
42
|
-
elif fnmatch.fnmatch(name, pat):
|
|
43
|
-
return True
|
|
44
|
-
return False
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
def walk_files(base: Path, root: Path) -> Iterator[Path]:
|
|
48
|
-
gi = GitIgnore(root)
|
|
49
|
-
for dirpath, dirnames, filenames in os.walk(base):
|
|
50
|
-
dp = Path(dirpath)
|
|
51
|
-
keep = []
|
|
52
|
-
for d in dirnames:
|
|
53
|
-
if d in ALWAYS_SKIP_DIRS:
|
|
54
|
-
continue
|
|
55
|
-
try:
|
|
56
|
-
rel = (dp / d).relative_to(root).as_posix()
|
|
57
|
-
except ValueError:
|
|
58
|
-
rel = d
|
|
59
|
-
if gi.ignored(rel, True):
|
|
60
|
-
continue
|
|
61
|
-
keep.append(d)
|
|
62
|
-
dirnames[:] = sorted(keep)
|
|
63
|
-
for fn in sorted(filenames):
|
|
64
|
-
p = dp / fn
|
|
65
|
-
try:
|
|
66
|
-
rel = p.relative_to(root).as_posix()
|
|
67
|
-
except ValueError:
|
|
68
|
-
rel = fn
|
|
69
|
-
if gi.ignored(rel, False):
|
|
70
|
-
continue
|
|
71
|
-
yield p
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
def is_binary_bytes(data: bytes) -> bool:
|
|
75
|
-
return b"\x00" in data[:8192]
|
|
1
|
+
"""Best-effort ignore rules for the Python fallbacks of glob/grep/list_dir."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import fnmatch
|
|
6
|
+
import os
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from typing import Iterator, List, Tuple
|
|
9
|
+
|
|
10
|
+
ALWAYS_SKIP_DIRS = {
|
|
11
|
+
".git", ".hg", ".svn", "node_modules", "__pycache__", ".venv", "venv", "env", ".tox",
|
|
12
|
+
".mypy_cache", ".pytest_cache", ".ruff_cache", ".next", ".nuxt", "dist", "build",
|
|
13
|
+
".idea", ".gradle", "target", ".cache", "coverage", ".turbo", ".parcel-cache",
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class GitIgnore:
|
|
18
|
+
"""A small subset of .gitignore: root .gitignore, simple globs, dir patterns, negation ignored."""
|
|
19
|
+
|
|
20
|
+
def __init__(self, root: Path):
|
|
21
|
+
self.root = root
|
|
22
|
+
self.patterns: List[Tuple[str, bool]] = [] # (pattern, dir_only)
|
|
23
|
+
try:
|
|
24
|
+
with open(root / ".gitignore", "r", encoding="utf-8", errors="replace") as f:
|
|
25
|
+
for line in f:
|
|
26
|
+
line = line.strip()
|
|
27
|
+
if not line or line.startswith("#") or line.startswith("!"):
|
|
28
|
+
continue
|
|
29
|
+
dir_only = line.endswith("/")
|
|
30
|
+
self.patterns.append((line.strip("/"), dir_only))
|
|
31
|
+
except OSError:
|
|
32
|
+
pass
|
|
33
|
+
|
|
34
|
+
def ignored(self, rel_posix: str, is_dir: bool) -> bool:
|
|
35
|
+
name = rel_posix.rsplit("/", 1)[-1]
|
|
36
|
+
for pat, dir_only in self.patterns:
|
|
37
|
+
if dir_only and not is_dir:
|
|
38
|
+
continue
|
|
39
|
+
if "/" in pat:
|
|
40
|
+
if fnmatch.fnmatch(rel_posix, pat.lstrip("/")) or fnmatch.fnmatch(rel_posix, pat.lstrip("/") + "/*"):
|
|
41
|
+
return True
|
|
42
|
+
elif fnmatch.fnmatch(name, pat):
|
|
43
|
+
return True
|
|
44
|
+
return False
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def walk_files(base: Path, root: Path) -> Iterator[Path]:
|
|
48
|
+
gi = GitIgnore(root)
|
|
49
|
+
for dirpath, dirnames, filenames in os.walk(base):
|
|
50
|
+
dp = Path(dirpath)
|
|
51
|
+
keep = []
|
|
52
|
+
for d in dirnames:
|
|
53
|
+
if d in ALWAYS_SKIP_DIRS:
|
|
54
|
+
continue
|
|
55
|
+
try:
|
|
56
|
+
rel = (dp / d).relative_to(root).as_posix()
|
|
57
|
+
except ValueError:
|
|
58
|
+
rel = d
|
|
59
|
+
if gi.ignored(rel, True):
|
|
60
|
+
continue
|
|
61
|
+
keep.append(d)
|
|
62
|
+
dirnames[:] = sorted(keep)
|
|
63
|
+
for fn in sorted(filenames):
|
|
64
|
+
p = dp / fn
|
|
65
|
+
try:
|
|
66
|
+
rel = p.relative_to(root).as_posix()
|
|
67
|
+
except ValueError:
|
|
68
|
+
rel = fn
|
|
69
|
+
if gi.ignored(rel, False):
|
|
70
|
+
continue
|
|
71
|
+
yield p
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def is_binary_bytes(data: bytes) -> bool:
|
|
75
|
+
return b"\x00" in data[:8192]
|