refactor: move app code into Max Avatar/ subfolder (monorepo prep for backend)

Step 1 of adding a backend proxy server (API keys held server-side instead
of shipped in the installer). Moves everything app-specific into
"Max Avatar/" via git mv (preserves history): src/, tests/, scripts/,
assets/, build/, resources/, package.json/-lock.json, electron-builder.yml,
electron.vite.config.ts, eslint.config.mjs, playwright.config.ts,
vitest.config.mts, sonar-project.properties, tsconfig*.json, Dockerfile,
.editorconfig/.env*/.gitignore/.prettier*.

CLAUDE.md, README.md, docs/, .claude/, .gitea/, .husky/, .vscode/, and the
docker-compose files stay at the repo root, since they'll apply to both the
app and the future backend.

No application code needed changes (all its internal paths are relative to
its own tree). Adjusted what referenced the old root from outside:
- .husky/pre-commit: cd into "Max Avatar" before lint-staged
- .gitea/workflows/*.yml: working-directory + cache-dependency-path +
  artifact paths + SonarQube projectBaseDir
- docker-compose.yml: build context -> ./Max Avatar
- Max Avatar/Dockerfile: node:20-alpine -> node:24-alpine (same node:sqlite
  issue already fixed elsewhere, never applied here before)
- .vscode/launch.json, README.md: updated paths/instructions

Verified from Max Avatar/ after the move: npm ci, typecheck, lint,
test:coverage (473/473, same coverage numbers), build, and dev all work
unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
william
2026-10-31 12:15:30 +01:00
co-authored by Claude Sonnet 5
parent 60e2fb26af
commit 1c2f002eb3
224 changed files with 135 additions and 18 deletions
+76
View File
@@ -0,0 +1,76 @@
import type { Mode } from '../mode/modeState'
// Repartition verrouillee dans docs/skills.md. Un skill absent de cette table n'est expose dans
// aucun mode (voir l'avertissement dans getSkillsForMode) : toute nouvelle competence doit y etre
// ajoutee explicitement.
export const SKILL_MODES: Record<string, Mode[]> = {
// Transversal : disponible dans les 3 modes, y compris Coach (aucun effet de bord systeme).
search_web: ['basic', 'coach', 'assistant'],
navigate_browser: ['basic', 'coach', 'assistant'],
read_browser_page: ['basic', 'coach', 'assistant'],
click_browser_element: ['basic', 'coach', 'assistant'],
go_back_browser: ['basic', 'coach', 'assistant'],
translate_browser_page: ['basic', 'coach', 'assistant'],
highlight_browser_text: ['basic', 'coach', 'assistant'],
adjust_mood: ['basic', 'coach', 'assistant'],
// Basic + herite par Coach (lecture seule, sans effet de bord).
check_system_memory: ['basic', 'coach', 'assistant'],
check_storage: ['basic', 'coach', 'assistant'],
check_battery_and_cpu: ['basic', 'coach', 'assistant'],
check_internet_connection: ['basic', 'coach', 'assistant'],
// Basic uniquement (herite par Assistant, jamais par Coach : actions avec effet de bord reel).
play_music: ['basic', 'assistant'],
open_app: ['basic', 'assistant'],
close_app: ['basic', 'assistant'],
open_notepad: ['basic', 'assistant'],
create_document: ['basic', 'assistant'],
create_powerpoint: ['basic', 'assistant'],
control_volume: ['basic', 'assistant'],
control_media_playback: ['basic', 'assistant'],
take_screenshot: ['basic', 'assistant'],
clipboard: ['basic', 'assistant'],
search_file: ['basic', 'assistant'],
set_reminder: ['basic', 'assistant'],
lock_screen: ['basic', 'assistant'],
empty_recycle_bin: ['basic', 'assistant'],
show_notification: ['basic', 'assistant'],
print_file: ['basic', 'assistant'],
create_folder: ['basic', 'assistant'],
create_file: ['basic', 'assistant'],
delete_file: ['basic', 'assistant'],
fill_browser_field: ['basic', 'assistant'],
// Exclusif Coach : mecanisme central de detection des blocages.
analyze_screen: ['coach'],
watch_camera: ['coach'],
track_concept_mastery: ['coach'],
ask_written_exercise: ['coach'],
record_subject_level: ['coach'],
draw_schema: ['coach'],
draw_flow_diagram: ['coach'],
research_topic: ['coach'],
get_course_plan: ['coach'],
generate_course_plan: ['coach'],
complete_module: ['coach'],
complete_subject: ['coach'],
write_module_content: ['coach'],
open_module_for_user: ['coach'],
// Exclusif Assistant.
get_last_meeting_summary: ['assistant'],
remember_info: ['assistant'],
forget_info: ['assistant']
}
export function getModesForSkill(skillName: string): Mode[] {
const modes = Object.hasOwn(SKILL_MODES, skillName)
? Reflect.get(SKILL_MODES, skillName)
: undefined
if (!modes) {
console.warn(`[mode] skill "${skillName}" absent de SKILL_MODES : expose dans aucun mode.`)
return []
}
return modes
}