Configure Athena Deck Hermes specialist and record no-restart acceptance
This commit is contained in:
1 parent
44ce30c428
commit
3a0653224e
8 files changed
+543
-3
No files matched your search
@@ -35,9 +35,67 @@ and model workers in that suite are local synthetic fixtures, not production.
|
||||
|
||||
## Setup and acceptance
|
||||
|
||||
Published baseline: `6979480` consolidates the reviewed project changes;
|
||||
`44ce30c4287df586c2a8b9ded49db3b53dc54a7d` merges current main and the four
|
||||
verified test-fixture fixes. The push to `main` was independently confirmed by
|
||||
`git ls-remote`. Publication did not install software on Athena.
|
||||
|
||||
Implementation sources are the adjacent SOUL, own skills and scoped recipes.
|
||||
Actual new-bot, SSH/Git, model and native-client results will be recorded after
|
||||
execution. No success is claimed merely from writing these files.
|
||||
The official `profiles.create` RPC created a fresh profile with `no_skills`,
|
||||
`no_alias` and `mirror_credentials=False`. The running multiplexer hot-added it.
|
||||
No gateway, container, model, host or client was restarted. `profiles.configure`
|
||||
set the title/group and exact positive toolset list. The new profile owns:
|
||||
|
||||
- Profile `/opt/data/profiles/athena-deck`, title **Athena Deck**, group **Privat**.
|
||||
- Default `gpt-6.1-sol`, provider `openai-codex`, transport `codex_responses`,
|
||||
medium reasoning, no fallback model. The existing central login is inherited;
|
||||
no profile-local OAuth `auth.json` was copied or created.
|
||||
- Checkout `workspace/Athena-Deck`, branch `main`, own native project
|
||||
`p_03ec2a21`, own terminal `home`, browser data and XDG desktop settings.
|
||||
- Exactly eleven CLI/API toolsets: terminal, file, web, browser, vision, skills,
|
||||
todo, memory, session_search, clarify, code_execution. GUI adds only its native
|
||||
catalog/project/desktop_ui facilities. No MCPs, cron jobs or notification hooks.
|
||||
- Three own Athena skills plus the existing generic codebase-inspection and
|
||||
systematic-debugging skills. No foreign project notes, chats or memories.
|
||||
- Existing shared speech routes, without copies of STT/TTS sections. The fresh
|
||||
bot's own automatic-readout preference remains off; it can be enabled normally.
|
||||
|
||||
The operator-supplied Mac Athena key was streamed directly into
|
||||
`workspace/.ssh/athena_key`, outside Git, as UID99/GID100, mode0600, with a
|
||||
0700 directory. Neither key contents nor token values entered a recipe, command
|
||||
argument, log or Git. Host trust uses the existing Mac's already trusted Athena
|
||||
and Gitea host records; strict checking remains enabled. The own SSH config is
|
||||
selected explicitly through `home/.local/bin/athena-ssh` and repository-local
|
||||
`core.sshCommand`. Git author identity matches the existing operator checkout;
|
||||
the setup did not invent a contact address. No other bot's key was copied.
|
||||
|
||||
| Acceptance | Observed result |
|
||||
| --- | --- |
|
||||
| Independent profile/title/group/model/project/cwd checks | 23 assertions passed; own runtime resolver selects OpenAI Codex. |
|
||||
| Athena SSH | New profile's helper returned remote identity `root`; read-only. |
|
||||
| Git read and write negotiation | Clone and `push --dry-run HEAD:main` passed; no probecommit. |
|
||||
| Native remote Git API | Status, review list and actual synthetic diff each HTTP200; exact test text verified. Short-lived profile tickets were not stored. |
|
||||
| Sol/tool turn | Own skill + three repo documents + Git read; five tool calls, no errors. Correct v0.2.6/engine0.1.51/source pin and both GPU models found. |
|
||||
| Model-test usage | 38358 input (22528 cache-read), 363 output tokens; 16.05s overall, 10.358s reported turn duration. This is not a Strata benchmark. |
|
||||
| Native Mac v0.22.5 | Bot visible under Privat, GPT-6.1 Sol/Med, own checkout/file tree and synthetic changed-file entry verified. |
|
||||
| Actual visible native diff | **Not passed:** diff content remains visually blank, matching the existing other-Dev-bot issue. Backend diff is correct; no client patch, replacement UI or restart. |
|
||||
| Cleanup | Exact synthetic test file removed after content verification; new checkout clean. |
|
||||
| Existing profiles | All 14 preexisting config hashes and the shared gateway instance unchanged. |
|
||||
| Athena continuity | Same Deck start timestamp and Strata PID488464; profiles, endpoint, audio-policy and CPU-partition file hashes unchanged. Qwen stays loaded. |
|
||||
|
||||
The current fleet audit covers all 15 profiles: **320/322 assertions passed**.
|
||||
All new Athena-Deck assertions passed. The two existing discrepancies were left
|
||||
untouched: Solid Crafter now includes `autodesk-fusion` beyond the audit's older
|
||||
`solidcraft`-only baseline, and the preexisting Mac SSH profile's config mode
|
||||
is broader than0600. These are not silently classified as new setup regressions
|
||||
or repaired as part of this task. Profile hashes confirm no configuration drift
|
||||
was introduced here. The audit roster now explicitly classifies both the Mac
|
||||
SSH profile and Athena Deck.
|
||||
|
||||
**Full client acceptance remains incomplete because of the visible diff issue.**
|
||||
Configured browser separation is verified; no browser/desktop startup test or
|
||||
fresh restart/restore test was performed. Historical TTS records are published,
|
||||
but no current Anna/Kikiri work or activation authority was transferred.
|
||||
|
||||
Native prerequisites for this optional Hermes integration: the existing
|
||||
compatible official Hermes gateway/runtime, Git/OpenSSH, persistent profile
|
||||
@@ -48,3 +106,26 @@ For restore recreate the own profile with the documented settings, restore the
|
||||
private key through the protected profile backup, clone Git, then recheck
|
||||
ownership, model/provider, native project and permissions. Git contains no key.
|
||||
A fresh full restore/restart test is outside this no-restart task.
|
||||
|
||||
## Reproduction notes
|
||||
|
||||
`recipes/bootstrap.py` is a fresh-profile-only operator recipe, not a generic
|
||||
installer. Before executing, provide `UPLOADS` from this directory's SOUL/skills
|
||||
and `KNOWN_HOSTS` from already verified operator host records; it refuses an
|
||||
existing profile. Supply private key material separately via protected stdin,
|
||||
never as a literal recipe variable, argument or Git file. Clone only the exact
|
||||
documented remote, configure the explicit own SSH command and verified Git
|
||||
author identity, then use the official `projects.create` RPC with this profile,
|
||||
name/path above and `use=False`; no other active project is switched.
|
||||
|
||||
Run all Hermes helpers as the profile data owner (99:100), from `/opt/hermes`
|
||||
using its existing Python. `hermes_yaml` is the installed supported YAML wrapper;
|
||||
do not install a second YAML library into Hermes. `recipes/bot_read_test.py`
|
||||
starts only one authorized synthetic read-only CLI turn and retains no reasoning
|
||||
or full tool output. `recipes/verify.py` verifies the scoped native Git API while
|
||||
the explicitly synthetic `ATHENA_DECK_SETUP_DIFF_CHECK.txt` exists. Afterwards
|
||||
remove only that exact content-checked test file. Preserve unrelated edits.
|
||||
|
||||
The optional Hermes integration depends on an existing compatible gateway and
|
||||
protected credentials; this does not claim a fresh native Deck installation or
|
||||
a turnkey private-key restore from Git. No new backup was created.
|
||||
@@ -0,0 +1,85 @@
|
||||
{
|
||||
"date": "2026-10-27",
|
||||
"profiles": 15,
|
||||
"checks": 322,
|
||||
"passed": 320,
|
||||
"failed": [
|
||||
{
|
||||
"check": "role_mcp_scope",
|
||||
"passed": false,
|
||||
"profile": "solid-crafter"
|
||||
},
|
||||
{
|
||||
"check": "private_mode_config.yaml",
|
||||
"passed": false,
|
||||
"profile": "ssh-mikesmacbookprom4-1cdce964"
|
||||
}
|
||||
],
|
||||
"athena_deck": {
|
||||
"profile": "athena-deck",
|
||||
"role": "athena-development",
|
||||
"backend": "local",
|
||||
"enabled_mcp": [],
|
||||
"approved_hook_count": 0,
|
||||
"auto_tts": false,
|
||||
"memory_files": {
|
||||
"MEMORY.md": true,
|
||||
"USER.md": true
|
||||
},
|
||||
"gui_toolsets": [
|
||||
"browser",
|
||||
"catalog",
|
||||
"clarify",
|
||||
"code_execution",
|
||||
"desktop_ui",
|
||||
"file",
|
||||
"memory",
|
||||
"project",
|
||||
"session_search",
|
||||
"skills",
|
||||
"terminal",
|
||||
"todo",
|
||||
"vision",
|
||||
"web"
|
||||
],
|
||||
"cli_toolsets": [
|
||||
"browser",
|
||||
"clarify",
|
||||
"code_execution",
|
||||
"file",
|
||||
"memory",
|
||||
"session_search",
|
||||
"skills",
|
||||
"terminal",
|
||||
"todo",
|
||||
"vision",
|
||||
"web"
|
||||
],
|
||||
"api_toolsets": [
|
||||
"browser",
|
||||
"clarify",
|
||||
"code_execution",
|
||||
"file",
|
||||
"memory",
|
||||
"session_search",
|
||||
"skills",
|
||||
"terminal",
|
||||
"todo",
|
||||
"vision",
|
||||
"web"
|
||||
]
|
||||
},
|
||||
"no_existing_config_changes": true,
|
||||
"no_restart": true,
|
||||
"visible_native_diff_passed": false,
|
||||
"synthetic_file_removed": true,
|
||||
"same_strata_pid": 488464,
|
||||
"same_deck_started": "2026-10-27T11:19:49.796388945Z",
|
||||
"same_hermes_started": "2026-10-27T10:12:31.908648376Z",
|
||||
"athena_state_hashes_unchanged": [
|
||||
"profiles.json",
|
||||
"endpoint.json",
|
||||
"audio-policy.json",
|
||||
"cpu-partition.json"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"profile": "athena-deck",
|
||||
"checks": {
|
||||
"previous_profile_configs_unchanged": true,
|
||||
"same_shared_gateway_instance": true,
|
||||
"config_valid": true,
|
||||
"model": true,
|
||||
"provider": true,
|
||||
"transport": true,
|
||||
"runtime_openai_route": true,
|
||||
"no_fallback": true,
|
||||
"no_mcp": true,
|
||||
"no_auth_copy": true,
|
||||
"no_notification_hooks": true,
|
||||
"inherited_speech": true,
|
||||
"working_directory": true,
|
||||
"own_terminal_home": true,
|
||||
"exact_tools": true,
|
||||
"private_.ssh": true,
|
||||
"private_athena_key": true,
|
||||
"bot_title": true,
|
||||
"private_group": true,
|
||||
"native_project": true,
|
||||
"git_origin": true,
|
||||
"main_branch": true,
|
||||
"git_api": true
|
||||
},
|
||||
"failed": [],
|
||||
"existing_configs_changed": [],
|
||||
"git_api": {
|
||||
"status": {
|
||||
"http": 200
|
||||
},
|
||||
"review/list": {
|
||||
"http": 200
|
||||
},
|
||||
"review/diff": {
|
||||
"http": 200,
|
||||
"synthetic_text_verified": true
|
||||
}
|
||||
},
|
||||
"project_id": "p_03ec2a21",
|
||||
"head": "44ce30c4287df586c2a8b9ded49db3b53dc54a7d",
|
||||
"restart_or_inference_performed": false
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
"""Fresh profile only, official create/config APIs, no restart or model request.
|
||||
|
||||
UPLOADS and KNOWN_HOSTS are supplied by the local operator; no private key,
|
||||
OAuth token or existing profile configuration is embedded in this source.
|
||||
"""
|
||||
import asyncio,hashlib,json,os,shutil,sys
|
||||
from pathlib import Path
|
||||
sys.path.insert(0,'/opt/hermes')
|
||||
import hermes_yaml as yaml
|
||||
from utils import atomic_yaml_write
|
||||
from hermes_cli.profiles import write_profile_meta
|
||||
from hermes_cli.gateway_runtime import discover_gateway_endpoint
|
||||
from hermes_cli.gateway_client import connect_gateway
|
||||
from hermes_cli.config import validate_config_structure
|
||||
|
||||
BASE=Path('/opt/data');P=BASE/'profiles/athena-deck'
|
||||
TOOLS=['terminal','file','web','browser','vision','skills','todo','memory',
|
||||
'session_search','clarify','code_execution']
|
||||
|
||||
def fingerprints():
|
||||
homes=[BASE,*sorted((BASE/'profiles').iterdir())]
|
||||
return {p.name:hashlib.sha256((p/'config.yaml').read_bytes()).hexdigest()
|
||||
for p in homes if (p/'config.yaml').is_file() and p!=P}
|
||||
|
||||
async def main():
|
||||
assert not P.exists(),'Existing profile is never overwritten'
|
||||
before=fingerprints();d=discover_gateway_endpoint(BASE)
|
||||
assert d.state=='ready','No gateway is started by this helper'
|
||||
os.umask(0o077)
|
||||
async with connect_gateway(d.endpoint) as client:
|
||||
rows=(await client.rpc('profiles.list',include_sessions=False))['profiles']
|
||||
private=next(r['ui_meta']['hermes-bots'] for r in rows
|
||||
if r.get('ui_meta',{}).get('hermes-bots',{}).get('sectionName')=='Privat')
|
||||
made=await client.rpc('profiles.create',name=P.name,no_alias=True,
|
||||
no_skills=True,mirror_credentials=False,soul=UPLOADS['SOUL.md'],
|
||||
description='Spezialist für Athena Deck, Strata und den Athena-Server.')
|
||||
assert made.get('ok'),str(made)
|
||||
(P/'.athena-deck-operator-created').write_text('2026-10-27\n')
|
||||
P.chmod(0o700)
|
||||
for sub in ('home','home/.ssh','home/.local/bin','workspace','workspace/.ssh','cache','memories','skills'):
|
||||
(P/sub).mkdir(parents=True,exist_ok=True);(P/sub).chmod(0o700)
|
||||
for relative,content in UPLOADS.items():
|
||||
destination=P/relative
|
||||
assert destination.is_relative_to(P) and '..' not in destination.parts
|
||||
destination.parent.mkdir(parents=True,exist_ok=True)
|
||||
destination.write_text(content);destination.chmod(0o600)
|
||||
for name in ('codebase-inspection','systematic-debugging'):
|
||||
source=BASE/'skills/software-development'/name
|
||||
if not (source/'SKILL.md').is_file():source=Path('/opt/hermes/skills/software-development')/name
|
||||
assert (source/'SKILL.md').is_file(),'Required existing coding skill missing: '+name
|
||||
shutil.copytree(source,P/'skills/software-development'/name)
|
||||
cfg={
|
||||
'model':{'default':'gpt-6.1-sol','provider':'openai-codex','api_mode':'codex_responses'},
|
||||
'fallback_model':[],
|
||||
'toolsets':TOOLS,'platform_toolsets':{'cli':TOOLS,'api_server':TOOLS},
|
||||
'mcp_servers':{},
|
||||
'agent':{'reasoning_effort':'medium','disabled_toolsets':[
|
||||
'image_gen','video_gen','tts','cronjob','computer_use','connections',
|
||||
'kanban','delegation','discord','discord_admin','x_search']},
|
||||
'terminal':{'backend':'local','cwd':str(P/'workspace/Athena-Deck'),
|
||||
'home_mode':'profile','timeout':180,'shell_init_files':[str(P/'home/.profile')]},
|
||||
'browser':{'headed':True},
|
||||
'bot_desktop':{'placement':'gateway','auto_start':True},
|
||||
'web':{'search_backend':'exa','extract_backend':'exa'},
|
||||
'memory':{'memory_enabled':True,'memory_char_limit':2200,'user_char_limit':1375},
|
||||
'approvals':{'mode':'smart'},
|
||||
}
|
||||
assert not validate_config_structure(cfg),'Fresh configuration does not validate'
|
||||
atomic_yaml_write(P/'config.yaml',cfg);(P/'config.yaml').chmod(0o600)
|
||||
write_profile_meta(P,display_name='Athena Deck')
|
||||
configured=await client.rpc('profiles.configure',name=P.name,
|
||||
model='gpt-6.1-sol',provider='openai-codex',
|
||||
ui_meta={'hermes-bots':{'title':'Athena Deck',
|
||||
'description':'Athena-Server, Deck-Entwicklung und Strata.',
|
||||
'sectionId':private['sectionId'],'sectionName':'Privat'}},
|
||||
enabled_toolsets=TOOLS,enabled_mcp_servers=[])
|
||||
assert configured.get('ok') and not configured.get('confirm_required'),str(configured)
|
||||
assert configured.get('applied',{}).get('model')
|
||||
(P/'home/.ssh/known_hosts').write_text(KNOWN_HOSTS)
|
||||
(P/'home/.ssh/known_hosts').chmod(0o600)
|
||||
(P/'home/.ssh/config').write_text(f'''Host athena
|
||||
HostName 192.168.1.212
|
||||
User root
|
||||
Port 22
|
||||
Host 192.168.1.2
|
||||
User git
|
||||
Port 33
|
||||
Host athena 192.168.1.2
|
||||
IdentityFile {P}/workspace/.ssh/athena_key
|
||||
IdentitiesOnly yes
|
||||
IdentityAgent none
|
||||
BatchMode yes
|
||||
StrictHostKeyChecking yes
|
||||
UserKnownHostsFile {P}/home/.ssh/known_hosts
|
||||
ControlMaster no
|
||||
''')
|
||||
(P/'home/.ssh/config').chmod(0o600)
|
||||
(P/'home/.local/bin/athena-ssh').write_text(
|
||||
'#!/bin/sh\nexec ssh -F '+str(P/'home/.ssh/config')+' athena "$@"\n')
|
||||
(P/'home/.local/bin/athena-ssh').chmod(0o700)
|
||||
(P/'home/.profile').write_text('''# Own profile paths only; no credentials.
|
||||
export XDG_CACHE_HOME="$HERMES_HOME/cache"
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
''')
|
||||
(P/'home/.bashrc').write_text('. "$HOME/.profile"\n')
|
||||
(P/'memories/MEMORY.md').write_text('Athena Deck specialist on the NAS gateway. Load athena-deck-project, athena-strata and athena-maintenance, then docs/ATHENA_HANDOFF.md in the own checkout. Qwen stays loaded; no restart/unload/deployment without Michael\'s explicit Go.\n')
|
||||
(P/'memories/USER.md').write_text('Michael (Mike), German by default. Prefer concise factual reports: result, actual checks, open limitations. No unsolicited notifications, tests or scheduled work.\n')
|
||||
# Existing launcher is shared code, but each new desktop gets only its
|
||||
# own XDG mapping and browser data. Do not run the fleet-wide installer.
|
||||
launcher=BASE/'.local/bin/hermes-screen-browser'
|
||||
assert launcher.is_file(),'Existing approved browser helper missing'
|
||||
xdg=P/'bot-desktop/xdg';helpers=xdg/'.local-share/xfce4/helpers'
|
||||
helpers.mkdir(parents=True,exist_ok=True)
|
||||
(helpers/'hermes-screen-browser.desktop').write_text(
|
||||
'[Desktop Entry]\nVersion=1.0\nType=X-XFCE-Helper\nName=Hermes Screen Browser\n'
|
||||
'Icon=internet-web-browser\nStartupNotify=false\nX-XFCE-Category=WebBrowser\n'
|
||||
f'X-XFCE-Binaries={launcher};\nX-XFCE-Commands=%B;\nX-XFCE-CommandsWithParameter=%B "%s";\n')
|
||||
rc=xdg/'xfce4/helpers.rc';rc.parent.mkdir(parents=True,exist_ok=True)
|
||||
rc.write_text('WebBrowser=hermes-screen-browser\n')
|
||||
(xdg/'mimeapps.list').write_text('[Default Applications]\nx-scheme-handler/http=xfce4-web-browser.desktop\nx-scheme-handler/https=xfce4-web-browser.desktop\ntext/html=xfce4-web-browser.desktop\n')
|
||||
assert not (P/'auth.json').exists(),'No profile-local OAuth credentials expected'
|
||||
assert fingerprints()==before,'An existing profile config changed during setup'
|
||||
final=yaml.safe_load((P/'config.yaml').read_text())
|
||||
assert final['model']['default']=='gpt-6.1-sol'
|
||||
assert final['model']['provider']=='openai-codex'
|
||||
assert final['model']['api_mode']=='codex_responses'
|
||||
result={'created':True,'profile':P.name,'display_name':'Athena Deck',
|
||||
'group':'Privat','model':final['model'],'native_toolsets':TOOLS,
|
||||
'mcp_servers':[],'previous_profile_configs_unchanged':True,
|
||||
'previous_profile_config_hashes':before,'shared_gateway_instance':d.endpoint.instance_id,
|
||||
'no_auth_copy':True,'key_installed':False,'no_restart':True}
|
||||
(P/'cache/setup-initial.json').write_text(json.dumps(result,indent=2))
|
||||
print(json.dumps({k:v for k,v in result.items() if k!='previous_profile_config_hashes'},ensure_ascii=False))
|
||||
asyncio.run(main())
|
||||
@@ -0,0 +1,84 @@
|
||||
"""One authorized synthetic Sol/tool turn; retain no reasoning or private output.
|
||||
|
||||
Run as the Hermes data owner. Starts only this scoped CLI turn, not a gateway.
|
||||
The watchdog terminates only its own test subprocess after five minutes.
|
||||
"""
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
import threading
|
||||
import time
|
||||
|
||||
P = Path('/opt/data/profiles/athena-deck')
|
||||
R = P / 'workspace/Athena-Deck'
|
||||
prompt = (
|
||||
'Einmaliger lesender Einrichtungstest. Lade deinen Skill athena-deck-project. '
|
||||
'Prüfe dann im eigenen Repository AGENTS.md, docs/ATHENA_HANDOFF.md und '
|
||||
'strata_sources.json. Antworte knapp auf Deutsch mit dem tatsächlichen '
|
||||
'Repository-Remote, Strata-Release/Engine-Pin und den beiden GPU-Modellen. '
|
||||
'Nutze ausschließlich lesende lokale Datei-/Terminalwerkzeuge. Keine SSH-, '
|
||||
'Netzwerk-, MCP- oder Modellanfragen, keine Datei-, Memory- oder Skilländerungen, '
|
||||
'keine Zeitpläne, Benachrichtigungen, Neustarts oder Modellwechsel. '
|
||||
'Keine privaten Konfigurationen oder Zugangsdaten lesen.'
|
||||
)
|
||||
env = dict(os.environ, HERMES_HOME=str(P), HOME=str(P/'home'))
|
||||
cmd = ['/opt/hermes/bin/hermes', '-p', P.name, 'chat', '-c',
|
||||
'Athena Deck: lesender Einrichtungstest', '--create-if-missing', '-Q',
|
||||
'--in', str(R), '--max-turns', '6', '--format', 'stream-json', '--query-file', '-']
|
||||
p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE, text=True, env=env, cwd=R)
|
||||
stderr_count = [0]
|
||||
|
||||
def drain():
|
||||
for _ in p.stderr:
|
||||
stderr_count[0] += 1
|
||||
|
||||
thread = threading.Thread(target=drain, daemon=True)
|
||||
thread.start()
|
||||
timed_out = threading.Event()
|
||||
|
||||
def expire():
|
||||
timed_out.set()
|
||||
p.terminate()
|
||||
|
||||
watchdog = threading.Timer(300, expire)
|
||||
watchdog.daemon = True
|
||||
watchdog.start()
|
||||
p.stdin.write(prompt)
|
||||
p.stdin.close()
|
||||
out = {'profile': P.name, 'read_only_test': True, 'tool_calls': [], 'tool_results': []}
|
||||
started = time.monotonic()
|
||||
try:
|
||||
for line in p.stdout:
|
||||
try:
|
||||
event = json.loads(line)
|
||||
except ValueError:
|
||||
continue
|
||||
kind = event.get('type')
|
||||
if kind == 'system':
|
||||
out['init'] = {k: event.get(k) for k in ('model', 'session_id')}
|
||||
elif kind == 'tool_use':
|
||||
# Only public skill name, never commands, file contents or reasoning.
|
||||
args = event.get('input') or {}
|
||||
safe = {k: str(args[k])[:120] for k in ('name', 'skill', 'skill_name') if k in args}
|
||||
out['tool_calls'].append({'name': event.get('name'), 'input': safe})
|
||||
print(json.dumps({'tool_started': event.get('name'), 'input': safe}), flush=True)
|
||||
elif kind == 'tool_result':
|
||||
out['tool_results'].append({'name': event.get('name'),
|
||||
'is_error': event.get('is_error', False)})
|
||||
elif kind == 'result':
|
||||
out['result'] = {k: event.get(k) for k in
|
||||
('session_id', 'exit_code', 'text', 'tokens', 'duration_ms')}
|
||||
code = p.wait(timeout=10)
|
||||
finally:
|
||||
watchdog.cancel()
|
||||
if p.poll() is None:
|
||||
p.terminate()
|
||||
thread.join(timeout=2)
|
||||
out.update(exit_code=code, timed_out=timed_out.is_set(),
|
||||
wall_seconds=round(time.monotonic()-started, 2),
|
||||
stderr_lines_discarded=stderr_count[0])
|
||||
(P/'cache/bot-read-test.json').write_text(json.dumps(out, indent=2, ensure_ascii=False)+'\n')
|
||||
print(json.dumps(out, ensure_ascii=False), flush=True)
|
||||
raise SystemExit(code or int(timed_out.is_set()))
|
||||
@@ -0,0 +1,100 @@
|
||||
"""Read-only acceptance of this profile; never prints credentials or chats.
|
||||
|
||||
Use the existing gateway's owner-authenticated client. No server is started.
|
||||
The optional synthetic native-Diff file must be present for the Git API check.
|
||||
"""
|
||||
import asyncio
|
||||
import hashlib
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import stat
|
||||
import subprocess
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
|
||||
import hermes_yaml as yaml
|
||||
from agent.secret_scope import build_profile_secret_scope, set_secret_scope, reset_secret_scope
|
||||
from hermes_constants import set_hermes_home_override, reset_hermes_home_override
|
||||
from hermes_cli.config import load_config, validate_config_structure
|
||||
from hermes_cli.gateway_runtime import discover_gateway_endpoint
|
||||
from hermes_cli.gateway_client import connect_gateway, _session_ticket
|
||||
from hermes_cli.runtime_provider import resolve_runtime_provider
|
||||
|
||||
P = Path('/opt/data/profiles/athena-deck')
|
||||
R = P/'workspace/Athena-Deck'
|
||||
TOOLS = {'terminal', 'file', 'web', 'browser', 'vision', 'skills', 'todo',
|
||||
'memory', 'session_search', 'clarify', 'code_execution'}
|
||||
|
||||
async def main():
|
||||
d = discover_gateway_endpoint(P)
|
||||
assert d.state == 'ready', 'No gateway is started by this check'
|
||||
baseline = json.loads((P/'cache/setup-initial.json').read_text())
|
||||
checks = {}
|
||||
changes = []
|
||||
for name, expected in baseline['previous_profile_config_hashes'].items():
|
||||
home = Path('/opt/data') if name == 'data' else Path('/opt/data/profiles')/name
|
||||
if hashlib.sha256((home/'config.yaml').read_bytes()).hexdigest() != expected:
|
||||
changes.append(name)
|
||||
checks['previous_profile_configs_unchanged'] = not changes
|
||||
checks['same_shared_gateway_instance'] = d.endpoint.instance_id == baseline['shared_gateway_instance']
|
||||
raw = yaml.safe_load((P/'config.yaml').read_text())
|
||||
ht = set_hermes_home_override(P)
|
||||
st = set_secret_scope(build_profile_secret_scope(P), profile_home=str(P))
|
||||
try:
|
||||
cfg = load_config()
|
||||
checks['config_valid'] = not validate_config_structure(cfg)
|
||||
checks['model'] = raw['model']['default'] == 'gpt-6.1-sol'
|
||||
checks['provider'] = raw['model']['provider'] == 'openai-codex'
|
||||
checks['transport'] = raw['model']['api_mode'] == 'codex_responses'
|
||||
route = resolve_runtime_provider(requested='openai-codex', target_model='gpt-6.1-sol')
|
||||
checks['runtime_openai_route'] = route.get('provider') == 'openai-codex' and 'chatgpt.com' in route.get('base_url', '')
|
||||
checks['no_fallback'] = not raw.get('fallback_model')
|
||||
checks['no_mcp'] = not (cfg.get('mcp_servers') or {})
|
||||
checks['no_auth_copy'] = not (P/'auth.json').exists()
|
||||
checks['no_notification_hooks'] = not raw.get('hooks')
|
||||
checks['inherited_speech'] = 'stt' not in raw and 'tts' not in raw
|
||||
checks['working_directory'] = cfg['terminal']['cwd'] == str(R)
|
||||
checks['own_terminal_home'] = cfg['terminal']['home_mode'] == 'profile'
|
||||
checks['exact_tools'] = all(set(cfg['platform_toolsets'][k]) == TOOLS for k in ('cli', 'api_server'))
|
||||
finally:
|
||||
reset_secret_scope(st)
|
||||
reset_hermes_home_override(ht)
|
||||
for path, mode in ((P/'workspace/.ssh', 0o700), (P/'workspace/.ssh/athena_key', 0o600)):
|
||||
info = path.stat()
|
||||
checks['private_'+path.name] = stat.S_IMODE(info.st_mode) == mode and info.st_uid == os.geteuid()
|
||||
async with connect_gateway(d.endpoint) as c:
|
||||
rows = (await c.rpc('profiles.list', include_sessions=False))['profiles']
|
||||
row = next(x for x in rows if x.get('name') == P.name)
|
||||
meta = row.get('ui_meta', {}).get('hermes-bots', {})
|
||||
checks['bot_title'] = meta.get('title') == 'Athena Deck'
|
||||
checks['private_group'] = meta.get('sectionName') == 'Privat'
|
||||
projects = (await c.rpc('projects.list', profile=P.name))['projects']
|
||||
project = next(x for x in projects if x.get('primary_path') == str(R))
|
||||
checks['native_project'] = project.get('name') == 'Athena Deck'
|
||||
git = lambda *args: subprocess.check_output(['git', '-C', str(R), *args], text=True).strip()
|
||||
checks['git_origin'] = git('remote', 'get-url', 'origin') == 'ssh://git@192.168.1.2:33/michael/Athena-Deck.git'
|
||||
checks['main_branch'] = git('branch', '--show-current') == 'main'
|
||||
api = {}
|
||||
for endpoint, extra in (
|
||||
('status', {}), ('review/list', {'scope': 'uncommitted'}),
|
||||
('review/diff', {'scope': 'uncommitted', 'file': 'ATHENA_DECK_SETUP_DIFF_CHECK.txt'}),
|
||||
):
|
||||
ticket = await asyncio.to_thread(_session_ticket, P, d.endpoint, purpose='native-http')
|
||||
query = urllib.parse.urlencode({'path': str(R), **extra})
|
||||
request = urllib.request.Request(d.endpoint.api_origin+'/api/git/'+endpoint+'?'+query,
|
||||
headers={'x-hermes-gateway-ticket': ticket})
|
||||
with urllib.request.urlopen(request, timeout=20) as response:
|
||||
body = json.load(response)
|
||||
api[endpoint] = {'http': response.status}
|
||||
if endpoint == 'review/diff':
|
||||
api[endpoint]['synthetic_text_verified'] = 'Temporary Athena Deck native Git diff acceptance.' in body.get('diff', '')
|
||||
checks['git_api'] = all(x['http'] == 200 for x in api.values()) and api['review/diff']['synthetic_text_verified']
|
||||
result = {'profile': P.name, 'checks': checks, 'failed': [k for k,v in checks.items() if not v],
|
||||
'existing_configs_changed': changes, 'git_api': api, 'project_id': project['id'],
|
||||
'head': git('rev-parse', 'HEAD'), 'restart_or_inference_performed': False}
|
||||
(P/'cache/setup-verification.json').write_text(json.dumps(result, indent=2)+'\n')
|
||||
print(json.dumps(result))
|
||||
raise SystemExit(bool(result['failed']))
|
||||
|
||||
asyncio.run(main())
|
||||
@@ -1,5 +1,13 @@
|
||||
# Hermes fleet acceptance — 26 October 2026
|
||||
|
||||
27 October follow-up: the audit roster also classifies the existing Mac SSH
|
||||
profile and new `athena-deck` development/operations specialist. The latter has
|
||||
the same eleven coding toolsets and no MCPs. The later 15-profile result is
|
||||
320/322 assertions passed, with two preexisting differences left unchanged;
|
||||
see [Athena Deck setup](../hermes-athena-deck-2026-10-27/README.md).
|
||||
The original dated acceptance below is historical, not a claim that the current
|
||||
fleet still has only thirteen profiles or zero differences.
|
||||
|
||||
Michael requested a whole-system comparison and correction, covering every
|
||||
profile rather than repairing only the profile that happened to log a warning.
|
||||
The current system is the NAS `Hermes-Agent-Desktop` gateway and its connected
|
||||
|
||||
@@ -30,6 +30,7 @@ CODE = {'terminal', 'file', 'web', 'browser', 'vision', 'skills', 'todo', 'memor
|
||||
'session_search', 'clarify', 'code_execution'}
|
||||
ROLES = {
|
||||
'default': ('general', None),
|
||||
'athena-deck': ('athena-development', set()),
|
||||
'belanna-storres': ('nas', {'HomeServer', 'syncthing'}),
|
||||
'horizon-dev': ('coding', set()),
|
||||
'jean-luc-picode': ('coding', {'gitea', 'rea'}),
|
||||
@@ -42,6 +43,7 @@ ROLES = {
|
||||
'ssh-infvhost-2-731791df': ('ssh-server', set()),
|
||||
'ssh-pool-vdi-ff978f02': ('ssh-server', set()),
|
||||
'ssh-scc-gg3653-01-76dcf38d': ('ssh-server', set()),
|
||||
'ssh-mikesmacbookprom4-1cdce964': ('ssh-server', set()),
|
||||
}
|
||||
|
||||
|
||||
@@ -164,7 +166,7 @@ def main():
|
||||
cli = set(_get_platform_tools(cfg, 'cli'))
|
||||
api = set(_get_platform_tools(cfg, 'api_server'))
|
||||
record.update(gui_toolsets=sorted(gui), cli_toolsets=sorted(cli), api_toolsets=sorted(api))
|
||||
if name in ('horizon-dev', 'pruefungs-vdi-dev'):
|
||||
if name in ('horizon-dev', 'pruefungs-vdi-dev', 'athena-deck'):
|
||||
check('coding_canonical_platform_keys', set(cfg['platform_toolsets']) == {'cli', 'api_server'}, name)
|
||||
check('coding_exact_cli_api_toolsets', cli == CODE and api == CODE, name)
|
||||
check('coding_gui_toolsets', gui <= CODE | {'catalog', 'project', 'desktop_ui'} and CODE <= gui, name)
|
||||
|
||||
Reference in new issue
Block a user