euron-code 1.5.1__tar.gz → 1.5.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.5.1 → euron_code-1.5.3}/CHANGELOG.md +51 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/PKG-INFO +1 -1
- {euron_code-1.5.1 → euron_code-1.5.3}/pyproject.toml +1 -1
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/__init__.py +1 -1
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/agent.py +140 -2
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/api.py +3 -1
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/cli.py +12 -4
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/config.py +330 -328
- euron_code-1.5.3/src/euron_code/dotnet.py +134 -0
- euron_code-1.5.3/src/euron_code/friendly.py +45 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/knowledge.py +545 -544
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/llm/__init__.py +14 -2
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/llm/base.py +221 -206
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/llm/setup.py +50 -5
- euron_code-1.5.3/src/euron_code/migration.py +474 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/permissions.py +40 -1
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/progress.py +1 -1
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/repl.py +9 -2
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/repomap.py +7 -2
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/security_scan.py +495 -494
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/tools/base.py +1 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/tools/fs.py +30 -1
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/tools/pathfind.py +29 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/tools/search.py +37 -4
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/tools/web.py +19 -1
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/mock_gateway.py +1114 -1114
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_search.py +60 -59
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_v11_byo.py +381 -381
- euron_code-1.5.3/tests/test_v152_migration.py +414 -0
- euron_code-1.5.3/tests/test_v153_user_errors.py +210 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_v5.py +2 -1
- {euron_code-1.5.1 → euron_code-1.5.3}/.gitignore +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/LICENSE +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/README.md +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/__main__.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/activity.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/attachments.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/auth.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/builtin_skills/build-from-reference/SKILL.md +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/builtin_skills/explain-codebase/SKILL.md +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/builtin_skills/review/SKILL.md +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/builtin_skills/test-writer/SKILL.md +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/cache.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/checkpoints.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/context.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/contextforge/LICENSE +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/contextforge/__init__.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/contextforge/text.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/contextforge/toolout.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/credentials.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/doctor.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/documents.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/error_hints.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/errorlog.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/frontmatter.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/hooks.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/keys.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/licensing.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/llm/anthropic.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/llm/openai_compat.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/logo.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/markdown_view.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/memory.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/osscache.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/ossgithub.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/pathfix.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/project_setup.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/prompts.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/rules.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/sessions.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/skills.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/textsafe.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/tools/__init__.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/tools/background.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/tools/db.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/tools/document.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/tools/erie.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/tools/ignore.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/tools/normalize.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/tools/oss.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/tools/reuse.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/tools/shell.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/tools/skill.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/tools/symbols.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/tools/task.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/tools/todo.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/transcript.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/trust.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/ui.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/update_check.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/usage_view.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/src/euron_code/version_info.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/conftest.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/fake_providers.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/helpers.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/measure_floor.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/serve_helper.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/sim_long_session.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_agent_mock.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_api_shell.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_bench.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_bench_harness.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_cli_e2e.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_context_memory_sessions.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_dashboard_fixes.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_dashboard_fixes_102.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_db.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_erie.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_knowledge_security.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_markdown_view.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_oss_local.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_permissions.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_powershell_exit_codes.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_qa_attach_secrets.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_qa_long_task.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_qa_print_output.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_qa_reuse_unrelated.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_qa_yolo_outside.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_repl.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_reuse_honesty.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_textsafe.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_tools_fs.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_transcript_ui.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_update_check.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_v111_user_reports.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_v113_fix_path.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_v11_speed.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_v11_tool_fixes.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_v130_cut_writes.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_v130_reliability.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_v140_parity.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_v15_hosted_models.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_v15_reuse_off_subagent_hooks.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_v2_rules_skills_hooks.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_v2_tokens_shortcuts.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_v2_usage_headers.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_v31_security.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_v3_accounts_value_setup.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_v3_activity.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_v3_attachments.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_v3_context.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_v3_live_repl.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_v3_single_login.py +0 -0
- {euron_code-1.5.1 → euron_code-1.5.3}/tests/test_v4.py +0 -0
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.5.3 (2026-11-11)
|
|
4
|
+
|
|
5
|
+
Fixes for the errors people ran into over the last two weeks.
|
|
6
|
+
|
|
7
|
+
- Your own model: when a provider says your allowance or credit is used up (for example EURI's "daily token
|
|
8
|
+
allowance is used up"), Euron Code now says exactly that, says your key is fine, and offers `/model euron` to
|
|
9
|
+
carry on with the Euron model. It used to say the key was rejected and ask you to set it again.
|
|
10
|
+
- A per-minute rate limit from a provider (Groq and others) is waited out and retried instead of being reported
|
|
11
|
+
as "out of credit".
|
|
12
|
+
- `euron models add` checks what you paste: a provider name, a command, or a short or spaced value is refused
|
|
13
|
+
with a plain explanation instead of being saved as a key that fails on every request.
|
|
14
|
+
- `euron models add` run inside a Euron Code session or a script (where nobody can answer its questions) now says
|
|
15
|
+
so and shows how to set the key with an environment variable. `euron models add custom euri` works.
|
|
16
|
+
- EURI API is in the `euron models add` list, and model names copied with the help text's brackets or quotes
|
|
17
|
+
(`euri:<model-name>`) are read as the name inside them.
|
|
18
|
+
- `/model` lists "Add your own model" as the last choice, so bringing your own key and model is one step away.
|
|
19
|
+
- `/components` works again (it asked the server for a page that does not exist).
|
|
20
|
+
- read_file on a file that does not exist shows what the folder really holds (or that the folder does not exist
|
|
21
|
+
and what the nearest one holds), and after several wrong names in a row tells the model to stop guessing and
|
|
22
|
+
search first. One task in production spent 45 minutes guessing file names.
|
|
23
|
+
- grep accepts patterns written for other tools: `\p{L}` and other Unicode classes are translated, and a pattern
|
|
24
|
+
that cannot be read as a regular expression is searched as plain text instead of failing.
|
|
25
|
+
- web_fetch opens sites that still use an old, short certificate key (the certificate is still checked).
|
|
26
|
+
- Internal problems are explained in plain words (for example "Euron Code was updated while this window was
|
|
27
|
+
running; start it again"), without internal names. The details still go to the error report.
|
|
28
|
+
- Saving project notes and settings waits out a file briefly held by antivirus or OneDrive on Windows
|
|
29
|
+
("Access is denied") instead of failing.
|
|
30
|
+
|
|
31
|
+
## 1.5.2 (2026-11-10)
|
|
32
|
+
|
|
33
|
+
Converting a project to another framework (for example ASP.NET Web Forms to MVC) carries every page over.
|
|
34
|
+
|
|
35
|
+
- Ask Euron Code to convert, migrate or port an existing project and it first makes an inventory of every legacy
|
|
36
|
+
file (pages are paired with their code-behind), on your computer, before anything changes. The list is in
|
|
37
|
+
`MIGRATION_CHECKLIST.md`, which Euron Code keeps up to date as pages are carried over.
|
|
38
|
+
- The model converts one page at a time and reads each legacy page right before it writes the new one. It is told
|
|
39
|
+
never to write a page from memory or invent sample pages, and conversions are not handed to sub-agents that
|
|
40
|
+
never saw the legacy files.
|
|
41
|
+
- Euron Code checks the new files for each legacy page's text (headings, sentences, table rows, phone numbers,
|
|
42
|
+
messages). When a new view is written without its page's content, it says so at once and hands the legacy
|
|
43
|
+
page over (two pages per step at most), so the view is redone from the page. Before it may call the job done,
|
|
44
|
+
it lists the pages that are not carried over yet. After the conversation is summarised, the list of what is
|
|
45
|
+
left comes back too, and "continue" picks up from it.
|
|
46
|
+
- .NET: an old-style .NET Framework project (MVC 5, Web Forms) is built with Visual Studio's MSBuild (found
|
|
47
|
+
automatically) with NuGet restore, not with `dotnet build` (which cannot build it). `dotnet test` is only
|
|
48
|
+
suggested when there is a test project.
|
|
49
|
+
- Bypass mode on Windows no longer refuses build commands as "outside the project": tool switches such as
|
|
50
|
+
`/t:Rebuild` or `/p:Configuration=Debug` are not paths, and running an installed program by its full path
|
|
51
|
+
(for example Visual Studio's MSBuild.exe) is allowed. Shells and interpreters run that way still ask.
|
|
52
|
+
- Turn it off with `euron config set migrationMode false` or `EURON_NO_MIGRATION=1`.
|
|
53
|
+
|
|
3
54
|
## 1.5.1 (2026-11-10)
|
|
4
55
|
|
|
5
56
|
Default is the Euron model on Euron's own GPUs; bring your own Anthropic/OpenAI/any key, billed by your provider.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: euron-code
|
|
3
|
-
Version: 1.5.
|
|
3
|
+
Version: 1.5.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.5.
|
|
7
|
+
version = "1.5.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"
|
|
@@ -80,6 +80,8 @@ _GUTTER_RE = re.compile(r"^\s*\d+\s*[|:\u2502\t]\s?")
|
|
|
80
80
|
READ_TOOLS = ("euron_reuse_read", "oss_read", "oss_tree", "oss_grep")
|
|
81
81
|
_LIC_RE = re.compile(r"\[(MIT|Apache-2\.0|BSD-[23]-Clause|ISC|0BSD|Unlicense|MPL-2\.0|CC0-1\.0|Zlib)\]|licence (\S+)")
|
|
82
82
|
DEFAULT_STEP_BUDGET = 60
|
|
83
|
+
MAX_MIGRATION_NUDGES = 2 # "these legacy files are not carried over yet" asks per request
|
|
84
|
+
HANDOVERS_PER_STEP = 2 # legacy pages pasted into one step's results (8 at once overflowed the 32k context)
|
|
83
85
|
_EXIT_RE = re.compile(r"^Exit code: (-?\d+)")
|
|
84
86
|
_DOC_RE = re.compile(r"(\.(md|txt|rst|adoc)$|^(LICENSE|NOTICE|THIRD_PARTY_NOTICES)|(^|/)\.euron/)", re.I)
|
|
85
87
|
_SOURCE_RE = re.compile(r"\.(py|ipynb|js|jsx|ts|tsx|mjs|cjs|vue|svelte|html|css|scss|java|kt|go|rs|c|cc|cpp|h|cs|"
|
|
@@ -218,6 +220,9 @@ class Agent:
|
|
|
218
220
|
self._ctx_note_band = 0 # 10% band of the last small "Context was N% full" note
|
|
219
221
|
self.pending_paths: List[Path] = [] # /attach, /paste-image: attached to the next prompt
|
|
220
222
|
self._notice_nudged = False # one THIRD_PARTY_NOTICES nudge per prompt
|
|
223
|
+
self._migration_nudges = 0 # "legacy files not carried over yet" asks this prompt
|
|
224
|
+
self._migration_noted: Dict[str, int] = {} # legacy item -> "written without its content" notes
|
|
225
|
+
self._handover_step, self._handovers = -1, 0 # legacy pages handed over in the current step
|
|
221
226
|
self.memory_files: List[memory.MemoryFile] = []
|
|
222
227
|
self.rules = rules.RuleSet([])
|
|
223
228
|
self.skills: Dict[str, skills.Skill] = {}
|
|
@@ -473,6 +478,8 @@ class Agent:
|
|
|
473
478
|
self._todo_alone = 0
|
|
474
479
|
self._placeholder_nudged = False
|
|
475
480
|
self._notice_nudged = False
|
|
481
|
+
self._migration_nudges = 0
|
|
482
|
+
self._migration_noted = {}
|
|
476
483
|
for r in self._run_hooks("UserPromptSubmit", {"prompt": user_text}):
|
|
477
484
|
if r.code == 2:
|
|
478
485
|
self.ui.warn("A UserPromptSubmit hook blocked this prompt: " + (r.stderr.strip() or "(no reason given)"))
|
|
@@ -535,6 +542,7 @@ class Agent:
|
|
|
535
542
|
text += "\n\n" + prompts.PLAN_MODE_NOTE
|
|
536
543
|
if not self.is_subagent:
|
|
537
544
|
text += self._build_context(user_text)
|
|
545
|
+
text += self._migration_context(user_text)
|
|
538
546
|
if len(self.messages) == 1:
|
|
539
547
|
text += self._small_project_snapshot()
|
|
540
548
|
content: Any = text
|
|
@@ -690,6 +698,12 @@ class Agent:
|
|
|
690
698
|
not done.startswith("[Euron Code: the last check") else
|
|
691
699
|
"(the last check still fails; asking Euron Code to fix it)")
|
|
692
700
|
continue
|
|
701
|
+
gaps = self._migration_gaps()
|
|
702
|
+
if gaps:
|
|
703
|
+
self._migration_nudges += 1
|
|
704
|
+
self._append({"role": "user", "content": gaps})
|
|
705
|
+
self.ui.dim("(legacy files are not carried over yet; asking Euron Code to port them)")
|
|
706
|
+
continue
|
|
693
707
|
if self._needs_spec_review(user_text):
|
|
694
708
|
self._spec_reviewed = True
|
|
695
709
|
self._append({"role": "user", "content": prompts.SPEC_REVIEW_NUDGE})
|
|
@@ -745,7 +759,7 @@ class Agent:
|
|
|
745
759
|
if nudge is None:
|
|
746
760
|
self.ui.warn("This request reached its time / step budget (taskTimeBudgetMinutes, taskStepBudget); "
|
|
747
761
|
"asking Euron Code to wrap up. Say \"continue\" to keep going.")
|
|
748
|
-
self._append({"role": "user", "content": nudge or prompts.WRAP_UP_NUDGE})
|
|
762
|
+
self._append({"role": "user", "content": (nudge or prompts.WRAP_UP_NUDGE) + self._migration_left()})
|
|
749
763
|
self._effort_once = "low"
|
|
750
764
|
saved = self.tool_schemas
|
|
751
765
|
try:
|
|
@@ -1472,7 +1486,14 @@ class Agent:
|
|
|
1472
1486
|
re.M) for p in cands if p.is_file() and p.stat().st_size < 1_000_000)
|
|
1473
1487
|
except OSError:
|
|
1474
1488
|
tests = False
|
|
1475
|
-
|
|
1489
|
+
cmd = progress.detect_check_command(self.files_changed(), scripts, tests)
|
|
1490
|
+
if cmd is None:
|
|
1491
|
+
try:
|
|
1492
|
+
from euron_code import dotnet
|
|
1493
|
+
cmd = dotnet.build_command(self.root, self.shell_kind)
|
|
1494
|
+
except Exception:
|
|
1495
|
+
cmd = None
|
|
1496
|
+
return cmd
|
|
1476
1497
|
|
|
1477
1498
|
def _done_nudge(self) -> Optional[str]:
|
|
1478
1499
|
"""Definition of done: after the last change a real check (build / tests / running it) must pass. Up
|
|
@@ -1497,6 +1518,118 @@ class Agent:
|
|
|
1497
1518
|
self._nudged = True
|
|
1498
1519
|
return prompts.verify_nudge(self._check_command())
|
|
1499
1520
|
|
|
1521
|
+
# ---------------------------------------------------------- framework migrations (1.5.2)
|
|
1522
|
+
def _migration_context(self, user_text: str) -> str:
|
|
1523
|
+
"""A migration request in an existing project: inventory every legacy file first (local, no model call) and
|
|
1524
|
+
append the playbook; a later request in the same migration ("continue", "build it") gets the status."""
|
|
1525
|
+
from euron_code import migration
|
|
1526
|
+
if self.permissions.mode == "plan" or os.environ.get("EURON_NO_MIGRATION") == "1" or self.settings.get("migrationMode", True) is False:
|
|
1527
|
+
return ""
|
|
1528
|
+
try:
|
|
1529
|
+
typed = re.sub(r'<attached-file path="[^"]*">.*?</attached-file>', " ", user_text, flags=re.S)
|
|
1530
|
+
state = migration.active(self.root)
|
|
1531
|
+
if state is None and migration.is_migration_request(typed) and not self._is_new_project():
|
|
1532
|
+
state = migration.start(self.root, typed)
|
|
1533
|
+
self.ui.dim(f"Migration: inventoried {len(state['items'])} legacy item(s); checklist in "
|
|
1534
|
+
f"{migration.CHECKLIST}.")
|
|
1535
|
+
return migration.playbook(state, self._dotnet_hint(state))
|
|
1536
|
+
if state is None:
|
|
1537
|
+
return ""
|
|
1538
|
+
migration.touch(self.root, state)
|
|
1539
|
+
if migration.is_migration_request(typed):
|
|
1540
|
+
return migration.playbook(state, self._dotnet_hint(state))
|
|
1541
|
+
return migration.status_note(self.root, state)
|
|
1542
|
+
except Exception as e: # never break a turn
|
|
1543
|
+
from euron_code import errorlog
|
|
1544
|
+
errorlog.get().report("migration", "context_failed", str(e)[:300])
|
|
1545
|
+
return ""
|
|
1546
|
+
|
|
1547
|
+
def _dotnet_hint(self, state: Dict[str, Any]) -> str:
|
|
1548
|
+
text = (state.get("request") or "").lower()
|
|
1549
|
+
if not (state.get("webforms") or re.search(r"\.net|asp\.?net|dotnet|mvc|c#|csproj|razor|blazor", text)):
|
|
1550
|
+
return ""
|
|
1551
|
+
from euron_code import dotnet
|
|
1552
|
+
return dotnet.build_hint(self.root, self.shell_kind)
|
|
1553
|
+
|
|
1554
|
+
def _migration_status(self) -> str:
|
|
1555
|
+
if self.is_subagent:
|
|
1556
|
+
return ""
|
|
1557
|
+
try:
|
|
1558
|
+
from euron_code import migration
|
|
1559
|
+
state = migration.active(self.root)
|
|
1560
|
+
return migration.status_note(self.root, state) if state else ""
|
|
1561
|
+
except Exception:
|
|
1562
|
+
return ""
|
|
1563
|
+
|
|
1564
|
+
def _migration_left(self) -> str:
|
|
1565
|
+
if self.is_subagent:
|
|
1566
|
+
return ""
|
|
1567
|
+
try:
|
|
1568
|
+
from euron_code import migration
|
|
1569
|
+
state = migration.active(self.root)
|
|
1570
|
+
pend = migration.pending(self.root, state) if state else []
|
|
1571
|
+
if not pend:
|
|
1572
|
+
return ""
|
|
1573
|
+
return ("\n[In 2) list these legacy files that are not carried over yet: " +
|
|
1574
|
+
", ".join(c["item"] for c in pend[:20]) + (" ..." if len(pend) > 20 else "") +
|
|
1575
|
+
f". The list is kept in {migration.CHECKLIST}; \"continue\" picks up from it.]")
|
|
1576
|
+
except Exception:
|
|
1577
|
+
return ""
|
|
1578
|
+
|
|
1579
|
+
def _migration_subagent_note(self) -> str:
|
|
1580
|
+
"""Prod 2026-11-10: write sub-agents built Razor views from one-line descriptions of pages they never saw."""
|
|
1581
|
+
try:
|
|
1582
|
+
from euron_code import migration
|
|
1583
|
+
if not migration.active(self.root):
|
|
1584
|
+
return ""
|
|
1585
|
+
return ("[Migration in progress. If this part converts legacy files: before writing each new file, "
|
|
1586
|
+
f"read_file the legacy file(s) it comes from (exact names in {migration.CHECKLIST}) and carry "
|
|
1587
|
+
"over all of their text, fields and logic. Never write a converted file from this description "
|
|
1588
|
+
"alone, and never invent content.]\n\n")
|
|
1589
|
+
except Exception:
|
|
1590
|
+
return ""
|
|
1591
|
+
|
|
1592
|
+
def _migration_write_check(self, req: Request) -> str:
|
|
1593
|
+
"""Right after a converted view is written: if its legacy page's content is still not in the new files, say
|
|
1594
|
+
so at once and hand over the legacy file (1.5.2 repro: views written from memory after a summary)."""
|
|
1595
|
+
try:
|
|
1596
|
+
from euron_code import migration
|
|
1597
|
+
state = migration.active(self.root)
|
|
1598
|
+
if not state:
|
|
1599
|
+
return ""
|
|
1600
|
+
out = ""
|
|
1601
|
+
for p in req.paths:
|
|
1602
|
+
rel = self.ctx.rel(p)
|
|
1603
|
+
if self._handover_step != self.steps:
|
|
1604
|
+
self._handover_step, self._handovers = self.steps, 0
|
|
1605
|
+
note = migration.write_check(self.root, state, rel, self._migration_noted,
|
|
1606
|
+
handover=self._handovers < HANDOVERS_PER_STEP)
|
|
1607
|
+
if note and "<legacy-file" in note:
|
|
1608
|
+
self._handovers += 1
|
|
1609
|
+
if note:
|
|
1610
|
+
out += "\n\n" + note
|
|
1611
|
+
self.ui.dim(f"(the new {rel} is missing its legacy page's content; handing the page over)")
|
|
1612
|
+
return out
|
|
1613
|
+
except Exception:
|
|
1614
|
+
return ""
|
|
1615
|
+
|
|
1616
|
+
def _migration_gaps(self) -> Optional[str]:
|
|
1617
|
+
"""Before a migration may end: the legacy files whose text is in no new file (up to 2 asks per request)."""
|
|
1618
|
+
if (self.is_subagent or self.permissions.mode == "plan" or self._migration_nudges >= MAX_MIGRATION_NUDGES
|
|
1619
|
+
or not self._real_edits()):
|
|
1620
|
+
return None
|
|
1621
|
+
try:
|
|
1622
|
+
from euron_code import migration
|
|
1623
|
+
state = migration.active(self.root)
|
|
1624
|
+
if not state:
|
|
1625
|
+
return None
|
|
1626
|
+
if migration.finish_if_complete(self.root, state):
|
|
1627
|
+
self.ui.dim("Migration: every legacy item's text is in the new files.")
|
|
1628
|
+
return None
|
|
1629
|
+
return migration.gaps_nudge(self.root, state)
|
|
1630
|
+
except Exception:
|
|
1631
|
+
return None
|
|
1632
|
+
|
|
1500
1633
|
def _is_new_project(self) -> bool:
|
|
1501
1634
|
"""An empty or near-empty folder: a new build, where reuse references make sense. In an existing project
|
|
1502
1635
|
the model works with the project's own code (prod: debounce in src/timing.js, a React counter or a
|
|
@@ -2115,6 +2248,8 @@ class Agent:
|
|
|
2115
2248
|
self._publish_components(req.command or "")
|
|
2116
2249
|
if req is not None and not result.is_error:
|
|
2117
2250
|
content += self._rules_for(req)
|
|
2251
|
+
if req is not None and not result.is_error and req.category == "Edit":
|
|
2252
|
+
content += self._migration_write_check(req)
|
|
2118
2253
|
out = content if len(content) <= 2000 else content[:2000] + "..."
|
|
2119
2254
|
for r in self._run_hooks("PostToolUse", {"tool_input": args, "tool_output": out}, name):
|
|
2120
2255
|
if r.code == 2 and r.stderr.strip():
|
|
@@ -2383,6 +2518,7 @@ class Agent:
|
|
|
2383
2518
|
if ledger:
|
|
2384
2519
|
head += "\n\n" + ledger
|
|
2385
2520
|
head += self._state_note()
|
|
2521
|
+
head += self._migration_status()
|
|
2386
2522
|
err = context.last_error(old)
|
|
2387
2523
|
if err:
|
|
2388
2524
|
head += "\n\nLast error seen:\n" + err
|
|
@@ -2674,6 +2810,8 @@ class Agent:
|
|
|
2674
2810
|
sub.on_session_in_use = self.on_session_in_use
|
|
2675
2811
|
if mode == "write":
|
|
2676
2812
|
sub.checkpoints = self.checkpoints # /rewind undoes the sub-agent's edits too
|
|
2813
|
+
if mode == "write":
|
|
2814
|
+
prompt = self._migration_subagent_note() + prompt
|
|
2677
2815
|
res = sub.run_turn(prompt)
|
|
2678
2816
|
finally:
|
|
2679
2817
|
if mode == "write":
|
|
@@ -563,7 +563,9 @@ class Client:
|
|
|
563
563
|
return self._json("POST", "/v1/components", json=meta, timeout=10.0)
|
|
564
564
|
|
|
565
565
|
def components_search(self, q: str = "") -> Dict[str, Any]:
|
|
566
|
-
|
|
566
|
+
# The gateway serves GET /v1/components?q= ; /v1/components/search was a 404 ("Route not found") on
|
|
567
|
+
# every /components call up to 1.5.2 (prod error reports 6 and 10 Nov).
|
|
568
|
+
return self._json("GET", "/v1/components", params={"q": q}, timeout=10.0)
|
|
567
569
|
|
|
568
570
|
def usage_task(self, task_id: str) -> Dict[str, Any]:
|
|
569
571
|
return self._json("GET", f"/v1/usage/task/{task_id}", timeout=10.0)
|
|
@@ -113,7 +113,9 @@ def sub_parser(cmd: str) -> argparse.ArgumentParser:
|
|
|
113
113
|
if cmd == "models":
|
|
114
114
|
p.add_argument("action", nargs="?", default="list", choices=["list", "add", "remove", "use"])
|
|
115
115
|
p.add_argument("name", nargs="?", help="add: a provider (openai, anthropic, ollama, gemini, openrouter, groq, "
|
|
116
|
-
"custom); remove: a provider; use: provider:model or euron")
|
|
116
|
+
"euri, custom); remove: a provider; use: provider:model or euron")
|
|
117
|
+
# `euron models add custom euri` (ticket 6a584a1f): the second word is the custom provider's name
|
|
118
|
+
p.add_argument("extra", nargs="?", help=argparse.SUPPRESS)
|
|
117
119
|
p.add_argument("--json", action="store_true")
|
|
118
120
|
if cmd == "config":
|
|
119
121
|
p.add_argument("action", choices=["get", "set", "unset", "list", "path"])
|
|
@@ -169,8 +171,8 @@ def main(argv: Optional[List[str]] = None, via_module: bool = False) -> int:
|
|
|
169
171
|
from euron_code import errorlog
|
|
170
172
|
eid = errorlog.report_exception("crash", e)
|
|
171
173
|
errorlog.get().close()
|
|
172
|
-
|
|
173
|
-
|
|
174
|
+
from euron_code import friendly
|
|
175
|
+
print(friendly.crash_message(e, eid), file=sys.stderr)
|
|
174
176
|
return EXIT_ERROR
|
|
175
177
|
|
|
176
178
|
|
|
@@ -277,8 +279,14 @@ def run_models(ui, args) -> int:
|
|
|
277
279
|
"""`euron models [list|add|remove|use]`: your own models (no Euron login needed to set them up)."""
|
|
278
280
|
from euron_code.llm import setup
|
|
279
281
|
if args.action == "add":
|
|
282
|
+
why = setup.interactive_problem()
|
|
283
|
+
if why:
|
|
284
|
+
ui.error(why)
|
|
285
|
+
return EXIT_USAGE
|
|
280
286
|
try:
|
|
281
|
-
|
|
287
|
+
extra = getattr(args, "extra", None)
|
|
288
|
+
name = extra if extra and str(args.name or "").lower() == "custom" else args.name
|
|
289
|
+
ref = setup.add_interactive(ui, provider=name)
|
|
282
290
|
except llm.ProviderError as e:
|
|
283
291
|
ui.error(e.message)
|
|
284
292
|
return EXIT_ERROR
|