Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
hermes-node-agent
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lisa
hermes-node-agent
Commits
2ad20cc3
Commit
2ad20cc3
authored
May 01, 2026
by
Lisa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: default wss:// URL, better JSON error messages
parent
479136ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
hermes_node_agent.py
hermes_node_agent.py
+9
-3
No files found.
hermes_node_agent.py
View file @
2ad20cc3
...
@@ -47,7 +47,7 @@ logger = logging.getLogger(__name__)
...
@@ -47,7 +47,7 @@ logger = logging.getLogger(__name__)
DEFAULT_GATEWAY_TOKEN
=
'GATEWAY_TOKEN_MUST_BE_PROVIDED'
DEFAULT_GATEWAY_TOKEN
=
'GATEWAY_TOKEN_MUST_BE_PROVIDED'
DEFAULT_CONFIG
=
{
DEFAULT_CONFIG
=
{
'gateway_url'
:
'ws
://127.0.0.1
:8765'
,
'gateway_url'
:
'ws
s://localhost
:8765'
,
'node_name'
:
'unknown'
,
'node_name'
:
'unknown'
,
'token'
:
DEFAULT_GATEWAY_TOKEN
,
'token'
:
DEFAULT_GATEWAY_TOKEN
,
'sexec_path'
:
'~/.config/hermes-node/sexec/sexec.sh'
,
'sexec_path'
:
'~/.config/hermes-node/sexec/sexec.sh'
,
...
@@ -438,9 +438,15 @@ class NodeAgent:
...
@@ -438,9 +438,15 @@ class NodeAgent:
cfg_path
=
Path
(
path
)
.
expanduser
()
if
path
else
Path
.
home
()
/
'.config'
/
'hermes-node'
/
'config.json'
cfg_path
=
Path
(
path
)
.
expanduser
()
if
path
else
Path
.
home
()
/
'.config'
/
'hermes-node'
/
'config.json'
if
not
cfg_path
.
exists
():
if
not
cfg_path
.
exists
():
logger
.
error
(
f
"Config not found: {cfg_path}"
)
logger
.
error
(
f
"Config not found: {cfg_path}"
)
logger
.
error
(
f
"Run the installer or copy config-template.json to {cfg_path}"
)
sys
.
exit
(
1
)
try
:
with
open
(
cfg_path
)
as
f
:
data
=
json
.
load
(
f
)
except
json
.
JSONDecodeError
as
e
:
logger
.
error
(
f
"Config file is not valid JSON: {e}"
)
logger
.
error
(
f
"File: {cfg_path}"
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
with
open
(
cfg_path
)
as
f
:
data
=
json
.
load
(
f
)
# Merge defaults
# Merge defaults
merged
=
{
**
DEFAULT_CONFIG
,
**
data
}
merged
=
{
**
DEFAULT_CONFIG
,
**
data
}
if
not
merged
[
'token'
]:
if
not
merged
[
'token'
]:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment