tools/ holds model tools. These three files register none: they send a
message to a platform for `hermes send` and for cron delivery, through
gateway adapters and gateway config. They move to the gateway package:
tools/send_message_tool.py -> gateway/outbound/send.py
tools/send_message_senders.py -> gateway/outbound/senders.py
tools/send_message_targets.py -> gateway/outbound/targets.py
Twelve test files move with them to tests/gateway/outbound/. Every importer
changes its import line in place. Nothing stays at the old paths: none of
the three names is on the plugin API list, the shipped-release list or the
old-updater list.
Behaviour is unchanged. The logger name stays tools.send_message_tool in
the three files and in the QQ Bot sender that shares it, so the lines stay
under `hermes logs --component tools`. The boundary-lint baseline changes
12 keys and no count, because its keys carry the module path of the
underscore names five bundled plugins import.
The import and docs rewrites were made by scripts/move/rewrite_imports.py
and rewrite_docs.py.
tools/ holds model tools. These three files register none and do cron's
work, so they move to the package that owns it:
tools/cronjob_job_args.py -> cron/job_args.py
tools/cronjob_prompt_scan.py -> cron/prompt_scan.py
tools/blueprints.py -> cron/skill_blueprints.py
Their tests move with them to tests/cron/. Every importer changes its
import line in place, so no module is imported earlier or later than
before. Nothing stays at the old paths: none of the three names is on the
plugin API list, the shipped-release list or the old-updater list.
skill_blueprints, not blueprints: cron/blueprint_catalog.py already holds
Automation Blueprints, a different thing. This file reads the blueprint
block of a skill's frontmatter.
Behaviour is the same except two strings. The report of a run the
injection scanner blocked names cron/prompt_scan.py. The one debug line
in skill_blueprints logs as cron.skill_blueprints, so it shows under
`hermes logs --component cron`. job_args and prompt_scan keep the logger
name tools.cronjob_tools.
The import and docs rewrites were made by scripts/move/rewrite_imports.py
and rewrite_docs.py; the two gateway contract files are regenerated from
the docstring that names job_args.py.
A run-outcome write persists the complete jobs.json store, not just the running job. Scrub legacy sticky failure details on every job in the write, preserving diagnostics and pause state. Test with an idle paused job carrying a pre-upgrade error and a separate healthy run.
Carrier: c2h5oh, NousResearch/hermes-agent#155835.
Original reporter: joseph050221, NousResearch/hermes-agent#102700.
(cherry picked from commit 7a0ec6aca8a9ad5efdec48b62b3ca0bb83baedf1)
Moved unchanged, so the follow-up leaves cron/jobs.py smaller than main
instead of growing it through the #82010 FILE_LINES waiver. cron.jobs
imports them back, so cron/jobs_model_pin's late
from cron.jobs import _normalize_job_optional_text still resolves.
Refs #155355
Keeps cron/jobs.py at +1 instead of +5 for the follow-up: the loop sits
next to sanitize_persisted_error and _record_run_outcome calls it.
Refs #155355
Co-authored-by: Bear Huddleston <196404565+BearHuddleston@users.noreply.github.com>
The success-only scrub left a raw pre-#155355 last_failure on a cancelled
run, and a raw last_fire_error on failed and cancelled runs. Every outcome
rewrites jobs.json and keeps the stamps it doesn't replace, so scrub both
before branching on the outcome.
Refs #102700
A successful cron run keeps last_failure.detail for history but re-persisted
pre-redaction credentials from older jobs.json files. Scrub that retained
field at run-outcome bookkeeping while preserving its diagnostic text.
Regression: test_success_scrubs_preupgrade_sticky_failure
Builds on c2h5oh's #155355; original report #102700.
(cherry picked from commit 8786e3743d96fb64fb58874b25746a36f81749e4)
The literal-PID scan matched only `stop-process`, so `spps -Id <gateway
pid>` was never checked. Map the alias to Stop-Process; `spps -Id P -WhatIf`
then gets the same preview exemption.
Refs #149944
Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
`-ErrorVariable: -WhatIf` binds -WhatIf as ErrorVariable's value, so the
Stop-Process runs for real, but the preview exemption skipped only words
after a colon-less value parameter. Treat `-X:` as still waiting for its
value.
Refs #149944
Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
The preview exemption fired whenever a -whatif token appeared anywhere in
the shlex-tokenized segment. shlex drops quotes and does not split on `{`,
`}` or a bare CR, so it also exempted a real stop when the -WhatIf belonged
to an invoked scriptblock (`& { Stop-Process -Id P } -WhatIf`, also inside
powershell -c / pwsh -Command), to a CR-separated second statement, or was a
quoted string bound to -ErrorVariable / -OutVariable / -WarningVariable /
-InformationVariable / -PipelineVariable.
Decide the exemption on the raw top-level command instead, fail-closed. It
applies only when the whole command is one Stop-Process/spps/kill statement
with no line break other than space/tab, no ; | & { } ( ) @ $ # ` , % \ < >,
no `--`, no Unicode dash/quote and no powershell/pwsh, and `-WhatIf` / `-wi`
(optionally `:$true`) is an unquoted word that does not follow a parameter
taking a value. Every other command gets the plain literal-PID check, as
before the exemption existed.
Refs #149944
A supervised gateway can safely preview a Windows Stop-Process action with
-WhatIf or its -wi alias; refusing the literal PID blocks a documented no-op.
Keep -WhatIf:$false blocked because it executes the stop.
Follow-up to c2h5oh's gateway PID guard in NousResearch/hermes-agent#155553.
Refs NousResearch/hermes-agent#149944.
(cherry picked from commit 20735f7fa3eaf35c1d6e0473f96585c8568af925)
The redirect regex matched `<<` inside `<<<` (and `<` inside `<>`), so
the operator token was not seen as bare and its word (`kill <<< -0 N`)
was read as kill's option. One longest-first regex serves both the
argument walk and the leading-redirect peel.
Refs #149944
Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
`kill 2>/dev/null -s 0 P` took the redirection as the first operand and
treated P as a target; bash strips the redirection before kill runs.
Reuse the redirect peel from _targets_gateway_pid.
Refs #149944
Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
Once an operand appears bash stops option parsing, so `kill 99 -s 0 P`,
`-n 0` and `-l` still signal P; the listing / signal-0 exemptions no
longer apply after it.
Refs #149944
Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
kill 99 -P: the first PID operand ends option parsing, so a later -N is a
process-group target. Stop-Process -ErrorAction Stop -Id P: a bare token
after an unlisted value-taking option was taken as the positional Id and
the scan stopped; keep reading named -Id arguments.
Refs #149944
kill -USR2 <gateway pid> is the documented faulthandler stack dump and must
stay allowed; treat it like signal 0 only before a signal was given (after
one, -0/-12 are process-group targets, which also closes kill -9 -0 P).
Compare PID operands as text so a >4300-digit operand cannot make int()
raise and abort the referenced-script walk. Peel leading redirections
before the command word, and feed eval/powershell -c/cmd /c payloads
through the walk's budget-charged recurse so they open sh -c and scripts.
Refs #149944
Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
Accept the sign-prefixed and process-group operand forms (the supervised
gateway leads its own process group), colon-bound and positional Windows
id operands and comma lists split across spaces. A leading negative number
with no prior signal stays a signal number. Payloads of eval, the
PowerShell/cmd string runners and command substitutions are re-scanned.
Fixes#149944
kill/taskkill/Stop-Process by explicit PID carry neither a hermes/gateway
token nor an interpreter image, so the in-gateway lifecycle pre-check let
an agent session kill its own gateway with no drain. The local-backend
guard now passes os.getpid() (same PID namespace; the probe already proved
this process is the supervised gateway) and the walk refuses executed
literal operands equal to it, incl. sh -c payloads and referenced scripts.
Other PIDs, kill -0/-l probes, taskkill /S, remote backends and cron
callers are unchanged. Dynamic PIDs ($(pgrep ...)) are not resolved.
Narrowed from #150006: reuses the existing segment/wrapper peeler instead
of adding a second one.
Fixes#149944
Co-authored-by: Nolan <nolanchic@gmail.com>
declared_login_command read the login command from the plugin's setup_status(), and for the Claude subscription plugin that runs `claude auth status` (0.4 to 1.8 s, up to its 20 s timeout). The hint is built inline on the gateway's event loop (_hmwa_agent_error_reply), on every resolution while the plugin primary is signed out, and in nonretryable_copy and the cron copy even when their template names no command. On main the hint was the constant `hermes model`.
ProviderProfile gains login_args, the CLI's own sign-in as an argv tail after the resolved binary (`("auth", "login")`). The hint is that binary, found by the same PATH lookup the launch uses, plus login_args; a profile that declares none keeps `hermes model`. The two copy builders only look the hint up when their template uses it.
Reported-by: kshitijk4poor
* fix: classify OpenRouter Guardrails 403 as its own failure (#155460)
The guardrail body ("Request blocked: prompt injection patterns detected")
collided with the generic "request blocked" WAF pattern (surfacing
User-Agent/extra_headers advice) and fell to the auth copy on the streaming
path. Neither applies: an account-level content filter judged the request
payload, so the fix is the provider's guardrail setting, not the key or
a header.
- error_classifier: FailoverReason.guardrail_blocked + verbatim-phrase
pattern matched in _provider_special_cases before the status rules;
abort + fallback hints; POLICY_REFUSAL_REASONS membership.
- turn_failure_copy: dedicated non-retryable copy + failure-cause gloss.
- turn_recovery: non-retryable label, metadata.patterns extractor (JSON
and SDK-repr quote styles), verbose hint with the dashboard path.
- tests: verdict, copy, extraction, and WAF/auth regression coverage.
* fix: name the guardrail block on TUI, cron and the error surface too
The classifier verdict only had CLI copy; TUI/Desktop turn cards and cron
failure notices fell back to generic copy, and error_surface treated the
verdict as retryable on legacy results. Trim the tests to two invariants.
* fix: carry guardrail matched patterns into the chat reply
The chat copy points at the error details for the pattern names, but the
shared summary kept only error.message; append them there once so the
card, the reply and the CLI line all show them.
---------
Co-authored-by: Sandeep Chauhan <200135069+sandeepc25@users.noreply.github.com>
Each written body is a substring of the charged command, but the join of a
path's bodies is not: N paths each holding a large shared body plus a unique
append produced N distinct joins tokenized for free (80 mention-only paths:
7.4 s, main 0.14 s). Charge the join like any other text; drop empty bodies
before deciding whether a join exists.
Refs #127698
- _heredoc_write_targets tokenizes < and > apart from words, so cat >P<<'EOF',
cat > P<<'EOF', cat <<'EOF'>P and &>P map the body to P; no lstrip, so
>1.sh stays 1.sh.
- A written body's first scan is free (it is a substring of charged text);
any repeat is charged, so one tee body run from N paths no longer re-tokenizes
N times outside the whole-walk budget (#78398).
- Scan each written body as its own file version as well as their
concatenation: joined overwrites could form a masked cat <<'DOC' around a
restart the real file runs.
Refs #127698
Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
Only the last body per path was kept, so write-then-run-then-overwrite and
repeated >> appends hid the script; and nested sh -c / su -c / env -S /
systemd-run payloads never saw the bodies their parent wrote. Keep every body,
share one written-script map down the walk, and scan a written body once
without charging it to the budget twice.
Refs #148561
The referenced-script walk reads scripts from disk, but `cat > P <<'EOF' ... EOF; systemd-run P`
creates P only when the command runs, and the quoted cat body is masked as documentation
(#88336), so the lifecycle guard never saw the script it was about to run. Map each path a
cat/tee heredoc writes to its body and recurse into that body when the same command executes
the path (bash/sh/systemd-run/nohup/./P). A body that is only written stays allowed.
Fixes#148561Fixes#127698
A cell that only prints or writes text quoting a gateway lifecycle command was
refused with no hint of what matched. Allow a cell whose parsed code provably
cannot start or signal a process (pure-module imports only, no process-like
attributes, every name a builtin or bound in the cell); every other cell is
scanned exactly as before. The refusal now names the matched text.
Fixes#146582
Finding 'Explicit topics get replaced': _target_matches_origin treats a missing origin thread as a
wildcard, so a job born outside any topic delivering to telegram:<chat>:<topic> counted as origin
and the opt-in swapped the chosen topic for a fresh thread. Require the target thread to be the
origin's own recorded thread.
A continuable cron job (attach_to_session / cron.mirror_delivery) opens a
fresh thread per run only when its origin pins no thread: b693bee100bd's guard
keeps a job created inside a Telegram topic delivering back to that topic.
That stays the default. platforms.<p>.extra.cron_fresh_thread_per_run: true
now lets the fresh-thread branch override the origin topic for deliveries to
the job's own conversation; an explicit chat_id:thread_id target to another
chat is never overridden. A non-boolean value keeps the origin topic and warns.
Fixes#76548
Greptile: Dashboard wrapping changes fail / Invalid inputs are accepted /
The input type excludes reset / The oversized store keeps growing.
wrap_response joins _DASHBOARD_UPDATABLE_FIELDS; CronJobCreate uses StrictBool;
cronjob() annotates bool | str; the catch_up and wrap_response tri-state
normalizers move to cron/jobs_tristate.py so cron/jobs.py is 3 lines under its
origin/main size.
Align with the open #57688, which replaces the same inline check in
_deliver_result with _should_wrap_cron_response(job, user_cfg) to deliver
no_agent output unwrapped. Using one name and signature means whichever PR
lands second merges into a single helper instead of two. The helper now
returns a real bool (truthiness of the global setting, as before).
Review follow-up.
- Storage: wrap_response used bool(v), so the string "false" (for example
from the dashboard's untyped update body) was stored as wrap-on. It now
goes through _normalize_wrap_response, which mirrors catch_up: only true,
false or null are accepted, anything else is a ValueError.
- Reset: the model tool reads every argument with args.get(), so it cannot
tell an omitted field from an explicit null, and a job could never return
to the global cron.wrap_response once overridden. The tool parameter is
now a single-type string enum (on / off / inherit), with "inherit" as the
spelled-out reset; real booleans and None still pass through for the
programmatic, CLI and dashboard lanes. `hermes cron edit` gains
--inherit-wrap-response.
- The per-job precedence moved out of _deliver_result into
_effective_wrap_response (same fallbacks: an unreadable or malformed config
still wraps), keeping _deliver_result inside the complexity cap.
Tests (new file, 8 red on the previous code): off then inherit
clears the override, an omitted field leaves it alone, new jobs inherit,
the normaliser accepts only bool or null, a "false" string is rejected
without touching the stored value, and the CLI flag parses to the reset.
Precedence is covered for job override, global setting, unreadable config and
a malformed cron section.
Cron deliveries currently wrap output with a "Cronjob Response: ..." header
and a "To stop or manage this job..." footer (controlled globally by
cron.wrap_response). For some jobs - e.g. a morning briefing - the user
wants the raw, clean message body without the chrome.
Adds an optional per-job `wrap_response` boolean. None inherits the global
config (existing behaviour); True/False explicitly overrides it. Threaded
through create_job/update_job, the cronjob tool schema, the web API
CronJobCreate model, and the `hermes cron create/edit` CLI as
--wrap-response / --no-wrap-response.
* fix(cron): redact secrets before persisting errors to jobs.json/executions.db
cron/jobs.py::_mark_job_run_locked wrote raw error/delivery_error text
straight into jobs.json's last_error/last_delivery_error fields. When a
provider error embeds a key-management link (e.g. OpenRouter's
'.../workspaces/default/keys/<KEY_ID>' 403 body), the key identifier
was persisted verbatim and survived indefinitely across restarts, job
edits, and profile backups.
cron/incidents.py::_redact_error and cron/delivery_queue.py::_finish
already sanitize before persisting; jobs.json was the one cron
persistence chokepoint left raw. Fix the whole class, not just the
reported field:
- agent/redact.py: new _KEY_MANAGEMENT_URL_PATH_RE, applied
unconditionally in redact_sensitive_text — masks /keys/<id> and
/api-keys/<id> path segments (not caught by the existing sk-/ghp_-
style prefix patterns).
- cron/jobs.py: new _sanitize_persisted_error() (redact + bound to
2000 chars, mirroring incidents.py's MAX_ERROR_CHARS convention).
Applied at every raw-error write site: _mark_job_run_locked
(last_error, last_delivery_error) and note_fire_forward_failure
(last_fire_error.detail).
- cron/scheduler.py: the post-interrupt update_job({last_delivery_error})
path bypasses mark_job_run — sanitized there too.
- cron/executions.py: finish_execution() writes to the durable
executions.db SQLite ledger, same exposure class as jobs.json
(survives restarts) — sanitized there too.
Closes#102700.
Tests: tests/cron/test_cron_jobs_error_redaction.py (new, 10 cases)
covers the OpenRouter key-URL example from the issue, None/empty
passthrough, length bounding, redactor-failure fail-closed behavior,
and each of the four write sites. Full tests/cron/ suite: 1164/1175
passing (the 11 failures are pre-existing on unmodified main — Windows
HOME/path env issues and one process-timing flake, confirmed
unrelated by running the same files against main before this change).
tests/agent/test_redact.py (116) and tests/test_redaction_registry.py
(19) pass unchanged, confirming no regression to the shared redactor.
* fix(cron): fail closed and cover last_failure/receipt recovery when scrubbing persisted errors
Follow-up to the salvaged commit: a redactor failure now stores a
placeholder instead of the unscanned text, the sticky last_failure
detail and recover_receipted_execution's ledger write go through the
same scrub, and the unconditional /keys/<id> regex is dropped (key IDs
are not credentials and it rewrote unrelated URLs).
Fixes#102700
* fix(cron): scrub the unverified-admission reason before persisting it
The CronExecutionUnknown path wrote str(e) raw to jobs.json paused_reason and
executions.db error. Sanitize once and pass the same string to both, so the
receipt that later proves the run terminal still matches the pause it lifts.
Refs #102700
* refactor(cron): move persisted-error scrubber to cron/jobs_error_text.py
cron/jobs.py is over its size cap and only grew through an unrelated file-level
waiver; the helper now lives in a sibling with a public name, so executions.py,
scheduler.py and scheduler_bookkeeping.py stop importing a private name from
cron.jobs. jobs.py reads it through the module attribute, so one monkeypatch on
cron.jobs_error_text covers every caller. jobs.py is net 0 lines vs main.
Also pins the receipt-recovery and interrupted-run scrub sites and the
redact_url_credentials flag: each mutant now fails exactly its own test.
Refs #102700
Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
* fix(cron): cap the queued-delivery error settled onto jobs.json
delivery_queue._finish redacts the row's error but does not bound it, and
_settle_job_record copied it straight into last_delivery_error - the one writer
of that field that skipped the 2,000-char cap. Run it through
sanitize_persisted_error and compare the stored form in the no-op check.
Refs #102700
---------
Co-authored-by: joaomarcos <joaomarcosdias444@gmail.com>
Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
The refusal string is all a user or the creating model sees (cronjob
create/update/run, API server, dashboard, blueprint import, and the
per-tick BLOCKED delivery of a stored job). Append a per-rule remedy for
exfil_curl_auth_header pointing at gh api or a --script job with
terminal.env_passthrough (cron docs, Security), and make the BLOCKED copy
neutral about the cause so a prompt-only job isn't told to audit skills.
Refs #74667
Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
Symptom (an enterprise messaging-only deployment, state.db on NFS, after 0.22.2 -> 0.22.6): the
gateway event loop stalled 5-58 s about every 30 s, Socket Mode reconnected, and the loop watchdog
exited the process (75) three times in 12 h. SIGUSR2 dumps put the loop thread in
hermes_state_runtime.get_session_admission <- gateway/session_cron.operation <-
cron/scheduler_authority.observe, waiting in fcntl(F_SETLK) on state.db-shm.
Cause: the unified runtime (#106742, first in v0.22.3) runs a gateway-owned cron fire's observer on
the owner loop (cdbe8c35ad). f2a717d8c6 and a84cedb53b moved its ledger WRITES off the loop
(tracked_write); its READS stayed: every <= 2 s per running job `status` read the admission (and a
terminal row's result) and `cancel`/`recover` read the ledger, synchronously. `observe` also wrote
the cron journal with file + directory fsync on the loop. A WAL read is cheap on local disk, so the
reads looked harmless; on storage where each -shm lock is a server round trip, one read stops every
socket, timer, Stop and liveness probe. The same shape sat in every turn's FIFO claim
(_claim_next's pending read and its post-preclaim re-reads) and in the Slack adapter, whose thread
watermark (a full routing-index save: replace_gateway_routing_entries + the fsynced sessions.json
mirror, under SessionStore._lock) was persisted synchronously in the message handler on every
thread reply, and whose assistant lifecycle events seeded DM routes the same way.
Change (each read/write runs in a worker; ordering is unchanged because each caller awaits it before
its next step):
- session_cron.operation: status/cancel read the admission (+ saved result) in one worker hop;
recover lists the ledger in a worker.
- scheduler_authority.observe: save() awaits the fsynced journal write in a worker, before submit
and after the receipt, as before.
- SessionAuthority._claim_next: the pending read and both re-reads after an awaited preclaim run in
a worker. The claim still takes exactly the head that read validated (claim_session_input
head=), so input or a cancel committed meanwhile is re-read, never claimed blind.
- Slack: the thread watermark get/set and the lifecycle DM seed await the store in a worker.
Tests (composed, real owner loop + SessionDB, storage slowed to 2 s per statement at the store's
choke points; max loop-tick gap, base -> branch):
- tests/gateway/test_owner_loop_cron_polling.py: status poll 2.01 s -> < 0.2 s, cancel poll
4.01 s -> < 0.2 s, journal fsync 1.32 s -> < 0.2 s.
- tests/gateway/test_owner_loop_claim_read.py: claim read 2.01 s -> < 0.2 s, same head claimed.
- tests/gateway/test_slack_thread_watermark_off_loop.py: watermark write 2.03 s -> < 0.2 s; the
lifecycle seed writes off the loop thread.
Normalizing first lets a zone-aware parse_schedule (#147310) read the
canonical value, and keeps this change off the parse_schedule line so
the two PRs merge cleanly.
The [CURRENT RUN TIME: ...] line was always rendered in the profile
zone. A 09:00 America/New_York job fired from a Los Angeles profile was
told "06:00 PST", so the expression, the fire and the time the model
reads disagreed on the wall clock (a pre-market brief would reason it
is three hours before the open). _run_time_line now takes the job and
converts to its pinned zone; unpinned and corrupt-pin jobs keep the
profile zone, byte-identical to before.
A profile distribution's cron/jobs.json reaches the live store through
merge_job_definition, not create_job/update_job, so its timezone skipped
the IANA validation those doors apply. A typo ("America/NewYork") was
stored as-is and zone_for_job degraded it to each installer's profile
zone: the job fired at a different hour for every user, with only a
once-per-process log warning. Whitespace was also stored verbatim.
merge_job_definition now normalizes the shipped zone with the same
normalize_timezone the other doors use (ValueError names the job via
_merge_or_name, surfacing as a DistributionError before any file is
replaced) and drops an empty value so it means "inherit".
entry_scoped_pool is now the one lookup every custom-entry pool reader takes
(main resolver, aux named-custom key + peek + recovery, delegate child,
primary restore, fallback/switch_model/cron attach via load_route_pool). It
keeps a row only if the entry re-seeds it from current config
(env:<key_env>, config:<name>, model_config) or its recorded base_url is on
the target origin; credential-less entries no longer get a built-in's seeded
rows on another host. Unstamped manual rows are bound to the entry's current
address on first use, the dashboard pool writer records base_url like
`hermes auth add`, and the Desktop move guard counts the entry's off-origin
pool rows as stored credentials (400 unless the payload sets a key or an
explicit blank).
Fixes#130410
hermes_agent.compat.install() puts a non-strict Finder(MOVES) at the front
of sys.meta_path once per process. It runs from hermes_bootstrap (which
covers the CLI, gateway, TUI gateway, ACP, MCP server, workers and the
plugin host child), from the cron scheduler's __main__, from the two
by-path update entry points, and at the top of the `plugins validate`
probe script. MOVES is empty, so nothing changes yet.
The plugin loader now finds a parent package's folder from the package's
own import spec instead of counting dots in its name, and the bundled
plugin discovery packages build their module and parent names from
__package__. The plugin host child looks up a provider base class under
both its old and current module name.
hermes_agent is added to update-startup-files, and the test fixtures that
copy a minimal checkout now copy hermes_agent too.
61 call sites counted directories up from their own __file__ to find the
install folder. They now call hermes_cli._startup_fast.project_root_str(),
so the layout move changes one line instead of 61.
Kept with a reason in the lint baseline: files that cannot import Hermes
code (bootstrap, update path, pm/) and the sys.path bootstraps left for
part 2b. The baseline drops from 89 to 28 root_from_file sites.
Six existing tests that patched a module __file__ now patch the owner.