The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
refactor(onboarding): drop profiles.remember_onboarding
alt-glitchcfc17affe8ce
diff --git a/apps/shared/src/gateway-contract.generated.ts b/apps/shared/src/gateway-contract.generated.tsindex 38a3ddf095b..72f4b4a2cd1 100644--- a/apps/shared/src/gateway-contract.generated.ts+++ b/apps/shared/src/gateway-contract.generated.ts@@ -2144,27 +2144,6 @@ export interface ProfilesGetAssetResult {size?: number | nulldata?: string | null}-export interface ProfilesRememberOnboardingParams {- profile?: string | null- answers?: OnboardingAnswers | null-}-/** ``tui_gateway/onboarding_personalization.py`` — the facts agreed during onboarding. */-export interface OnboardingAnswers {- name?: string | null- context?: string | null- theme?: string | null- accent?: string | null- layout?: string | null- focus?: string[] | null- connectors?: string[] | null- plugins?: string[] | null- [key: string]: unknown-}-export interface ProfilesRememberOnboardingResult {- saved?: boolean- profile?: string- target?: string-}/** Client→server method params / server→client request params. Unknown keys are rejected. */export type Params = Record<string, never>/** ``created`` is false when an existing setup profile was found (and returned untouched). */@@ -5299,8 +5278,6 @@ export interface RpcMethods {'profiles.get_asset': { params: ProfilesGetAssetParams; result: ProfilesGetAssetResult }/** Roster of profiles with previews so a client paints without N follow-up calls. */'profiles.list': { params: ProfilesListParams; result: ProfilesListResult }- /** Write the onboarding facts into the default profile's user memory and confirm they landed. */- 'profiles.remember_onboarding': { params: ProfilesRememberOnboardingParams; result: ProfilesRememberOnboardingResult }/** Store or clear a profile asset (avatar) atomically. */'profiles.set_asset': { params: ProfilesSetAssetParams; result: ProfilesSetAssetResult }/** Structured project facts for a cwd so UIs don't re-sniff the workspace. */@@ -5672,7 +5649,6 @@ export const RPC_METHODS = ['profiles.describe','profiles.get_asset','profiles.list',- 'profiles.remember_onboarding','profiles.set_asset','project.facts','projects.add_folder',diff --git a/apps/shared/src/gateway-contract.openrpc.json b/apps/shared/src/gateway-contract.openrpc.jsonindex 686ce7fade7..7caf4a68e75 100644--- a/apps/shared/src/gateway-contract.openrpc.json+++ b/apps/shared/src/gateway-contract.openrpc.json@@ -2598,24 +2598,6 @@}}},- {- "name": "profiles.remember_onboarding",- "summary": "Write the onboarding facts into the default profile's user memory and confirm they landed.",- "params": [- {- "name": "params",- "schema": {- "$ref": "#/components/schemas/ProfilesRememberOnboardingParams"- }- }- ],- "result": {- "name": "result",- "schema": {- "$ref": "#/components/schemas/ProfilesRememberOnboardingResult"- }- }- },{"name": "profiles.set_asset","summary": "Store or clear a profile asset (avatar) atomically.",@@ -19912,119 +19894,6 @@"title": "OkResult","type": "object"},- "OnboardingAnswers": {- "additionalProperties": true,- "description": "``tui_gateway/onboarding_personalization.py`` \u2014 the facts agreed during onboarding.",- "properties": {- "name": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "default": null,- "title": "Name"- },- "context": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "default": null,- "title": "Context"- },- "theme": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "default": null,- "title": "Theme"- },- "accent": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "default": null,- "title": "Accent"- },- "layout": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "default": null,- "title": "Layout"- },- "focus": {- "anyOf": [- {- "items": {- "type": "string"- },- "type": "array"- },- {- "type": "null"- }- ],- "default": null,- "title": "Focus"- },- "connectors": {- "anyOf": [- {- "items": {- "type": "string"- },- "type": "array"- },- {- "type": "null"- }- ],- "default": null,- "title": "Connectors"- },- "plugins": {- "anyOf": [- {- "items": {- "type": "string"- },- "type": "array"- },- {- "type": "null"- }- ],- "default": null,- "title": "Plugins"- }- },- "title": "OnboardingAnswers",- "type": "object"- },"OnboardingCatalogPlugin": {"additionalProperties": false,"description": "A catalog plugin curated for the onboarding card (``onboarding: true``) that this OS runs.\n``app_state`` is the pinned ``plugin.json`` declaration judged on this host; ``sentence`` names what\nis missing (empty when present or unknown).",@@ -24949,58 +24818,6 @@"title": "ProfilesListResult","type": "object"},- "ProfilesRememberOnboardingParams": {- "additionalProperties": false,- "properties": {- "profile": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "default": null,- "title": "Profile"- },- "answers": {- "anyOf": [- {- "$ref": "#/components/schemas/OnboardingAnswers"- },- {- "type": "null"- }- ],- "default": null- }- },- "title": "ProfilesRememberOnboardingParams",- "type": "object"- },- "ProfilesRememberOnboardingResult": {- "additionalProperties": false,- "properties": {- "saved": {- "default": true,- "title": "Saved",- "type": "boolean"- },- "profile": {- "default": "default",- "title": "Profile",- "type": "string"- },- "target": {- "default": "user",- "title": "Target",- "type": "string"- }- },- "title": "ProfilesRememberOnboardingResult",- "type": "object"- },"ProfilesSetAssetParams": {"additionalProperties": false,"description": "``data`` is a data URL or bare base64 (PNG/JPEG/WebP, sniffed); ``clear`` deletes instead.",diff --git a/tui_gateway/contracts/profiles_vault_complete_foreign_subagents.py b/tui_gateway/contracts/profiles_vault_complete_foreign_subagents.pyindex 09b2f12dd66..6f285ef624b 100644--- a/tui_gateway/contracts/profiles_vault_complete_foreign_subagents.py+++ b/tui_gateway/contracts/profiles_vault_complete_foreign_subagents.py@@ -352,36 +352,6 @@ method("profiles.get_asset", params=ProfilesGetAssetParams, result=ProfilesGetAsdoc="A profile asset as a data URL.")-class OnboardingAnswers(Params):- """``tui_gateway/onboarding_personalization.py`` — the facts agreed during onboarding."""-- name: str | None = None- context: str | None = None- theme: str | None = None- accent: str | None = None- layout: str | None = None- focus: list[str] | None = None- connectors: list[str] | None = None- plugins: list[str] | None = None- # The onboarding store may carry extra UI-only keys; the writer ignores unknown ones.- model_config = Params.model_config | {"extra": "allow"}---class ProfilesRememberOnboardingParams(ProfileParams):- answers: OnboardingAnswers | None = None---class ProfilesRememberOnboardingResult(Result):- saved: bool = True- profile: str = "default"- target: str = "user"---method("profiles.remember_onboarding", params=ProfilesRememberOnboardingParams,- result=ProfilesRememberOnboardingResult,- doc="Write the onboarding facts into the default profile's user memory and confirm they landed.")--# ── onboarding (methods_onboarding) ───────────────────────────────────────────────────────────diff --git a/tui_gateway/methods_profiles.py b/tui_gateway/methods_profiles.pyindex 6cde8d46a39..3ad67aaa0b2 100644--- a/tui_gateway/methods_profiles.py+++ b/tui_gateway/methods_profiles.py@@ -463,12 +463,6 @@ def _(rid, params: dict) -> dict:return _ok(rid, {"found": False})-@_profile_handler("profiles.remember_onboarding", 5067)-def _(rid, params: dict) -> dict:- from tui_gateway.onboarding_personalization import remember_onboarding- return _ok(rid, remember_onboarding(params.get("answers")))--def _mirror_secret(path, launch_home, name: str, wanted) -> bool:"""Copy the launch ``name`` file into the profile (0600) when it exists and ``wanted(src, dst)``."""src, dst = launch_home / name, path / namediff --git a/tui_gateway/onboarding_personalization.py b/tui_gateway/onboarding_personalization.pydeleted file mode 100644index 035ca0f85b9..00000000000--- a/tui_gateway/onboarding_personalization.py+++ /dev/null@@ -1,41 +0,0 @@-import json--from hermes_constants import reset_hermes_home_override, set_hermes_home_override-from hermes_cli.profiles import get_profile_dir-from tools.memory_tool import load_on_disk_store, memory_tool---def remember_onboarding(answers: dict) -> dict:- if not isinstance(answers, dict):- raise ValueError('Onboarding answers must be an object')- facts = []- for key, label in (('name', 'User prefers to be called'), ('context', 'Working on'),- ('theme', 'Desktop theme'), ('accent', 'Desktop accent'), ('layout', 'Desktop layout')):- value = answers.get(key)- if value is not None and not isinstance(value, str):- raise ValueError(f'{key} must be text')- if value and value.strip():- facts.append(f'{label}: {value.strip()}')- for key, label in (('focus', 'Focus areas'), ('connectors', 'Tools the user uses (not connection status)'),- ('plugins', 'Hermes plugins the user picked during onboarding (not install status)')):- values = answers.get(key, [])- if not isinstance(values, list) or not all(isinstance(value, str) for value in values):- raise ValueError(f'{key} must be a list of text')- if values := list(dict.fromkeys(value.strip() for value in values if value.strip())):- facts.append(f'{label}: {", ".join(values)}')- if not facts:- return {'saved': True, 'profile': 'default', 'target': 'user'}- content = 'Agreed during onboarding:\n' + '\n'.join(facts)- if len(content) > 2000:- raise ValueError('Onboarding facts are too long to remember')-- token = set_hermes_home_override(get_profile_dir('default'))- try:- result = json.loads(memory_tool(action='add', target='user', content=content, store=load_on_disk_store()))- if not result.get('success') or result.get('staged'):- raise ValueError(result.get('error') or result.get('message') or 'Memory was not saved')- if content not in load_on_disk_store().user_entries:- raise ValueError('Could not verify saved onboarding facts')- return {'saved': True, 'profile': 'default', 'target': 'user'}- finally:- reset_hermes_home_override(token)