euron-code 1.9.1__tar.gz → 1.9.3__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.9.1 → euron_code-1.9.3}/CHANGELOG.md +14 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/PKG-INFO +1 -1
- {euron_code-1.9.1 → euron_code-1.9.3}/pyproject.toml +1 -1
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/__init__.py +1 -1
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/agent.py +27 -2
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tools/template.py +33 -4
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v190_refund_fixes.py +10 -1
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v191_page_assets.py +23 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/.gitignore +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/LICENSE +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/README.md +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/__main__.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/activity.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/api.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/attachments.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/auth.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/autoupdate.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/builtin_skills/build-from-reference/SKILL.md +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/builtin_skills/explain-codebase/SKILL.md +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/builtin_skills/review/SKILL.md +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/builtin_skills/test-writer/SKILL.md +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/cache.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/checkpoints.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/cli.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/codeindex.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/config.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/context.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/contextforge/LICENSE +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/contextforge/__init__.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/contextforge/text.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/contextforge/toolout.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/credentials.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/ctxstats.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/doctor.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/documents.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/dotnet.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/error_hints.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/errorlog.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/failures.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/friendly.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/frontmatter.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/hooks.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/keys.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/knowledge.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/licensing.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/llm/__init__.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/llm/anthropic.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/llm/base.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/llm/openai_compat.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/llm/setup.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/logo.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/markdown_view.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/memory.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/migration.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/modes.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/mvc5.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/osscache.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/ossgithub.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/pasteinput.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/pathfix.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/permissions.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/progress.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/project_setup.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/prompts.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/repl.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/repomap.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/rules.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/security_scan.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/sessions.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/skills.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/taskstate.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/textsafe.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tls.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tools/__init__.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tools/background.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tools/base.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tools/db.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tools/document.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tools/erie.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tools/fs.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tools/ignore.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tools/normalize.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tools/oss.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tools/pagecheck.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tools/pathfind.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tools/port.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tools/reuse.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tools/search.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tools/shell.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tools/skill.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tools/symbols.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tools/task.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tools/todo.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tools/web.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/tools/websearch.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/transcript.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/trust.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/ui.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/update_check.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/usage_view.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/version_info.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/webforms.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/conftest.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/fake_providers.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/helpers.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/measure_floor.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/mock_gateway.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/serve_helper.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/sim_long_session.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_agent_mock.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_api_shell.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_bench.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_bench_harness.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_cli_e2e.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_context_memory_sessions.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_dashboard_fixes.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_dashboard_fixes_102.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_db.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_erie.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_knowledge_security.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_markdown_view.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_oss_local.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_permissions.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_powershell_exit_codes.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_qa_attach_secrets.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_qa_long_task.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_qa_print_output.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_qa_reuse_unrelated.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_qa_yolo_outside.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_render_ghost.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_repl.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_reuse_honesty.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_search.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_textsafe.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_tools_fs.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_transcript_ui.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_update_check.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v111_user_reports.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v113_fix_path.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v11_byo.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v11_speed.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v11_tool_fixes.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v130_cut_writes.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v130_reliability.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v140_parity.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v152_migration.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v153_user_errors.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v155_user_errors.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v156_autoupdate.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v156_paste_and_edits.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v157_zero_errors.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v15_hosted_models.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v15_reuse_off_subagent_hooks.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v160_stop_scope_atomic.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v161_residual_errors.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v170_v2.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v180_rescue_research_permissions.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v181_silent_failures_verified.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v182_zero_errors.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v184_selfupdate_pep668.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v186_bypass_and_waits.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v187_sleep_wake.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v188_typed_cli_commands.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v189_edit_partial.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v2_rules_skills_hooks.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v2_tokens_shortcuts.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v2_usage_headers.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v31_security.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v3_accounts_value_setup.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v3_activity.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v3_attachments.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v3_context.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v3_live_repl.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v3_single_login.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v4.py +0 -0
- {euron_code-1.9.1 → euron_code-1.9.3}/tests/test_v5.py +0 -0
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.3 (2026-11-22)
|
|
4
|
+
|
|
5
|
+
- An answer cut off after its first words ("I see", "The") is asked again like an empty one, instead of ending the
|
|
6
|
+
task on it.
|
|
7
|
+
- After `fix_page_assets` has fixed a page, a rewrite of that whole page is refused once (it replaced the user's
|
|
8
|
+
forms and ids); Euron Code edits only what `check_app` still reports.
|
|
9
|
+
|
|
10
|
+
## 1.9.2 (2026-11-22)
|
|
11
|
+
|
|
12
|
+
- When today's token allowance is used up, the task status now says "paused: today's token allowance is used (it
|
|
13
|
+
refills at midnight IST)" instead of "stopped at its budget", which read like the plan or the task had run out.
|
|
14
|
+
- `fix_page_assets` works on Python 3.9 (1.9.1 stopped with "write_text() got an unexpected keyword argument
|
|
15
|
+
'newline'"), keeps each page's own line endings, and never rewrites a file over 5 MB.
|
|
16
|
+
|
|
3
17
|
## 1.9.1 (2026-11-21)
|
|
4
18
|
|
|
5
19
|
- **A bought HTML / admin template now works in your app in one step.** The new `fix_page_assets` tool finds the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: euron-code
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.3
|
|
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.9.
|
|
7
|
+
version = "1.9.3"
|
|
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"
|
|
@@ -207,7 +207,12 @@ def blank_answer(text: str) -> bool:
|
|
|
207
207
|
return False
|
|
208
208
|
# one or two words with no sentence end ("I", "The", "Let me"): the model stopped right after it began
|
|
209
209
|
words = re.findall(r"[\w']+", t.lower())
|
|
210
|
-
|
|
210
|
+
if len(words) <= 3 and all(w in _STUB_WORDS for w in words):
|
|
211
|
+
return True
|
|
212
|
+
# "I see", "Now let", "The CSS": a few English words with no sentence end = the answer was cut at its start
|
|
213
|
+
# (non-English short answers such as a Hindi word are real answers)
|
|
214
|
+
return (bool(words) and words[0] in _STUB_WORDS and len(words) <= 3 and len(t) <= 20 and t.isascii()
|
|
215
|
+
and not t.endswith((".", "!", "?", ")", "`", "\"", "'", ":", "*")))
|
|
211
216
|
|
|
212
217
|
|
|
213
218
|
_STUB_WORDS = {"i", "i'm", "i'll", "the", "a", "an", "let", "let's", "me", "now", "so", "to", "it", "this", "here",
|
|
@@ -1128,7 +1133,11 @@ class Agent:
|
|
|
1128
1133
|
elif self._real_edits():
|
|
1129
1134
|
how = " (no check ran after the last change)"
|
|
1130
1135
|
extra = " Progress is saved: say \"continue\" to resume." if st in taskstate.RESUMABLE else ""
|
|
1131
|
-
|
|
1136
|
+
label = taskstate.LABELS[st]
|
|
1137
|
+
if decided.get("limitHit") == "allowance":
|
|
1138
|
+
# 1.9.2: the daily allowance is not the task's budget, and nothing about the plan expires
|
|
1139
|
+
label = "paused: today's token allowance is used (it refills at midnight IST)"
|
|
1140
|
+
self.ui.dim(f"Status: {label}{how}.{extra}")
|
|
1132
1141
|
if self.uses_euron and taskstate.outcome_enabled(self.settings) and self.client.task_id:
|
|
1133
1142
|
steps, minutes = self.budget()
|
|
1134
1143
|
used_steps, used_s = self._budget_used
|
|
@@ -3700,6 +3709,22 @@ class Agent:
|
|
|
3700
3709
|
except OSError:
|
|
3701
3710
|
pass
|
|
3702
3711
|
stash = self._migration_stash(req) if name != "port_page" else []
|
|
3712
|
+
fixed = getattr(self.ctx, "fixed_pages", None)
|
|
3713
|
+
if name == "write_file" and fixed and not args.get("append"):
|
|
3714
|
+
warned = getattr(self.ctx, "_fixed_warned", None)
|
|
3715
|
+
if warned is None:
|
|
3716
|
+
warned = self.ctx._fixed_warned = set()
|
|
3717
|
+
hit = [p for p in req.paths if str(Path(p).resolve()) in fixed and Path(p).is_file()
|
|
3718
|
+
and str(Path(p).resolve()) not in warned]
|
|
3719
|
+
if hit:
|
|
3720
|
+
# replay 22 Nov: after fix_page_assets the model rewrote the working login and dashboard
|
|
3721
|
+
# pages from memory and dropped their form and ids
|
|
3722
|
+
warned.update(str(Path(p).resolve()) for p in hit)
|
|
3723
|
+
msg = (f"Not applied: fix_page_assets already fixed {self.ctx.rel(hit[0])}; rewriting the "
|
|
3724
|
+
"whole page replaces the user's content (forms, ids, text). Change only what check_app "
|
|
3725
|
+
"still reports, with edit_file. If the user asked for a redesign, send it again.")
|
|
3726
|
+
self.ui.tool_result("not applied: the page was just fixed; edit it instead", is_error=True)
|
|
3727
|
+
return "Error: " + msg, None
|
|
3703
3728
|
if name == "bash":
|
|
3704
3729
|
self._shell_before()
|
|
3705
3730
|
from euron_code.permissions import is_instruction_path
|
|
@@ -82,9 +82,16 @@ def _walk_dirs(root: Path, depth: int = 3):
|
|
|
82
82
|
stack += [(s, n + 1) for s in subs]
|
|
83
83
|
|
|
84
84
|
|
|
85
|
+
def _write(p: Path, text: str) -> None:
|
|
86
|
+
"""Keep the file's own line ends (Path.write_text(newline=) is 3.10+; open() keeps 3.9 working)."""
|
|
87
|
+
with open(p, "w", encoding="utf-8", newline="") as f:
|
|
88
|
+
f.write(text)
|
|
89
|
+
|
|
90
|
+
|
|
85
91
|
def _read(p: Path, limit: int = 400_000) -> str:
|
|
86
92
|
try:
|
|
87
|
-
|
|
93
|
+
with open(p, encoding="utf-8", errors="replace", newline="") as f: # line ends kept as they are
|
|
94
|
+
return f.read(limit)
|
|
88
95
|
except OSError:
|
|
89
96
|
return ""
|
|
90
97
|
|
|
@@ -316,6 +323,11 @@ def _local(ref: str) -> bool:
|
|
|
316
323
|
|
|
317
324
|
def rewrite_page(app: App, page: Path, index: List[str], dry: bool) -> Tuple[int, List[str]]:
|
|
318
325
|
"""(links rewritten, references still missing) for one page."""
|
|
326
|
+
try:
|
|
327
|
+
if page.stat().st_size > 5_000_000:
|
|
328
|
+
return 0, [] # never rewrite (and so cut) a huge generated file
|
|
329
|
+
except OSError:
|
|
330
|
+
return 0, []
|
|
319
331
|
text = _read(page, 5_000_000)
|
|
320
332
|
if not text:
|
|
321
333
|
return 0, []
|
|
@@ -363,7 +375,7 @@ def rewrite_page(app: App, page: Path, index: List[str], dry: bool) -> Tuple[int
|
|
|
363
375
|
m = re.match(r"\s*\{%\s*extends[^%]*%\}\s*\n?", new)
|
|
364
376
|
new = (new[:m.end()] + "{% load static %}\n" + new[m.end():]) if m else "{% load static %}\n" + new
|
|
365
377
|
if new != text and not dry:
|
|
366
|
-
page
|
|
378
|
+
_write(page, new)
|
|
367
379
|
return changed[0], sorted(set(missing))
|
|
368
380
|
|
|
369
381
|
|
|
@@ -382,6 +394,11 @@ def rewrite_css(web: Path, index: List[str], dry: bool) -> Tuple[int, Dict[str,
|
|
|
382
394
|
images/ while the CSS says ../img/): pointed at the one file it means. Returns (fixed, still missing)."""
|
|
383
395
|
fixed, missing = 0, {}
|
|
384
396
|
for css in css_files(web):
|
|
397
|
+
try:
|
|
398
|
+
if css.stat().st_size > 8_000_000:
|
|
399
|
+
continue
|
|
400
|
+
except OSError:
|
|
401
|
+
continue
|
|
385
402
|
text = _read(css, 8_000_000)
|
|
386
403
|
miss: List[str] = []
|
|
387
404
|
|
|
@@ -405,7 +422,7 @@ def rewrite_css(web: Path, index: List[str], dry: bool) -> Tuple[int, Dict[str,
|
|
|
405
422
|
+ u.group(2) + u.group(4)
|
|
406
423
|
new = _URL_RE.sub(one, text)
|
|
407
424
|
if new != text and not dry:
|
|
408
|
-
css
|
|
425
|
+
_write(css, new)
|
|
409
426
|
if miss:
|
|
410
427
|
missing[str(css)] = sorted(set(miss))
|
|
411
428
|
return fixed, missing
|
|
@@ -501,6 +518,16 @@ class FixPageAssets(Tool):
|
|
|
501
518
|
if p.suffix.lower() in ASSET_EXT:
|
|
502
519
|
index.append((Path(d) / p.relative_to(s)).as_posix())
|
|
503
520
|
pages = pages_of(app, tpl)
|
|
521
|
+
if not dry:
|
|
522
|
+
# 1.9.2+ guard: a whole-page rewrite of these pages right after this fix is refused once (agent.py)
|
|
523
|
+
fixed = getattr(ctx, "fixed_pages", None)
|
|
524
|
+
if not isinstance(fixed, set):
|
|
525
|
+
fixed = set()
|
|
526
|
+
try:
|
|
527
|
+
ctx.fixed_pages = fixed
|
|
528
|
+
except Exception:
|
|
529
|
+
pass
|
|
530
|
+
fixed.update(str(Path(p).resolve()) for p in pages)
|
|
504
531
|
total, touched, missing = 0, [], {}
|
|
505
532
|
for page in pages:
|
|
506
533
|
n, miss = rewrite_page(app, page, index, dry)
|
|
@@ -530,6 +557,8 @@ class FixPageAssets(Tool):
|
|
|
530
557
|
"flask": "flask run, then check_app http://127.0.0.1:5000/<page>",
|
|
531
558
|
"express": "npm start, then check_app http://localhost:3000/<page>"}.get(
|
|
532
559
|
app.kind, "check_app with path=<page>.html")
|
|
533
|
-
lines.append(f"Next: run check_app on each page ({hint}) and fix anything it still reports."
|
|
560
|
+
lines.append(f"Next: run check_app on each page ({hint}) and fix anything it still reports. Do not "
|
|
561
|
+
"rewrite or redesign the pages: their content, forms and ids stay as they are; the template's "
|
|
562
|
+
"styles now load.")
|
|
534
563
|
return ToolResult("\n".join(lines), is_error=bool(bad), preview=lines[-2][:160])
|
|
535
564
|
return ToolResult("\n".join(lines), preview="dry run")
|
|
@@ -336,5 +336,14 @@ def test_no_progress_changes_approach_then_asks_the_person(euron_env, project, l
|
|
|
336
336
|
def test_a_stub_answer_is_treated_as_empty():
|
|
337
337
|
from euron_code.agent import blank_answer
|
|
338
338
|
assert blank_answer("") and blank_answer(" I ") and blank_answer(".") and blank_answer("The")
|
|
339
|
-
assert blank_answer("Let me")
|
|
339
|
+
assert blank_answer("Let me") and blank_answer("I see") and not blank_answer("All tests pass.")
|
|
340
|
+
assert not blank_answer("चार 🎯")
|
|
340
341
|
assert not blank_answer("ok") and not blank_answer("4") and not blank_answer("Done.")
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
def test_allowance_stop_never_reads_as_the_task_budget(euron_env, project, logged_in, mock_url):
|
|
345
|
+
ui = RecordingUI()
|
|
346
|
+
a = make_agent(project, mock_url, logged_in, ui)
|
|
347
|
+
a.run_turn("[mock:quota] hello")
|
|
348
|
+
status = [ln for ln in ui.lines if ln.startswith("Status:")]
|
|
349
|
+
assert status and "today's token allowance" in status[-1] and "budget" not in status[-1]
|
|
@@ -162,3 +162,26 @@ def test_check_app_path_serves_from_the_web_root(tmp_path):
|
|
|
162
162
|
(tmp_path / "public" / "admin" / "dashboard.html").write_text('<link rel="stylesheet" href="/assets/css/s.css">')
|
|
163
163
|
res = CheckApp().run({"path": "public/admin/dashboard.html", "browser": False}, ctx(tmp_path))
|
|
164
164
|
assert not res.is_error and "0 broken" in res.content and "/admin/dashboard.html" in res.content
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
def test_line_ends_are_kept(tmp_path):
|
|
168
|
+
_blade_app(tmp_path)
|
|
169
|
+
p = tmp_path / "resources/views/auth/login.blade.php"
|
|
170
|
+
p.write_bytes(b'<link rel="stylesheet" href="assets/css/style.css">\r\n<p>x</p>\r\n')
|
|
171
|
+
assert not FixPageAssets().run({}, ctx(tmp_path)).is_error
|
|
172
|
+
assert p.read_bytes().count(b"\r\n") == 2 and b"asset('assets/css/style.css')" in p.read_bytes()
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
def test_a_fixed_page_is_not_rewritten_whole(euron_env, logged_in, mock_url, tmp_path):
|
|
176
|
+
from test_agent_mock import make_agent
|
|
177
|
+
work = tmp_path / "p"
|
|
178
|
+
shutil.copytree(SET / "laravel-login-no-css" / "repo", work)
|
|
179
|
+
a = make_agent(work, mock_url, logged_in, mode="yolo")
|
|
180
|
+
assert not FixPageAssets().run({}, a.ctx).is_error
|
|
181
|
+
a.ctx.tracker.mark_read((work / "crm admin/public/login.html").resolve(), (1, 10 ** 9))
|
|
182
|
+
tc = {"id": "c1", "function": {"name": "write_file", "arguments": __import__("json").dumps(
|
|
183
|
+
{"path": "crm admin/public/login.html", "content": "<html>new</html>"})}}
|
|
184
|
+
out, _ = a._execute(tc, False)
|
|
185
|
+
assert out.startswith("Error: Not applied: fix_page_assets already fixed")
|
|
186
|
+
out2, _ = a._execute(tc, False) # asked again on purpose: allowed
|
|
187
|
+
assert not out2.startswith("Error: Not applied")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/builtin_skills/build-from-reference/SKILL.md
RENAMED
|
File without changes
|
{euron_code-1.9.1 → euron_code-1.9.3}/src/euron_code/builtin_skills/explain-codebase/SKILL.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|