ethagent 3.3.3 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (322) hide show
  1. package/.claude-plugin/marketplace.json +11 -0
  2. package/.claude-plugin/plugin.json +35 -0
  3. package/LICENSE +1 -1
  4. package/README.md +64 -104
  5. package/commands/ethagent.md +40 -0
  6. package/package.json +16 -16
  7. package/src/app/keybindings/KeybindingProvider.tsx +1 -6
  8. package/src/app/keybindings/types.ts +1 -6
  9. package/src/cli/ResetConfirmView.tsx +54 -53
  10. package/src/cli/demo.ts +86 -0
  11. package/src/cli/hookIo.ts +45 -0
  12. package/src/cli/main.tsx +94 -123
  13. package/src/cli/memoryGuard.ts +49 -0
  14. package/src/cli/reset.ts +28 -70
  15. package/src/cli/sessionStart.ts +33 -0
  16. package/src/cli/status.ts +46 -0
  17. package/src/cli/sync.ts +167 -0
  18. package/src/cli/syncAdapters/claude-code.ts +86 -0
  19. package/src/cli/syncAdapters/codex.ts +66 -0
  20. package/src/cli/syncAdapters/index.ts +45 -0
  21. package/src/cli/syncAdapters/managedBlock.ts +175 -0
  22. package/src/cli/syncAdapters/shared.ts +63 -0
  23. package/src/identity/continuity/envelopeParse.ts +20 -1
  24. package/src/identity/continuity/publicSkills.ts +3 -1
  25. package/src/identity/continuity/skills/publicSkillsSync.ts +2 -1
  26. package/src/identity/continuity/skills/scaffold.ts +5 -2
  27. package/src/identity/continuity/snapshots.ts +12 -5
  28. package/src/identity/continuity/storage/defaults.ts +20 -19
  29. package/src/identity/continuity/storage/status.ts +1 -1
  30. package/src/identity/ens/ensLookup/constants.ts +1 -1
  31. package/src/identity/manager/IdentityManager.tsx +33 -0
  32. package/src/identity/{hub → manager}/OperationalRoutes.tsx +37 -18
  33. package/src/identity/{hub → manager}/Routes.tsx +48 -34
  34. package/src/identity/{hub → manager}/continuity/ContinuityDashboardScreen.tsx +9 -19
  35. package/src/identity/{hub → manager}/continuity/RebackupStorageScreen.tsx +3 -3
  36. package/src/identity/manager/continuity/RecoveryConfirmScreen.tsx +102 -0
  37. package/src/identity/{hub → manager}/continuity/SavePromptScreen.tsx +2 -3
  38. package/src/identity/{hub → manager}/continuity/completion.ts +1 -1
  39. package/src/identity/{hub → manager}/continuity/effects.ts +1 -1
  40. package/src/identity/{hub → manager}/continuity/skills/DeleteSkillConfirmScreen.tsx +2 -2
  41. package/src/identity/{hub → manager}/continuity/skills/NewSkillScreen.tsx +0 -5
  42. package/src/identity/{hub → manager}/continuity/skills/NewSkillVisibilityScreen.tsx +4 -4
  43. package/src/identity/{hub → manager}/continuity/skills/SkillActionsScreen.tsx +6 -22
  44. package/src/identity/{hub → manager}/continuity/skills/SkillsTreeScreen.tsx +5 -17
  45. package/src/identity/{hub → manager}/continuity/snapshot.ts +1 -1
  46. package/src/identity/{hub → manager}/continuity/vault.ts +1 -1
  47. package/src/identity/{hub → manager}/create/CreateFlow.tsx +59 -32
  48. package/src/identity/{hub → manager}/create/effects.ts +19 -10
  49. package/src/identity/manager/create/importScan.ts +122 -0
  50. package/src/identity/{hub → manager}/custody/CustodyEditFlow.tsx +17 -61
  51. package/src/identity/{hub → manager}/custody/actions.ts +1 -15
  52. package/src/identity/{hub → manager}/custody/routes.tsx +20 -40
  53. package/src/identity/{hub → manager}/custody/transactions.ts +1 -0
  54. package/src/identity/{hub → manager}/custody/types.ts +1 -2
  55. package/src/identity/{hub → manager}/custody/useCustodyEffects.ts +1 -1
  56. package/src/identity/{hub → manager}/ens/EnsEditAdvancedScreens.tsx +2 -2
  57. package/src/identity/{hub → manager}/ens/EnsEditMaintenanceScreens.tsx +12 -23
  58. package/src/identity/{hub → manager}/ens/EnsEditReviewScreens.tsx +18 -42
  59. package/src/identity/{hub → manager}/ens/EnsEditRunners.tsx +1 -1
  60. package/src/identity/{hub → manager}/ens/EnsEditShared.tsx +0 -2
  61. package/src/identity/{hub → manager}/ens/EnsEditSimpleScreens.tsx +10 -19
  62. package/src/identity/{hub → manager}/ens/EnsFlow.tsx +133 -41
  63. package/src/identity/{hub → manager}/ens/EnsOperatorWalletsScreen.tsx +14 -19
  64. package/src/identity/{hub → manager}/ens/editCopy.ts +1 -14
  65. package/src/identity/{hub → manager}/profile/EditProfileFlow.tsx +99 -66
  66. package/src/identity/{hub → manager}/profile/effects.ts +1 -3
  67. package/src/identity/{hub → manager}/profile/operatorSave.ts +1 -1
  68. package/src/identity/{hub → manager}/profile/state.ts +1 -1
  69. package/src/identity/{hub/identityHubReducer.ts → manager/reducer.ts} +25 -26
  70. package/src/identity/{hub → manager}/restore/RestoreFlow.tsx +16 -24
  71. package/src/identity/{hub → manager}/restore/apply.ts +1 -1
  72. package/src/identity/{hub → manager}/restore/auth.ts +1 -1
  73. package/src/identity/{hub → manager}/restore/discover.ts +1 -1
  74. package/src/identity/{hub → manager}/restore/fetch.ts +1 -1
  75. package/src/identity/{hub → manager}/restore/restoreAdmin.ts +1 -1
  76. package/src/identity/{hub → manager}/restore/useRestoreEffects.ts +2 -9
  77. package/src/identity/{hub → manager}/settings/StorageCredentialScreen.tsx +10 -25
  78. package/src/identity/{hub → manager}/shared/components/DetailsScreen.tsx +5 -7
  79. package/src/identity/{hub → manager}/shared/components/ErrorScreen.tsx +6 -10
  80. package/src/identity/{hub → manager}/shared/components/FlowTimeline.tsx +4 -3
  81. package/src/identity/{hub → manager}/shared/components/IdentitySummary.tsx +19 -59
  82. package/src/identity/manager/shared/components/LazyMenu.tsx +147 -0
  83. package/src/identity/manager/shared/components/MenuScreen.tsx +220 -0
  84. package/src/identity/manager/shared/components/OperationCompleteScreen.tsx +28 -0
  85. package/src/identity/{hub → manager}/shared/components/UnlinkedIdentityScreen.tsx +9 -10
  86. package/src/identity/{hub → manager}/shared/components/WalletApprovalScreen.tsx +1 -2
  87. package/src/identity/manager/shared/components/Wordmark.tsx +54 -0
  88. package/src/identity/{hub → manager}/shared/components/menuFlagsFromReconciliation.ts +39 -15
  89. package/src/identity/{hub → manager}/shared/effects/profilePrep.ts +1 -1
  90. package/src/identity/manager/shared/effects/types.ts +30 -0
  91. package/src/identity/{hub → manager}/shared/model/copy.ts +0 -4
  92. package/src/identity/{hub → manager}/shared/model/errors.ts +32 -3
  93. package/src/identity/{hub → manager}/shared/model/network.ts +2 -2
  94. package/src/identity/{hub → manager}/shared/reconciliation/agentReconciliation/hook.ts +5 -0
  95. package/src/identity/{hub → manager}/shared/reconciliation/agentReconciliation/run.ts +1 -1
  96. package/src/identity/{hub/shared/reconciliation/useAgentReconciliation.ts → manager/shared/reconciliation/index.ts} +6 -0
  97. package/src/identity/{hub → manager}/shared/utils.ts +6 -10
  98. package/src/identity/{hub → manager}/transfer/TokenTransferFlow.tsx +3 -3
  99. package/src/identity/{hub → manager}/transfer/TokenTransferScreens.tsx +4 -10
  100. package/src/identity/{hub → manager}/transfer/effects.ts +1 -1
  101. package/src/identity/{hub → manager}/types.ts +5 -6
  102. package/src/identity/{hub/useIdentityHubContinuity.ts → manager/useContinuity.ts} +59 -27
  103. package/src/identity/{hub/useIdentityHubController.ts → manager/useController.ts} +38 -35
  104. package/src/identity/{hub/useIdentityHubSideEffects.ts → manager/useSideEffects.ts} +40 -4
  105. package/src/identity/registry/erc8004/discovery.ts +3 -17
  106. package/src/identity/registry/erc8004/utils.ts +1 -1
  107. package/src/identity/storage/ipfs.ts +21 -1
  108. package/src/identity/wallet/browserWallet/html.ts +10 -2
  109. package/src/identity/wallet/browserWallet/http.ts +18 -0
  110. package/src/identity/wallet/browserWallet/requestServer.ts +5 -1
  111. package/src/identity/wallet/browserWallet/requests.ts +10 -28
  112. package/src/identity/wallet/browserWallet/session.ts +26 -33
  113. package/src/identity/wallet/browserWallet/validation.ts +14 -0
  114. package/src/identity/wallet/browserWallet/walletPageSource.ts +22 -40
  115. package/src/identity/wallet/page/boot.ts +43 -0
  116. package/src/identity/wallet/page/config.ts +59 -0
  117. package/src/identity/wallet/page/constants.ts +12 -0
  118. package/src/identity/wallet/page/copy.ts +47 -68
  119. package/src/identity/wallet/page/css.ts +638 -0
  120. package/src/identity/wallet/page/{errorView.ts → errors.ts} +5 -14
  121. package/src/identity/wallet/page/{controller.ts → flow.ts} +4 -71
  122. package/src/identity/wallet/page/markup.ts +44 -34
  123. package/src/identity/wallet/page/{walletProvider.ts → provider.ts} +0 -3
  124. package/src/identity/wallet/page/resize.ts +95 -0
  125. package/src/identity/wallet/page/state.ts +135 -8
  126. package/src/identity/wallet/page/timeline.ts +161 -0
  127. package/src/identity/wallet/page/view.ts +22 -302
  128. package/src/storage/config.ts +30 -80
  129. package/src/storage/reset.ts +31 -0
  130. package/src/storage/secrets.ts +1 -16
  131. package/src/ui/Select.tsx +27 -5
  132. package/src/ui/Spinner.tsx +16 -15
  133. package/src/ui/Surface.tsx +21 -17
  134. package/src/ui/TextArea.tsx +173 -0
  135. package/src/ui/TextInput.tsx +31 -133
  136. package/src/ui/theme.ts +22 -13
  137. package/src/utils/clipboard.ts +0 -140
  138. package/src/app/FirstRun.tsx +0 -577
  139. package/src/app/FirstRunTimeline.tsx +0 -51
  140. package/src/app/firstRunConfig.ts +0 -26
  141. package/src/app/hooks/useCancelRequest.ts +0 -22
  142. package/src/app/hooks/useDoublePress.ts +0 -46
  143. package/src/app/hooks/useExitOnCtrlC.ts +0 -36
  144. package/src/auth/openaiOAuth/credentials.ts +0 -47
  145. package/src/auth/openaiOAuth/crypto.ts +0 -23
  146. package/src/auth/openaiOAuth/index.ts +0 -238
  147. package/src/auth/openaiOAuth/landingPage.ts +0 -116
  148. package/src/auth/openaiOAuth/listener.ts +0 -151
  149. package/src/auth/openaiOAuth/refresh.ts +0 -70
  150. package/src/auth/openaiOAuth/shared.ts +0 -115
  151. package/src/chat/ChatBottomPane.tsx +0 -296
  152. package/src/chat/ChatScreen.tsx +0 -1685
  153. package/src/chat/ConversationStack.tsx +0 -56
  154. package/src/chat/MessageList.tsx +0 -638
  155. package/src/chat/SessionStatus.tsx +0 -53
  156. package/src/chat/chatEnvironment.ts +0 -16
  157. package/src/chat/chatScreenUtils.ts +0 -194
  158. package/src/chat/chatSessionState.ts +0 -146
  159. package/src/chat/chatTurnContext.ts +0 -50
  160. package/src/chat/chatTurnOrchestrator.ts +0 -603
  161. package/src/chat/chatTurnRows.ts +0 -64
  162. package/src/chat/commands.ts +0 -494
  163. package/src/chat/continuityEditReview.ts +0 -42
  164. package/src/chat/display/DiffView.tsx +0 -193
  165. package/src/chat/display/SyntaxText.tsx +0 -192
  166. package/src/chat/display/toolCallDisplay.ts +0 -103
  167. package/src/chat/display/toolResultDisplay.ts +0 -19
  168. package/src/chat/input/ChatInput.tsx +0 -625
  169. package/src/chat/input/chatInputHelpers.ts +0 -62
  170. package/src/chat/input/chatInputState.ts +0 -247
  171. package/src/chat/input/chatPaste.ts +0 -49
  172. package/src/chat/input/imageRefs.ts +0 -30
  173. package/src/chat/input/inputRendering.tsx +0 -93
  174. package/src/chat/input/textCursor.ts +0 -212
  175. package/src/chat/messageMarkdown.ts +0 -220
  176. package/src/chat/messageRows.ts +0 -43
  177. package/src/chat/planImplementation.ts +0 -62
  178. package/src/chat/slashCommandHandlers.ts +0 -122
  179. package/src/chat/slashCommandViews.ts +0 -120
  180. package/src/chat/transcript/TranscriptView.tsx +0 -184
  181. package/src/chat/transcript/transcriptViewport.ts +0 -295
  182. package/src/chat/views/ContextLimitView.tsx +0 -95
  183. package/src/chat/views/ContinuityEditReviewView.tsx +0 -50
  184. package/src/chat/views/CopyPicker.tsx +0 -50
  185. package/src/chat/views/PermissionPrompt.tsx +0 -156
  186. package/src/chat/views/PermissionsView.tsx +0 -165
  187. package/src/chat/views/PlanApprovalView.tsx +0 -91
  188. package/src/chat/views/ResumeView.tsx +0 -273
  189. package/src/chat/views/RewindView.tsx +0 -412
  190. package/src/cli/preview.tsx +0 -14
  191. package/src/cli/updateNotice.ts +0 -54
  192. package/src/identity/continuity/privateEdit/apply.ts +0 -170
  193. package/src/identity/continuity/privateEdit/diff.ts +0 -6
  194. package/src/identity/continuity/privateEdit/files.ts +0 -23
  195. package/src/identity/continuity/privateEdit/types.ts +0 -28
  196. package/src/identity/continuity/privateEdit.ts +0 -46
  197. package/src/identity/hub/IdentityHub.tsx +0 -14
  198. package/src/identity/hub/continuity/RecoveryConfirmScreen.tsx +0 -104
  199. package/src/identity/hub/ens/effects.ts +0 -218
  200. package/src/identity/hub/shared/components/MenuScreen.tsx +0 -241
  201. package/src/identity/hub/shared/effects/types.ts +0 -53
  202. package/src/identity/hub/shared/reconciliation/index.ts +0 -14
  203. package/src/identity/wallet/page/grainient.ts +0 -278
  204. package/src/identity/wallet/page/html.ts +0 -28
  205. package/src/identity/wallet/page/styles/base.ts +0 -259
  206. package/src/identity/wallet/page/styles/components.ts +0 -262
  207. package/src/identity/wallet/page/styles/index.ts +0 -5
  208. package/src/identity/wallet/page/styles/responsive.ts +0 -247
  209. package/src/identity/wallet/page.tsx +0 -38
  210. package/src/mcp/approvals.ts +0 -113
  211. package/src/mcp/config.ts +0 -235
  212. package/src/mcp/manager.ts +0 -482
  213. package/src/mcp/managerHelpers.ts +0 -70
  214. package/src/mcp/names.ts +0 -19
  215. package/src/mcp/output.ts +0 -96
  216. package/src/models/ModelPicker.tsx +0 -1009
  217. package/src/models/catalog.ts +0 -327
  218. package/src/models/huggingface.ts +0 -712
  219. package/src/models/huggingfaceStorage.ts +0 -136
  220. package/src/models/llamacpp.ts +0 -848
  221. package/src/models/llamacppCommands.ts +0 -44
  222. package/src/models/llamacppConfig.ts +0 -34
  223. package/src/models/llamacppDiscovery.ts +0 -176
  224. package/src/models/llamacppOutput.ts +0 -65
  225. package/src/models/llamacppPreflight.ts +0 -158
  226. package/src/models/modelDisplay.ts +0 -180
  227. package/src/models/modelPickerCatalogFlow.ts +0 -56
  228. package/src/models/modelPickerCredentials.ts +0 -166
  229. package/src/models/modelPickerData.ts +0 -41
  230. package/src/models/modelPickerDisplay.tsx +0 -132
  231. package/src/models/modelPickerHfFlow.ts +0 -192
  232. package/src/models/modelPickerLocalRunnerFlow.ts +0 -115
  233. package/src/models/modelPickerOptions.ts +0 -457
  234. package/src/models/modelPickerTypes.ts +0 -69
  235. package/src/models/modelPickerUninstallFlow.ts +0 -48
  236. package/src/models/modelPickerViewHelpers.ts +0 -174
  237. package/src/models/modelRecommendation.ts +0 -139
  238. package/src/models/providerDisplay.ts +0 -16
  239. package/src/models/runtimeDetection.ts +0 -81
  240. package/src/models/uncensoredCatalog.ts +0 -86
  241. package/src/providers/anthropic.ts +0 -290
  242. package/src/providers/contracts.ts +0 -71
  243. package/src/providers/errors.ts +0 -80
  244. package/src/providers/gemini.ts +0 -391
  245. package/src/providers/openai-chat.ts +0 -474
  246. package/src/providers/openai-responses-format.ts +0 -177
  247. package/src/providers/openai-responses.ts +0 -306
  248. package/src/providers/openaiChatWire.ts +0 -124
  249. package/src/providers/registry.ts +0 -120
  250. package/src/providers/retry.ts +0 -58
  251. package/src/providers/sse.ts +0 -93
  252. package/src/runtime/compaction.ts +0 -395
  253. package/src/runtime/cwd.ts +0 -43
  254. package/src/runtime/providerTurn.ts +0 -38
  255. package/src/runtime/sessionMode.ts +0 -55
  256. package/src/runtime/systemPrompt.ts +0 -213
  257. package/src/runtime/textToolParser.ts +0 -161
  258. package/src/runtime/toolClaimGuards.ts +0 -143
  259. package/src/runtime/toolExecution.ts +0 -304
  260. package/src/runtime/toolIntent.ts +0 -143
  261. package/src/runtime/turn.ts +0 -369
  262. package/src/runtime/turnNudges.ts +0 -223
  263. package/src/runtime/turnTypes.ts +0 -86
  264. package/src/storage/factoryReset.ts +0 -127
  265. package/src/storage/history.ts +0 -58
  266. package/src/storage/permissions.ts +0 -76
  267. package/src/storage/rewind.ts +0 -266
  268. package/src/storage/sessionExport.ts +0 -49
  269. package/src/storage/sessions.ts +0 -495
  270. package/src/tools/bashSafety.ts +0 -186
  271. package/src/tools/bashTool.ts +0 -140
  272. package/src/tools/changeDirectoryTool.ts +0 -213
  273. package/src/tools/contracts.ts +0 -192
  274. package/src/tools/deleteFileTool.ts +0 -116
  275. package/src/tools/editTool.ts +0 -165
  276. package/src/tools/editUtils.ts +0 -170
  277. package/src/tools/fileDiff.ts +0 -261
  278. package/src/tools/listDirectoryTool.ts +0 -55
  279. package/src/tools/listSkillFilesTool.ts +0 -77
  280. package/src/tools/listSkillsTool.ts +0 -68
  281. package/src/tools/mcpResourceTools.ts +0 -95
  282. package/src/tools/permissionRules.ts +0 -85
  283. package/src/tools/privateContinuityEditTool.ts +0 -187
  284. package/src/tools/privateContinuityReadTool.ts +0 -106
  285. package/src/tools/readSkillTool.ts +0 -107
  286. package/src/tools/readTool.ts +0 -85
  287. package/src/tools/registry.ts +0 -103
  288. package/src/tools/writeFileTool.ts +0 -167
  289. package/src/ui/BrandSplash.tsx +0 -133
  290. package/src/ui/terminalTitle.ts +0 -30
  291. package/src/utils/images.ts +0 -140
  292. package/src/utils/markdownSegments.ts +0 -51
  293. package/src/utils/messages.ts +0 -37
  294. package/src/utils/withRetry.ts +0 -324
  295. /package/src/identity/{hub → manager}/continuity/state.ts +0 -0
  296. /package/src/identity/{hub → manager}/custody/helpers.ts +0 -0
  297. /package/src/identity/{hub → manager}/custody/preflight.ts +0 -0
  298. /package/src/identity/{hub → manager}/custody/state.ts +0 -0
  299. /package/src/identity/{hub → manager}/custody/useCustodyFlow.tsx +0 -0
  300. /package/src/identity/{hub → manager}/ens/EnsEditFlow.tsx +0 -0
  301. /package/src/identity/{hub → manager}/ens/advancedEnsValidation.ts +0 -0
  302. /package/src/identity/{hub → manager}/ens/state.ts +0 -0
  303. /package/src/identity/{hub → manager}/ens/transactions.ts +0 -0
  304. /package/src/identity/{hub → manager}/ens/types.ts +0 -0
  305. /package/src/identity/{hub → manager}/profile/identity.ts +0 -0
  306. /package/src/identity/{hub → manager}/restore/envelopes.ts +0 -0
  307. /package/src/identity/{hub → manager}/restore/helpers.ts +0 -0
  308. /package/src/identity/{hub → manager}/restore/recovery.ts +0 -0
  309. /package/src/identity/{hub → manager}/restore/resolve.ts +0 -0
  310. /package/src/identity/{hub → manager}/shared/components/BusyScreen.tsx +0 -0
  311. /package/src/identity/{hub → manager}/shared/components/NetworkScreen.tsx +0 -0
  312. /package/src/identity/{hub → manager}/shared/components/PinataJwtInput.tsx +0 -0
  313. /package/src/identity/{hub → manager}/shared/effects/receipts.ts +0 -0
  314. /package/src/identity/{hub → manager}/shared/effects/sync.ts +0 -0
  315. /package/src/identity/{hub → manager}/shared/model/format.ts +0 -0
  316. /package/src/identity/{hub → manager}/shared/operatorWallets.ts +0 -0
  317. /package/src/identity/{hub → manager}/shared/reconciliation/agentReconciliation/ownership.ts +0 -0
  318. /package/src/identity/{hub → manager}/shared/reconciliation/agentReconciliation/types.ts +0 -0
  319. /package/src/identity/{hub → manager}/shared/reconciliation/walletSetup.ts +0 -0
  320. /package/src/identity/{hub → manager}/shared/txGuard.ts +0 -0
  321. /package/src/identity/{hub → manager}/transfer/progress.ts +0 -0
  322. /package/src/identity/{hub → manager}/transfer/state.ts +0 -0
@@ -38,8 +38,8 @@ export const PrivateContinuityScreen: React.FC<CommonProps & {
38
38
  onOpenMemory,
39
39
  onBack,
40
40
  }) => (
41
- <Surface title="Soul & Memory" subtitle={notice ?? privateSubtitle(ready)} footer={footer}>
42
- <IdentitySummary identity={identity} config={config} workingStatus={workingStatus} hideLocalChanges compact />
41
+ <Surface title="Soul & Memory" subtitle={notice ?? (!ready ? 'Run Refetch Latest to recover files.' : 'Persona and memory files.')} footer={footer}>
42
+ <IdentitySummary identity={identity} config={config} workingStatus={workingStatus} compact />
43
43
  {editorOpened && (
44
44
  <Box marginTop={1}>
45
45
  <Text color={theme.accentPeriwinkle}>Save with ctrl+s in your editor</Text>
@@ -48,11 +48,9 @@ export const PrivateContinuityScreen: React.FC<CommonProps & {
48
48
  <Box marginTop={1}>
49
49
  <Select<PrivateAction>
50
50
  options={[
51
- { value: 'soul', role: 'section', label: 'Files' },
52
- { value: 'soul', label: 'Edit Soul', hint: 'Voice, behavior, and operating preferences', disabled: !ready },
53
- { value: 'memory', label: 'Edit Memory', hint: 'Durable owner memory for this agent', disabled: !ready },
54
- { value: 'back', role: 'section', label: 'Navigation' },
55
- { value: 'back', label: 'Back', hint: 'Return to Identity Hub menu', role: 'utility' },
51
+ { value: 'soul', label: 'Edit Soul', disabled: !ready },
52
+ { value: 'memory', label: 'Edit Memory', disabled: !ready },
53
+ { value: 'back', label: 'Back', role: 'utility' },
56
54
  ]}
57
55
  hintLayout="inline"
58
56
  onSubmit={choice => {
@@ -70,8 +68,8 @@ export const PublicProfileScreen: React.FC<CommonProps & {
70
68
  onEditProfile: () => void
71
69
  }> = ({ identity, config, workingStatus, notice, editorOpened, footer, onEditProfile, onBack }) => {
72
70
  return (
73
- <Surface title="Public Profile" subtitle={notice ?? 'Manage the public name, description, icon, and Agent Card.'} footer={footer}>
74
- <IdentitySummary identity={identity} config={config} workingStatus={workingStatus} hideLocalChanges compact />
71
+ <Surface title="Public Profile" subtitle={notice ?? 'Name, description, and icon.'} footer={footer}>
72
+ <IdentitySummary identity={identity} config={config} workingStatus={workingStatus} compact />
75
73
  {editorOpened && (
76
74
  <Box marginTop={1}>
77
75
  <Text color={theme.accentPeriwinkle}>Save with ctrl+s in your editor</Text>
@@ -80,10 +78,8 @@ export const PublicProfileScreen: React.FC<CommonProps & {
80
78
  <Box marginTop={1}>
81
79
  <Select<PublicAction>
82
80
  options={[
83
- { value: 'edit', role: 'section', label: 'Profile' },
84
- { value: 'edit', label: 'Edit Profile', hint: 'Name, description, icon' },
85
- { value: 'back', role: 'section', label: 'Navigation' },
86
- { value: 'back', label: 'Back', hint: 'Return to Identity Hub menu', role: 'utility' },
81
+ { value: 'edit', label: 'Edit Profile' },
82
+ { value: 'back', label: 'Back', role: 'utility' },
87
83
  ]}
88
84
  hintLayout="inline"
89
85
  onSubmit={choice => {
@@ -96,9 +92,3 @@ export const PublicProfileScreen: React.FC<CommonProps & {
96
92
  </Surface>
97
93
  )
98
94
  }
99
-
100
- function privateSubtitle(ready: boolean): string {
101
- return ready
102
- ? 'Edit the durable persona and memory files for this identity.'
103
- : 'Use "Refetch Latest Snapshot" from the Identity Hub menu to recover files.'
104
- }
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
  import { PinataJwtInput } from '../shared/components/PinataJwtInput.js'
3
- import type { Step } from '../identityHubReducer.js'
3
+ import type { Step } from '../reducer.js'
4
4
 
5
5
  interface RebackupStorageScreenProps {
6
6
  step: Extract<Step, { kind: 'rebackup-storage' | 'public-profile-storage' }>
@@ -18,8 +18,8 @@ export const RebackupStorageScreen: React.FC<RebackupStorageScreenProps> = ({ st
18
18
  inputKey="rebackup-storage"
19
19
  title={title}
20
20
  subtitle={step.error ?? subtitle ?? (publicOnly
21
- ? 'Save a Pinata JWT so ethagent can pin the public profile to IPFS.'
22
- : 'Save a Pinata JWT so ethagent can pin encrypted state to IPFS.')}
21
+ ? 'Save a Pinata JWT to pin the public profile to IPFS.'
22
+ : 'Save a Pinata JWT to pin encrypted state to IPFS.')}
23
23
  footer={footer}
24
24
  onSubmit={onSubmit}
25
25
  onCancel={onCancel}
@@ -0,0 +1,102 @@
1
+ import React from 'react'
2
+ import { Box, Text } from 'ink'
3
+ import { Surface } from '../../../ui/Surface.js'
4
+ import { Select } from '../../../ui/Select.js'
5
+ import { theme } from '../../../ui/theme.js'
6
+ import { localChangeStatusView, type LocalChangeStatusView } from './state.js'
7
+
8
+ import type { ContinuityWorkingTreeStatus } from '../../continuity/storage.js'
9
+
10
+ type RecoveryConfirmMode = 'publish' | 'refetch' | 'restore'
11
+
12
+ interface RecoveryConfirmScreenProps {
13
+ mode: RecoveryConfirmMode
14
+ workingStatus?: ContinuityWorkingTreeStatus | null
15
+ pendingPublish?: boolean
16
+ footer: React.ReactNode
17
+ onConfirm: () => void
18
+ onBack: () => void
19
+ }
20
+
21
+ export const RecoveryConfirmScreen: React.FC<RecoveryConfirmScreenProps> = ({ mode, workingStatus, pendingPublish, footer, onConfirm, onBack }) => {
22
+ const isPublish = mode === 'publish'
23
+ const isRestore = mode === 'restore'
24
+ const title = isPublish
25
+ ? 'Save Snapshot?'
26
+ : isRestore
27
+ ? 'Overwrite Local Changes?'
28
+ : 'Refetch Latest From Onchain?'
29
+ const subtitle = isPublish
30
+ ? 'Saves SOUL.md, MEMORY.md, skills, and profile changes.'
31
+ : isRestore
32
+ ? 'This restore targets the active agent and overwrites local continuity files.'
33
+ : 'This overwrites local files with the onchain version.'
34
+
35
+ const localChangeStatus = localChangeStatusView(workingStatus)
36
+ const body = isPublish
37
+ ? <SaveSnapshotStatusLine status={localChangeStatus} />
38
+ : localChangeStatus.hasLocalChanges
39
+ ? <OverwriteStatusLine status={localChangeStatus} pendingPublish={pendingPublish} />
40
+ : pendingPublish
41
+ ? <Text color={theme.accentError} bold>Local snapshot is ahead of onchain; unsaved edits are discarded.</Text>
42
+ : null
43
+ const confirmLabel = isPublish
44
+ ? 'Save Snapshot Now'
45
+ : localChangeStatus.hasLocalChanges
46
+ ? 'Overwrite Local Changes'
47
+ : isRestore
48
+ ? 'Restore'
49
+ : 'Refetch'
50
+
51
+ return (
52
+ <Surface title={title} subtitle={subtitle} footer={footer} tone="primary">
53
+ {body ? <Box flexDirection="column">{body}</Box> : null}
54
+ <Box marginTop={1}>
55
+ <Select<'confirm' | 'back'>
56
+ options={[
57
+ { value: 'confirm', label: confirmLabel },
58
+ { value: 'back', label: 'Back', role: 'utility' },
59
+ ]}
60
+ hintLayout="inline"
61
+ onSubmit={choice => {
62
+ if (choice === 'confirm') return onConfirm()
63
+ return onBack()
64
+ }}
65
+ onCancel={onBack}
66
+ />
67
+ </Box>
68
+ </Surface>
69
+ )
70
+ }
71
+
72
+ const OverwriteStatusLine: React.FC<{ status: LocalChangeStatusView; pendingPublish?: boolean }> = ({ status, pendingPublish }) => (
73
+ <Box flexDirection="column">
74
+ <Text>
75
+ <Text color={theme.textSubtle}>Unsaved local changes detected: </Text>
76
+ <Text color={theme.accentError} bold>{status.files.length > 0 ? status.files.join(', ') : 'local files differ from saved snapshot'}</Text>
77
+ </Text>
78
+ <Text color={theme.accentError}>
79
+ Continuing replaces those files with the restored snapshot.
80
+ </Text>
81
+ {pendingPublish ? (
82
+ <Text color={theme.accentError}>Local snapshot is also ahead of onchain.</Text>
83
+ ) : null}
84
+ </Box>
85
+ )
86
+
87
+ const SaveSnapshotStatusLine: React.FC<{ status: LocalChangeStatusView }> = ({ status }) => {
88
+ if (status.hasLocalChanges) {
89
+ return (
90
+ <Text>
91
+ <Text color={theme.textSubtle}>Local changes detected: </Text>
92
+ <Text color={theme.accentError} bold>{status.files.length > 0 ? status.files.join(', ') : 'local files differ from saved snapshot'}</Text>
93
+ </Text>
94
+ )
95
+ }
96
+
97
+ if (!status.detail) return null
98
+
99
+ const color = status.tone === 'ok' || status.tone === 'warn' ? theme.accentPeriwinkle : theme.dim
100
+ const label = status.detail === 'None detected' ? 'No local changes detected.' : status.detail
101
+ return <Text color={color}>{label}</Text>
102
+ }
@@ -21,7 +21,6 @@ export const SavePromptScreen: React.FC<SavePromptScreenProps> = ({ workingStatu
21
21
  return (
22
22
  <Surface
23
23
  title="Save your identity changes?"
24
- subtitle="Unsaved local edits since the last snapshot."
25
24
  footer={footer}
26
25
  tone="primary"
27
26
  >
@@ -35,8 +34,8 @@ export const SavePromptScreen: React.FC<SavePromptScreenProps> = ({ workingStatu
35
34
  <Box marginTop={1}>
36
35
  <Select<SavePromptAction>
37
36
  options={[
38
- { value: 'save-now', label: 'Save now', hint: 'Sign once and save the encrypted snapshot' },
39
- { value: 'later', label: 'Not now', hint: 'Ask again on the next launch', role: 'utility' },
37
+ { value: 'save-now', label: 'Save now', hint: 'Sign and save snapshot' },
38
+ { value: 'later', label: 'Not now', hint: 'Ask again next launch', role: 'utility' },
40
39
  ]}
41
40
  hintLayout="inline"
42
41
  onSubmit={onSelect}
@@ -1,6 +1,6 @@
1
1
  import type { EthagentIdentity } from '../../../storage/config.js'
2
2
  import type { WalletPurpose } from '../../wallet/browserWallet.js'
3
- import type { ProfileUpdates } from '../identityHubReducer.js'
3
+ import type { ProfileUpdates } from '../reducer.js'
4
4
  import { snapshotSaveWalletRole } from './snapshot.js'
5
5
 
6
6
  export function rebackupWalletPurpose(
@@ -40,7 +40,7 @@ import {
40
40
  encodeRotateAgentURI,
41
41
  isAgentInVault,
42
42
  } from '../../registry/vault.js'
43
- import type { Step, ProfileUpdates } from '../identityHubReducer.js'
43
+ import type { Step, ProfileUpdates } from '../reducer.js'
44
44
  import { acquireTxGuard, releaseTxGuard } from '../shared/txGuard.js'
45
45
  import type { EffectCallbacks } from '../shared/effects/types.js'
46
46
  import { awaitConfirmedReceipt } from '../shared/effects/receipts.js'
@@ -78,8 +78,8 @@ export const DeleteSkillConfirmScreen: React.FC<DeleteSkillConfirmScreenProps> =
78
78
  <Box marginTop={1}>
79
79
  <Select<ConfirmChoice>
80
80
  options={[
81
- { value: 'delete', label: 'Yes, delete', hint: skillMissing ? 'Skill already missing on disk' : 'Permanent. Will be reflected in the next snapshot.', bold: true, disabled: skillMissing },
82
- { value: 'cancel', label: 'No, back', hint: 'Return to the delete picker', role: 'utility' },
81
+ { value: 'delete', label: 'Yes, delete', hint: skillMissing ? 'Already missing on disk' : 'Permanent on next snapshot', bold: true, disabled: skillMissing },
82
+ { value: 'cancel', label: 'No, back', role: 'utility' },
83
83
  ]}
84
84
  hintLayout="inline"
85
85
  initialIndex={1}
@@ -33,11 +33,6 @@ export const NewSkillScreen: React.FC<NewSkillScreenProps> = ({
33
33
  }}
34
34
  onCancel={onCancel}
35
35
  />
36
- <Box marginTop={1}>
37
- <Text color={theme.dim}>
38
- Saved as skills/&lt;folder&gt;/SKILL.md. Add supporting files later by dropping them into the same folder.
39
- </Text>
40
- </Box>
41
36
  {error && (
42
37
  <Box marginTop={1}>
43
38
  <Text color={theme.accentError}>{error}</Text>
@@ -22,7 +22,7 @@ export const NewSkillVisibilityScreen: React.FC<NewSkillVisibilityScreenProps> =
22
22
  }) => (
23
23
  <Surface
24
24
  title={`Visibility · ${name}`}
25
- subtitle="Public is the default. You can change it later from Change Visibility."
25
+ subtitle="Public is the default."
26
26
  footer={footer}
27
27
  >
28
28
  {error && (
@@ -33,10 +33,10 @@ export const NewSkillVisibilityScreen: React.FC<NewSkillVisibilityScreenProps> =
33
33
  <Box marginTop={1}>
34
34
  <Select<SkillVisibility | 'back'>
35
35
  options={[
36
- { value: 'private', label: 'Private', hint: 'Local-only. Not in the Agent Card.' },
37
- { value: 'public', label: 'Public', hint: 'Default. Listed in the Agent Card.' },
36
+ { value: 'private', label: 'Private', hint: 'Not in the Agent Card' },
37
+ { value: 'public', label: 'Public', hint: 'Listed in the Agent Card' },
38
38
  { value: 'back', role: 'section', label: 'Navigation' },
39
- { value: 'back', label: 'Back', hint: 'Return to the name step', role: 'utility' },
39
+ { value: 'back', label: 'Back', role: 'utility' },
40
40
  ]}
41
41
  hintLayout="inline"
42
42
  initialIndex={1}
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useState } from 'react'
2
- import { Box, Text } from 'ink'
2
+ import { Box } from 'ink'
3
3
  import { Surface } from '../../../../ui/Surface.js'
4
4
  import { Select, type SelectOption } from '../../../../ui/Select.js'
5
5
  import { theme } from '../../../../ui/theme.js'
@@ -60,48 +60,32 @@ export const SkillActionsScreen: React.FC<SkillActionsScreenProps> = ({
60
60
 
61
61
  const displayName = entry?.displayName ?? entry?.name ?? skillName
62
62
  const visibility = entry?.visibility
63
- const subtitle = notice ?? 'Open, change visibility, or delete this skill.'
63
+ const subtitle = notice ?? formatLeafMeta(visibility, supportingCount)
64
64
 
65
65
  const options: Array<SelectOption<SkillAction>> = []
66
66
  const noop: SkillAction = { kind: 'noop' }
67
67
 
68
- options.push({ value: noop, role: 'section', label: 'Open' })
69
68
  options.push({
70
69
  value: { kind: 'open' },
71
70
  label: 'Open SKILL.md',
72
- hint: 'View or edit this skill',
73
71
  })
74
72
 
75
73
  options.push({ value: noop, role: 'section', label: 'Visibility' })
76
74
  options.push(visibilityOption('private', visibility))
77
75
  options.push(visibilityOption('public', visibility))
78
76
 
79
- options.push({ value: noop, role: 'section', label: 'Manage' })
80
77
  options.push({
81
78
  value: { kind: 'delete' },
82
79
  label: 'Delete',
83
- hint: 'Remove this skill folder and its supporting files',
84
80
  })
85
- options.push({ value: noop, role: 'section', label: 'Return' })
86
81
  options.push({
87
82
  value: { kind: 'back' },
88
83
  label: 'Back',
89
- hint: 'Return to Skills',
90
84
  role: 'utility',
91
85
  })
92
86
 
93
- const leafMeta = formatLeafMeta(visibility, supportingCount)
94
-
95
87
  return (
96
- <Surface title={`Skill · ${displayName}`} subtitle={subtitle} footer={footer}>
97
- <Box flexDirection="column" marginTop={1}>
98
- <Text color={theme.dim}>skills/</Text>
99
- <Text>
100
- <Text color={theme.dim}>└── </Text>
101
- <Text color={theme.accentPeriwinkle} bold>{`${skillName}/SKILL.md`}</Text>
102
- {leafMeta ? <Text color={theme.dim}>{` ${leafMeta}`}</Text> : null}
103
- </Text>
104
- </Box>
88
+ <Surface title={displayName} subtitle={subtitle || undefined} footer={footer}>
105
89
  <Box marginTop={1}>
106
90
  <Select<SkillAction>
107
91
  options={options}
@@ -129,7 +113,7 @@ function formatLeafMeta(visibility: SkillVisibility | undefined, supportingCount
129
113
 
130
114
  function visibilityOption(level: SkillVisibility, current?: SkillVisibility): SelectOption<SkillAction> {
131
115
  const isCurrent = current === level
132
- const hint = visibilityHint(level) + (isCurrent ? ' · current' : '')
116
+ const hint = visibilityHint(level)
133
117
  const base: SelectOption<SkillAction> = {
134
118
  value: { kind: 'set-visibility', visibility: level },
135
119
  label: `Set ${capitalize(level)}`,
@@ -140,8 +124,8 @@ function visibilityOption(level: SkillVisibility, current?: SkillVisibility): Se
140
124
  }
141
125
 
142
126
  function visibilityHint(level: SkillVisibility): string {
143
- if (level === 'private') return 'Local-only. Not in the Agent Card.'
144
- return 'Default. Listed in the Agent Card.'
127
+ if (level === 'private') return 'Not in the Agent Card'
128
+ return 'Listed in the Agent Card'
145
129
  }
146
130
 
147
131
  function capitalize(value: string): string {
@@ -73,7 +73,7 @@ export const SkillsTreeScreen: React.FC<SkillsTreeScreenProps> = ({
73
73
  }
74
74
  }, [identity, editorOpened])
75
75
 
76
- const subtitle = notice ?? 'Select a skill to open, change visibility, or delete.'
76
+ const subtitle = notice ?? 'Public and private skills.'
77
77
  const isLoading = tree === null
78
78
  const skills = tree?.skills ?? []
79
79
  const supportingCounts = tree?.supportingCounts ?? {}
@@ -129,47 +129,35 @@ function buildOptions(
129
129
  indent: 0,
130
130
  })
131
131
  } else if (!hasAny) {
132
- rows.push({ value: noopValue, role: 'section', label: 'Catalog' })
133
- rows.push({ value: noopValue, role: 'notice', label: 'skills/', labelColor: theme.dim, indent: 3 })
134
- rows.push({ value: noopValue, role: 'notice', label: '└── <skill>/', labelColor: theme.dim, indent: 3 })
135
- rows.push({ value: noopValue, role: 'notice', label: ' └── SKILL.md', labelColor: theme.dim, indent: 3 })
132
+ rows.push({ value: noopValue, role: 'notice', label: 'No skills yet.', labelColor: theme.dim })
136
133
  } else {
137
134
  rows.push({ value: noopValue, role: 'section', label: 'Catalog' })
138
- rows.push({ value: noopValue, role: 'notice', label: 'skills/', labelColor: theme.dim, indent: 3 })
139
135
  const sorted = [...entries].sort((a, b) => a.name.localeCompare(b.name))
140
- for (let i = 0; i < sorted.length; i++) {
141
- const skill = sorted[i]
136
+ for (const skill of sorted) {
142
137
  if (!skill) continue
143
- const isLast = i === sorted.length - 1
144
- const branch = isLast ? '└── ' : '├── '
145
138
  const supportCount = supportingCounts[skill.name] ?? 0
146
139
  const meta = [capitalize(skill.visibility)]
147
140
  if (supportCount > 0) meta.push(`${supportCount + 1} files`)
148
- meta.push('enter for actions')
149
141
  rows.push({
150
142
  value: { kind: 'skill', relativePath: skill.relativePath },
151
- label: `${branch}${skill.name}/SKILL.md`,
143
+ label: skill.name,
152
144
  hint: meta.join(' · '),
153
- indent: 3,
154
145
  })
155
146
  }
147
+ rows.push({ value: noopValue, role: 'section', label: '' })
156
148
  }
157
149
 
158
- rows.push({ value: noopValue, role: 'section', label: 'Manage' })
159
150
  rows.push({
160
151
  value: { kind: 'new' },
161
152
  label: 'New Skill',
162
- hint: 'Scaffold a new skill folder with SKILL.md',
163
153
  })
164
154
  rows.push({
165
155
  value: { kind: 'open-folder' },
166
156
  label: 'Open Skills Folder',
167
- hint: 'Reveal skills/ in your file manager',
168
157
  })
169
158
  rows.push({
170
159
  value: { kind: 'back' },
171
160
  label: 'Back',
172
- hint: 'Return to Identity Hub menu',
173
161
  role: 'utility',
174
162
  })
175
163
 
@@ -1,6 +1,6 @@
1
1
  import { getAddress, isAddress, type Address } from 'viem'
2
2
  import type { EthagentIdentity } from '../../../storage/config.js'
3
- import type { ProfileUpdates } from '../identityHubReducer.js'
3
+ import type { ProfileUpdates } from '../reducer.js'
4
4
  import {
5
5
  createWalletContinuitySnapshotEnvelope,
6
6
  createWalletRestoreAccessKey,
@@ -32,7 +32,7 @@ import {
32
32
  requestBrowserWalletSignatureAndTransaction,
33
33
  type WalletPurpose,
34
34
  } from '../../wallet/browserWallet.js'
35
- import type { Step } from '../identityHubReducer.js'
35
+ import type { Step } from '../reducer.js'
36
36
  import type { EffectCallbacks } from '../shared/effects/types.js'
37
37
  import { awaitConfirmedReceipt } from '../shared/effects/receipts.js'
38
38
  import {
@@ -3,11 +3,12 @@ import { Box, Text } from 'ink'
3
3
  import { Surface } from '../../../ui/Surface.js'
4
4
  import { Select } from '../../../ui/Select.js'
5
5
  import { TextInput } from '../../../ui/TextInput.js'
6
+ import { TextArea } from '../../../ui/TextArea.js'
6
7
  import { theme } from '../../../ui/theme.js'
7
8
  import { normalizeErc8004RegistryConfig } from '../../registry/erc8004.js'
8
9
  import { networkLabel } from '../shared/model/network.js'
9
- import type { Step } from '../identityHubReducer.js'
10
- import { createStepNumber, CREATE_STEP_LABELS } from '../identityHubReducer.js'
10
+ import type { Step } from '../reducer.js'
11
+ import { createStepNumber, CREATE_STEP_LABELS } from '../reducer.js'
11
12
  import { WalletApprovalScreen } from '../shared/components/WalletApprovalScreen.js'
12
13
  import { BusyScreen } from '../shared/components/BusyScreen.js'
13
14
  import { FlowTimeline } from '../shared/components/FlowTimeline.js'
@@ -21,6 +22,7 @@ type CreateFlowProps = {
21
22
  | 'create-name'
22
23
  | 'create-description'
23
24
  | 'create-custody'
25
+ | 'create-import'
24
26
  | 'create-preflight'
25
27
  | 'create-registry'
26
28
  | 'create-signing'
@@ -57,20 +59,10 @@ export const CreateFlow: React.FC<CreateFlowProps> = ({
57
59
  if (step.kind === 'replace-confirm') {
58
60
  return (
59
61
  <Surface title="Create a New Agent?" footer="enter selects · esc back">
60
- <Box flexDirection="column" marginBottom={1}>
61
- <Text color={theme.dim}>
62
- Your current agent stays in your wallet and remains loadable.
63
- </Text>
64
- <Text color={theme.dim}>
65
- This mints a new agent to this wallet and uses it on this machine.
66
- </Text>
67
- </Box>
68
62
  <Select<'replace' | 'back'>
69
63
  options={[
70
- { value: 'back', role: 'section', label: 'Current Identity' },
71
- { value: 'back', label: 'Keep Current Agent', hint: 'Return without minting anything', role: 'utility' },
72
- { value: 'replace', role: 'section', label: 'New Identity' },
73
- { value: 'replace', label: 'Mint and Use New Agent', hint: 'Create separate token and make it active' },
64
+ { value: 'back', label: 'Keep Current Agent', role: 'utility' },
65
+ { value: 'replace', label: 'Mint and Use New Agent' },
74
66
  ]}
75
67
  hintLayout="inline"
76
68
  onSubmit={choice => {
@@ -101,14 +93,11 @@ export const CreateFlow: React.FC<CreateFlowProps> = ({
101
93
 
102
94
  if (step.kind === 'create-description') {
103
95
  return (
104
- <Surface title="Describe Your Agent" subtitle={indicator} footer="enter next · shift+enter newline · esc back">
105
- <Text color={theme.dim}>Optional. One short sentence is enough.</Text>
106
- <TextInput
96
+ <Surface title="Describe Your Agent" subtitle={indicator}>
97
+ <TextArea
107
98
  key="agent-description"
108
99
  initialValue={step.description ?? ''}
109
- placeholder="description"
110
- allowEmpty
111
- multiline
100
+ placeholder="optional description"
112
101
  onSubmit={description => onDescriptionSubmit(step.name, description.trim())}
113
102
  onCancel={onBack}
114
103
  />
@@ -119,16 +108,10 @@ export const CreateFlow: React.FC<CreateFlowProps> = ({
119
108
  if (step.kind === 'create-custody') {
120
109
  return (
121
110
  <Surface title="Pick Custody Mode" subtitle={indicator} footer="enter continues · esc back">
122
- <Box flexDirection="column" marginBottom={1}>
123
- <Text color={theme.dim}>Custody decides who controls the ERC-8004 token and who can rotate the URI pointer.</Text>
124
- <Text color={theme.dim}>You can switch later from Identity Hub.</Text>
125
- </Box>
126
111
  <Select<'simple' | 'advanced'>
127
112
  options={[
128
- { value: 'simple', role: 'section', label: 'Simple (Recommended)' },
129
- { value: 'simple', label: 'Simple', hint: 'One wallet owns the token, signs every save, and rotates the URI directly' },
130
- { value: 'advanced', role: 'section', label: 'Advanced' },
131
- { value: 'advanced', label: 'Advanced', hint: 'Vault holds the token; owner wallet controls vault, operator wallets get URI-rotation permission' },
113
+ { value: 'simple', label: 'Simple (recommended)', hint: 'One wallet signs' },
114
+ { value: 'advanced', label: 'Advanced', hint: 'Operators rotate URI' },
132
115
  ]}
133
116
  hintLayout="inline"
134
117
  onSubmit={onCustodySubmit}
@@ -138,12 +121,56 @@ export const CreateFlow: React.FC<CreateFlowProps> = ({
138
121
  )
139
122
  }
140
123
 
124
+ if (step.kind === 'create-import') {
125
+ if (!step.candidates) {
126
+ return (
127
+ <BusyScreen
128
+ title="Checking Existing Notes"
129
+ subtitle={indicator}
130
+ label="scanning for notes to import..."
131
+ onCancel={onBack}
132
+ />
133
+ )
134
+ }
135
+ const candidates = step.candidates
136
+ const summary = candidates
137
+ .map(candidate => `${candidate.source} (${candidate.contentLines} lines)`)
138
+ .join(', ')
139
+ const toPreflight = (importNotes?: typeof candidates) => onSetStep({
140
+ kind: 'create-preflight',
141
+ name: step.name,
142
+ description: step.description,
143
+ ...(step.network ? { network: step.network } : {}),
144
+ custodyMode: step.custodyMode,
145
+ ...(importNotes && importNotes.length ? { importNotes } : {}),
146
+ })
147
+ return (
148
+ <Surface title="Import Existing Notes?" subtitle={indicator} footer="enter selects · esc back">
149
+ <Box flexDirection="column">
150
+ <Text color={theme.textSubtle}>Found local notes not yet captured by any agent: {summary}.</Text>
151
+ <Text color={theme.textSubtle}>Import folds them into this agent&apos;s MEMORY.md and the first encrypted snapshot.</Text>
152
+ </Box>
153
+ <Box marginTop={1}>
154
+ <Select<'import' | 'skip'>
155
+ options={[
156
+ { value: 'import', label: 'Import Into New Agent', hint: 'Adds them to MEMORY.md' },
157
+ { value: 'skip', label: 'Start Fresh', hint: 'Use blank scaffolding', role: 'utility' },
158
+ ]}
159
+ hintLayout="inline"
160
+ onSubmit={choice => toPreflight(choice === 'import' ? candidates : undefined)}
161
+ onCancel={onBack}
162
+ />
163
+ </Box>
164
+ </Surface>
165
+ )
166
+ }
167
+
141
168
  if (step.kind === 'create-preflight') {
142
169
  return (
143
170
  <BusyScreen
144
171
  title="Getting Ready"
145
172
  subtitle={indicator}
146
- label="checking IPFS storage and onchain..."
173
+ label="checking storage..."
147
174
  onCancel={onBack}
148
175
  />
149
176
  )
@@ -182,11 +209,11 @@ export const CreateFlow: React.FC<CreateFlowProps> = ({
182
209
  title={isAdvanced ? 'Connect Owner Wallet' : 'Sign in Wallet'}
183
210
  subtitle={
184
211
  isAdvanced
185
- ? 'This wallet will own the agent token and control the Vault. Operator wallets are configured after minting.'
186
- : 'One browser flow signs, saves the IPFS backup, and submits the token transaction.'
212
+ ? 'Owner wallet controls the Vault. Operators configured after minting.'
213
+ : 'Signs backup and submits mint transaction.'
187
214
  }
188
215
  walletSession={walletSession}
189
- label={isAdvanced ? 'waiting for owner wallet...' : 'waiting for wallet signature...'}
216
+ label={isAdvanced ? 'waiting for owner wallet to mint...' : 'waiting for wallet to mint...'}
190
217
  onCancel={onBack}
191
218
  />
192
219
  )