ethagent 2.2.0 → 2.3.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 (154) hide show
  1. package/package.json +2 -1
  2. package/src/app/FirstRun.tsx +1 -7
  3. package/src/app/FirstRunTimeline.tsx +1 -1
  4. package/src/chat/ChatBottomPane.tsx +20 -11
  5. package/src/chat/ChatScreen.tsx +160 -35
  6. package/src/chat/ConversationStack.tsx +1 -1
  7. package/src/chat/MessageList.tsx +185 -72
  8. package/src/chat/SessionStatus.tsx +3 -1
  9. package/src/chat/chatScreenUtils.ts +11 -15
  10. package/src/chat/chatSessionState.ts +1 -1
  11. package/src/chat/chatTurnOrchestrator.ts +1 -7
  12. package/src/chat/commands.ts +26 -26
  13. package/src/chat/display/DiffView.tsx +193 -0
  14. package/src/chat/display/SyntaxText.tsx +192 -0
  15. package/src/chat/display/toolCallDisplay.ts +103 -0
  16. package/src/chat/display/toolResultDisplay.ts +19 -0
  17. package/src/chat/{ChatInput.tsx → input/ChatInput.tsx} +36 -23
  18. package/src/chat/{TranscriptView.tsx → transcript/TranscriptView.tsx} +24 -50
  19. package/src/chat/{transcriptViewport.ts → transcript/transcriptViewport.ts} +12 -30
  20. package/src/chat/{ContextLimitView.tsx → views/ContextLimitView.tsx} +3 -3
  21. package/src/chat/{ContinuityEditReviewView.tsx → views/ContinuityEditReviewView.tsx} +11 -3
  22. package/src/chat/{CopyPicker.tsx → views/CopyPicker.tsx} +4 -5
  23. package/src/chat/{PermissionPrompt.tsx → views/PermissionPrompt.tsx} +16 -17
  24. package/src/chat/{PermissionsView.tsx → views/PermissionsView.tsx} +6 -6
  25. package/src/chat/{PlanApprovalView.tsx → views/PlanApprovalView.tsx} +4 -4
  26. package/src/chat/{ResumeView.tsx → views/ResumeView.tsx} +35 -35
  27. package/src/chat/views/RewindView.tsx +410 -0
  28. package/src/identity/continuity/privateEdit/diff.ts +2 -78
  29. package/src/identity/hub/OperationalRoutes.tsx +21 -21
  30. package/src/identity/hub/Routes.tsx +13 -13
  31. package/src/identity/hub/{flows/continuity → continuity}/ContinuityDashboardScreen.tsx +9 -9
  32. package/src/identity/hub/{flows/continuity → continuity}/RebackupStorageScreen.tsx +2 -2
  33. package/src/identity/hub/{flows/continuity → continuity}/RecoveryConfirmScreen.tsx +5 -5
  34. package/src/identity/hub/{flows/continuity → continuity}/SavePromptScreen.tsx +5 -5
  35. package/src/identity/hub/{effects/rebackup/runRebackup.ts → continuity/effects.ts} +17 -17
  36. package/src/identity/hub/{effects/rebackup → continuity}/index.ts +1 -1
  37. package/src/identity/hub/{effects/shared → continuity}/snapshot.ts +8 -8
  38. package/src/identity/hub/{effects/rebackup → continuity}/vault.ts +15 -15
  39. package/src/identity/hub/{flows/create → create}/CreateFlow.tsx +13 -13
  40. package/src/identity/hub/{effects/create.ts → create/effects.ts} +4 -4
  41. package/src/identity/hub/{flows/custody → custody}/CustodyEditFlow.tsx +9 -9
  42. package/src/identity/hub/{flows/custody/custodyFlowActions.ts → custody/actions.ts} +6 -6
  43. package/src/identity/hub/{flows/custody/custodyFlowHelpers.ts → custody/helpers.ts} +4 -4
  44. package/src/identity/hub/{effects/vault → custody}/preflight.ts +5 -5
  45. package/src/identity/hub/{flows/custody/custodyFlowRoutes.tsx → custody/routes.tsx} +8 -8
  46. package/src/identity/hub/{flows/custody/custodyEffects.ts → custody/transactions.ts} +9 -9
  47. package/src/identity/hub/{flows/custody/custodyFlowTypes.ts → custody/types.ts} +5 -5
  48. package/src/identity/hub/{flows/custody/custodyFlowEffects.ts → custody/useCustodyEffects.ts} +7 -7
  49. package/src/identity/hub/{flows/custody → custody}/useCustodyFlow.tsx +5 -5
  50. package/src/identity/hub/{flows/ens → ens}/EnsEditAdvancedScreens.tsx +13 -13
  51. package/src/identity/hub/{flows/ens → ens}/EnsEditFlow.tsx +7 -7
  52. package/src/identity/hub/{flows/ens → ens}/EnsEditMaintenanceScreens.tsx +10 -10
  53. package/src/identity/hub/{flows/ens → ens}/EnsEditReviewScreens.tsx +12 -12
  54. package/src/identity/hub/{flows/ens → ens}/EnsEditRunners.tsx +5 -5
  55. package/src/identity/hub/{flows/ens → ens}/EnsEditShared.tsx +10 -10
  56. package/src/identity/hub/{flows/ens → ens}/EnsEditSimpleScreens.tsx +14 -14
  57. package/src/identity/hub/{flows/ens/IdentityHubEnsFlow.tsx → ens/EnsFlow.tsx} +12 -12
  58. package/src/identity/hub/{flows/ens/OperatorWalletsScreen.tsx → ens/EnsOperatorWalletsScreen.tsx} +17 -17
  59. package/src/identity/hub/{advancedEnsValidation.ts → ens/advancedEnsValidation.ts} +2 -2
  60. package/src/identity/hub/{flows/ens/ensEditCopy.ts → ens/editCopy.ts} +3 -3
  61. package/src/identity/hub/{effects/ens/flows.ts → ens/effects.ts} +7 -7
  62. package/src/identity/hub/{effects/ens → ens}/index.ts +1 -1
  63. package/src/identity/hub/{model/ens.ts → ens/state.ts} +1 -1
  64. package/src/identity/hub/{effects/ens → ens}/transactions.ts +239 -239
  65. package/src/identity/hub/{flows/ens/ensEditTypes.ts → ens/types.ts} +7 -7
  66. package/src/identity/hub/identityHubReducer.ts +3 -3
  67. package/src/identity/hub/{flows/profile → profile}/EditProfileFlow.tsx +11 -11
  68. package/src/identity/hub/{effects/publicProfile/runPublicProfileSave.ts → profile/effects.ts} +18 -18
  69. package/src/identity/hub/{model → profile}/identity.ts +3 -3
  70. package/src/identity/hub/{effects/profile/profileState.ts → profile/state.ts} +181 -181
  71. package/src/identity/hub/{flows/restore → restore}/RestoreFlow.tsx +16 -16
  72. package/src/identity/hub/{effects/restore → restore}/apply.ts +10 -10
  73. package/src/identity/hub/{effects/restore → restore}/auth.ts +7 -7
  74. package/src/identity/hub/{effects/restore → restore}/discover.ts +6 -6
  75. package/src/identity/hub/{effects/restore → restore}/envelopes.ts +2 -2
  76. package/src/identity/hub/{effects/restore → restore}/fetch.ts +3 -3
  77. package/src/identity/hub/{effects/restore/shared.ts → restore/helpers.ts} +6 -6
  78. package/src/identity/hub/{effects/restore → restore}/recovery.ts +10 -10
  79. package/src/identity/hub/{effects/restore → restore}/resolve.ts +4 -4
  80. package/src/identity/hub/{effects → restore}/restoreAdmin.ts +1 -1
  81. package/src/identity/hub/{flows/restore/useRestoreFlowEffects.ts → restore/useRestoreEffects.ts} +5 -5
  82. package/src/identity/hub/{flows/settings → settings}/StorageCredentialScreen.tsx +5 -5
  83. package/src/identity/hub/{components → shared/components}/BusyScreen.tsx +4 -4
  84. package/src/identity/hub/{components → shared/components}/DetailsScreen.tsx +4 -4
  85. package/src/identity/hub/{components → shared/components}/ErrorScreen.tsx +4 -4
  86. package/src/identity/hub/{components → shared/components}/FlowTimeline.tsx +1 -1
  87. package/src/identity/hub/{components → shared/components}/IdentitySummary.tsx +8 -8
  88. package/src/identity/hub/{components → shared/components}/MenuScreen.tsx +7 -7
  89. package/src/identity/hub/{components → shared/components}/NetworkScreen.tsx +4 -4
  90. package/src/identity/hub/{components → shared/components}/PinataJwtInput.tsx +4 -4
  91. package/src/identity/hub/{components → shared/components}/UnlinkedIdentityScreen.tsx +5 -5
  92. package/src/identity/hub/{components → shared/components}/WalletApprovalScreen.tsx +6 -6
  93. package/src/identity/hub/{components → shared/components}/menuFlagsFromReconciliation.ts +1 -1
  94. package/src/identity/hub/{effects/shared → shared/effects}/profilePrep.ts +1 -1
  95. package/src/identity/hub/{effects → shared/effects}/receipts.ts +2 -2
  96. package/src/identity/hub/{effects/shared → shared/effects}/sync.ts +4 -4
  97. package/src/identity/hub/{effects → shared/effects}/types.ts +3 -3
  98. package/src/identity/hub/{model → shared/model}/copy.ts +2 -2
  99. package/src/identity/hub/{model → shared/model}/errors.ts +5 -5
  100. package/src/identity/hub/{model → shared/model}/network.ts +3 -3
  101. package/src/identity/hub/{operatorWallets.ts → shared/operatorWallets.ts} +1 -1
  102. package/src/identity/hub/{reconciliation → shared/reconciliation}/agentReconciliation/hook.ts +1 -1
  103. package/src/identity/hub/{reconciliation → shared/reconciliation}/agentReconciliation/ownership.ts +2 -2
  104. package/src/identity/hub/{reconciliation → shared/reconciliation}/agentReconciliation/run.ts +6 -6
  105. package/src/identity/hub/{utils.ts → shared/utils.ts} +5 -5
  106. package/src/identity/hub/{flows/token-transfer/IdentityHubTokenTransferFlow.tsx → transfer/TokenTransferFlow.tsx} +8 -8
  107. package/src/identity/hub/{flows/token-transfer → transfer}/TokenTransferScreens.tsx +14 -14
  108. package/src/identity/hub/{effects/token-transfer/runTokenTransfer.ts → transfer/effects.ts} +16 -16
  109. package/src/identity/hub/{effects/token-transfer → transfer}/progress.ts +1 -1
  110. package/src/identity/hub/useIdentityHubController.ts +11 -11
  111. package/src/identity/hub/useIdentityHubSideEffects.ts +11 -11
  112. package/src/models/ModelPicker.tsx +5 -3
  113. package/src/models/catalog.ts +2 -1
  114. package/src/models/modelPickerOptions.ts +2 -14
  115. package/src/models/providerDisplay.ts +16 -0
  116. package/src/providers/errors.ts +6 -4
  117. package/src/providers/openai-chat.ts +2 -1
  118. package/src/runtime/sessionMode.ts +1 -1
  119. package/src/runtime/systemPrompt.ts +3 -1
  120. package/src/runtime/toolExecution.ts +9 -6
  121. package/src/runtime/turn.ts +29 -0
  122. package/src/storage/rewind.ts +20 -0
  123. package/src/storage/sessions.ts +2 -1
  124. package/src/tools/bashSafety.ts +7 -3
  125. package/src/tools/bashTool.ts +1 -1
  126. package/src/tools/contracts.ts +3 -0
  127. package/src/tools/deleteFileTool.ts +8 -3
  128. package/src/tools/editTool.ts +10 -5
  129. package/src/tools/fileDiff.ts +261 -0
  130. package/src/tools/privateContinuityEditTool.ts +5 -1
  131. package/src/tools/writeFileTool.ts +8 -3
  132. package/src/ui/Spinner.tsx +25 -3
  133. package/src/ui/TextInput.tsx +2 -2
  134. package/src/ui/theme.ts +17 -0
  135. package/src/utils/clipboard.ts +10 -7
  136. package/src/chat/RewindView.tsx +0 -386
  137. package/src/chat/toolResultDisplay.ts +0 -8
  138. package/src/identity/hub/effects/index.ts +0 -73
  139. package/src/identity/hub/effects/publicProfile/index.ts +0 -5
  140. package/src/identity/hub/effects/restore/restoreEffects.ts +0 -22
  141. package/src/identity/hub/effects/token-transfer/index.ts +0 -6
  142. /package/src/chat/{chatInputState.ts → input/chatInputState.ts} +0 -0
  143. /package/src/chat/{chatPaste.ts → input/chatPaste.ts} +0 -0
  144. /package/src/chat/{textCursor.ts → input/textCursor.ts} +0 -0
  145. /package/src/identity/hub/{model/continuity.ts → continuity/state.ts} +0 -0
  146. /package/src/identity/hub/{model/custody.ts → custody/state.ts} +0 -0
  147. /package/src/identity/hub/{effects/restore → restore}/index.ts +0 -0
  148. /package/src/identity/hub/{model → shared/model}/format.ts +0 -0
  149. /package/src/identity/hub/{reconciliation → shared/reconciliation}/agentReconciliation/types.ts +0 -0
  150. /package/src/identity/hub/{reconciliation → shared/reconciliation}/index.ts +0 -0
  151. /package/src/identity/hub/{reconciliation → shared/reconciliation}/useAgentReconciliation.ts +0 -0
  152. /package/src/identity/hub/{reconciliation → shared/reconciliation}/walletSetup.ts +0 -0
  153. /package/src/identity/hub/{txGuard.ts → shared/txGuard.ts} +0 -0
  154. /package/src/identity/hub/{model/transfer.ts → transfer/state.ts} +0 -0
@@ -1,38 +1,38 @@
1
1
  import React from 'react'
2
2
  import { Box, Text } from 'ink'
3
3
  import { getAddress, type Address } from 'viem'
4
- import { Surface } from '../../../../ui/Surface.js'
5
- import { Select, type SelectOption } from '../../../../ui/Select.js'
6
- import { theme } from '../../../../ui/theme.js'
4
+ import { Surface } from '../../../ui/Surface.js'
5
+ import { Select, type SelectOption } from '../../../ui/Select.js'
6
+ import { theme } from '../../../ui/theme.js'
7
7
  import {
8
8
  formatRecordValue,
9
9
  recordLabel,
10
10
  type AgentEnsRecords,
11
11
  type AgentRecordDiff,
12
- } from '../../../ens/agentRecords.js'
13
- import type { EnsValidation } from '../../../ens/ensLookup.js'
12
+ } from '../../ens/agentRecords.js'
13
+ import type { EnsValidation } from '../../ens/ensLookup.js'
14
14
  import type {
15
15
  EnsSetupBlockedPlan,
16
16
  EnsSetupPlan,
17
- } from '../../../ens/ensAutomation.js'
18
- import { createErc8004PublicClient, type Erc8004RegistryConfig } from '../../../registry/erc8004.js'
17
+ } from '../../ens/ensAutomation.js'
18
+ import { createErc8004PublicClient, type Erc8004RegistryConfig } from '../../registry/erc8004.js'
19
19
  import {
20
20
  displayCustodyMode,
21
21
  type CustodyMode,
22
- } from '../../model/custody.js'
23
- import { ensValidationReasonText } from '../../model/ens.js'
24
- import { shortAddress } from '../../model/format.js'
22
+ } from '../custody/state.js'
23
+ import { ensValidationReasonText } from './state.js'
24
+ import { shortAddress } from '../shared/model/format.js'
25
25
  import {
26
26
  manualReasonTitle,
27
27
  modeSwitchHeading,
28
28
  setupSwitchNotice,
29
- } from './ensEditCopy.js'
29
+ } from './editCopy.js'
30
30
  import {
31
31
  EnsSetupRow,
32
32
  footerHint,
33
33
  renderRecordValue,
34
34
  } from './EnsEditShared.js'
35
- import type { EnsIssueValidation } from './ensEditTypes.js'
35
+ import type { EnsIssueValidation } from './types.js'
36
36
 
37
37
  type SimpleEnsIssueScreenProps = {
38
38
  fullName: string
@@ -1,16 +1,16 @@
1
1
  import React from 'react'
2
2
  import type { Address } from 'viem'
3
3
  import { mainnet } from 'viem/chains'
4
- import { useAppInput } from '../../../../app/input/AppInputProvider.js'
4
+ import { useAppInput } from '../../../app/input/AppInputProvider.js'
5
5
  import {
6
6
  createMainnetClient,
7
- } from '../../../ens/ensLookup.js'
8
- import type { EnsSubdomainDeletePlan } from '../../../ens/ensAutomation.js'
7
+ } from '../../ens/ensLookup.js'
8
+ import type { EnsSubdomainDeletePlan } from '../../ens/ensAutomation.js'
9
9
  import {
10
10
  sendBrowserWalletTransaction,
11
11
  type BrowserWalletReady,
12
- } from '../../../wallet/browserWallet.js'
13
- import { WalletApprovalScreen } from '../../components/WalletApprovalScreen.js'
12
+ } from '../../wallet/browserWallet.js'
13
+ import { WalletApprovalScreen } from '../shared/components/WalletApprovalScreen.js'
14
14
 
15
15
  export const EscCancel: React.FC<{ onCancel: () => void }> = ({ onCancel }) => {
16
16
  useAppInput((_input, key) => {
@@ -1,26 +1,26 @@
1
1
  import React from 'react'
2
2
  import { Box, Text } from 'ink'
3
3
  import type { Address } from 'viem'
4
- import { Surface } from '../../../../ui/Surface.js'
5
- import { TextInput } from '../../../../ui/TextInput.js'
6
- import { theme } from '../../../../ui/theme.js'
4
+ import { Surface } from '../../../ui/Surface.js'
5
+ import { TextInput } from '../../../ui/TextInput.js'
6
+ import { theme } from '../../../ui/theme.js'
7
7
  import {
8
8
  formatRecordValue,
9
9
  type AgentEnsRecordState,
10
- } from '../../../ens/agentRecords.js'
10
+ } from '../../ens/agentRecords.js'
11
11
  import {
12
12
  isEthDomain,
13
13
  sanitizeSubdomainPrefix,
14
- } from '../../../ens/ensLookup.js'
14
+ } from '../../ens/ensLookup.js'
15
15
  import {
16
16
  displayCustodyMode,
17
17
  readIdentityStateString,
18
18
  type CustodyMode,
19
- } from '../../model/custody.js'
20
- import { ensValidationReasonText } from '../../model/ens.js'
21
- import { shortAddress } from '../../model/format.js'
22
- import { readValidationFromState } from './ensEditCopy.js'
23
- import type { EnsEditProps } from './ensEditTypes.js'
19
+ } from '../custody/state.js'
20
+ import { ensValidationReasonText } from './state.js'
21
+ import { shortAddress } from '../shared/model/format.js'
22
+ import { readValidationFromState } from './editCopy.js'
23
+ import type { EnsEditProps } from './types.js'
24
24
 
25
25
  export const footerHint = (hint: string) => <Text color={theme.dim}>{hint}</Text>
26
26
 
@@ -1,27 +1,27 @@
1
1
  import React from 'react'
2
2
  import { Box, Text } from 'ink'
3
3
  import { type Address } from 'viem'
4
- import { Surface } from '../../../../ui/Surface.js'
5
- import { Select, type SelectOption } from '../../../../ui/Select.js'
6
- import { Spinner } from '../../../../ui/Spinner.js'
7
- import { theme } from '../../../../ui/theme.js'
4
+ import { Surface } from '../../../ui/Surface.js'
5
+ import { Select, type SelectOption } from '../../../ui/Select.js'
6
+ import { Spinner } from '../../../ui/Spinner.js'
7
+ import { theme } from '../../../ui/theme.js'
8
8
  import {
9
9
  isEthDomain,
10
10
  normalizeEthDomain,
11
- } from '../../../ens/ensLookup.js'
12
- import { isRootEthName } from '../../../ens/ensAutomation.js'
13
- import type { Erc8004RegistryConfig } from '../../../registry/erc8004.js'
14
- import type { BrowserWalletReady } from '../../../wallet/browserWallet.js'
11
+ } from '../../ens/ensLookup.js'
12
+ import { isRootEthName } from '../../ens/ensAutomation.js'
13
+ import type { Erc8004RegistryConfig } from '../../registry/erc8004.js'
14
+ import type { BrowserWalletReady } from '../../wallet/browserWallet.js'
15
15
  import {
16
16
  type CustodyMode,
17
- } from '../../model/custody.js'
18
- import { shortAddress } from '../../model/format.js'
17
+ } from '../custody/state.js'
18
+ import { shortAddress } from '../shared/model/format.js'
19
19
  import {
20
20
  recordsDiffHasChanges,
21
21
  type EnsLinkOptions,
22
- } from './ensEditCopy.js'
23
- import { openExternalUrl } from '../../../../utils/openExternal.js'
24
- import { TextInput } from '../../../../ui/TextInput.js'
22
+ } from './editCopy.js'
23
+ import { openExternalUrl } from '../../../utils/openExternal.js'
24
+ import { TextInput } from '../../../ui/TextInput.js'
25
25
  import {
26
26
  EnsStatusBanner,
27
27
  footerHint,
@@ -38,7 +38,7 @@ import type {
38
38
  DiscoveryState,
39
39
  EnsEditProps,
40
40
  EnsPhase,
41
- } from './ensEditTypes.js'
41
+ } from './types.js'
42
42
 
43
43
  const ENS_DOMAINS_URL = 'https://app.ens.domains'
44
44
 
@@ -1,14 +1,14 @@
1
1
  import React from 'react'
2
- import { openImageFilePicker } from '../../../profile/imagePicker.js'
3
- import { readOwnerAddressField } from '../../../identityCompat.js'
4
- import type { BrowserWalletReady } from '../../../wallet/browserWallet.js'
5
- import type { ProfileUpdates, Step } from '../../identityHubReducer.js'
6
- import { readCustodyMode } from '../../model/custody.js'
7
- import { OperatorWalletsScreen } from './OperatorWalletsScreen.js'
2
+ import { openImageFilePicker } from '../../profile/imagePicker.js'
3
+ import { readOwnerAddressField } from '../../identityCompat.js'
4
+ import type { BrowserWalletReady } from '../../wallet/browserWallet.js'
5
+ import type { ProfileUpdates, Step } from '../identityHubReducer.js'
6
+ import { readCustodyMode } from '../custody/state.js'
7
+ import { OperatorWalletsScreen } from './EnsOperatorWalletsScreen.js'
8
8
  import { EDIT_PROFILE_STEPS, EditProfileFlow } from '../profile/EditProfileFlow.js'
9
- import { FlowTimeline } from '../../components/FlowTimeline.js'
10
- import { WalletApprovalScreen } from '../../components/WalletApprovalScreen.js'
11
- import type { AgentReconciliation } from '../../reconciliation/index.js'
9
+ import { FlowTimeline } from '../shared/components/FlowTimeline.js'
10
+ import { WalletApprovalScreen } from '../shared/components/WalletApprovalScreen.js'
11
+ import type { AgentReconciliation } from '../shared/reconciliation/index.js'
12
12
 
13
13
  type StepOf<K extends Step['kind']> = Extract<Step, { kind: K }>
14
14
 
@@ -25,7 +25,7 @@ type IdentityHubEnsStep = StepOf<
25
25
  | 'public-profile-signing'
26
26
  >
27
27
 
28
- type IdentityHubEnsFlowProps = {
28
+ type EnsFlowProps = {
29
29
  step: IdentityHubEnsStep
30
30
  walletSession: BrowserWalletReady | null
31
31
  reconciliation: AgentReconciliation
@@ -37,7 +37,7 @@ type IdentityHubEnsFlowProps = {
37
37
  onWithdrawTokenForEns: (step: Step) => void
38
38
  }
39
39
 
40
- export function isIdentityHubEnsStep(step: Step): step is IdentityHubEnsStep {
40
+ export function isEnsStep(step: Step): step is IdentityHubEnsStep {
41
41
  return step.kind === 'manage-ens-operators'
42
42
  || step.kind === 'edit-profile-name'
43
43
  || step.kind === 'edit-profile-description'
@@ -50,7 +50,7 @@ export function isIdentityHubEnsStep(step: Step): step is IdentityHubEnsStep {
50
50
  || step.kind === 'public-profile-signing'
51
51
  }
52
52
 
53
- export const IdentityHubEnsFlow: React.FC<IdentityHubEnsFlowProps> = ({
53
+ export const EnsFlow: React.FC<EnsFlowProps> = ({
54
54
  step,
55
55
  walletSession,
56
56
  reconciliation,
@@ -1,31 +1,31 @@
1
1
  import React from 'react'
2
2
  import { Box, Text } from 'ink'
3
3
  import { getAddress, isAddress, type Address } from 'viem'
4
- import { Surface } from '../../../../ui/Surface.js'
5
- import { Select, type SelectOption } from '../../../../ui/Select.js'
6
- import { Spinner } from '../../../../ui/Spinner.js'
7
- import { theme } from '../../../../ui/theme.js'
8
- import { useAppInput } from '../../../../app/input/AppInputProvider.js'
9
- import { openExternalUrl } from '../../../../utils/openExternal.js'
10
- import type { EthagentIdentity } from '../../../../storage/config.js'
11
- import { readOwnerAddressField } from '../../../identityCompat.js'
12
- import type { Erc8004RegistryConfig } from '../../../registry/erc8004.js'
4
+ import { Surface } from '../../../ui/Surface.js'
5
+ import { Select, type SelectOption } from '../../../ui/Select.js'
6
+ import { Spinner } from '../../../ui/Spinner.js'
7
+ import { theme } from '../../../ui/theme.js'
8
+ import { useAppInput } from '../../../app/input/AppInputProvider.js'
9
+ import { openExternalUrl } from '../../../utils/openExternal.js'
10
+ import type { EthagentIdentity } from '../../../storage/config.js'
11
+ import { readOwnerAddressField } from '../../identityCompat.js'
12
+ import type { Erc8004RegistryConfig } from '../../registry/erc8004.js'
13
13
  import {
14
14
  createWalletRestoreAccessChallenge,
15
15
  createWalletRestoreAccessKey,
16
- } from '../../../continuity/envelope.js'
17
- import { requestBrowserWalletSignature, type BrowserWalletReady } from '../../../wallet/browserWallet.js'
18
- import { FlowTimeline } from '../../components/FlowTimeline.js'
19
- import { OPEN_BROWSER_HINT } from '../../components/WalletApprovalScreen.js'
20
- import { readCustodyMode } from '../../model/custody.js'
21
- import { shortAddress } from '../../model/format.js'
22
- import type { ProfileUpdates } from '../../identityHubReducer.js'
16
+ } from '../../continuity/envelope.js'
17
+ import { requestBrowserWalletSignature, type BrowserWalletReady } from '../../wallet/browserWallet.js'
18
+ import { FlowTimeline } from '../shared/components/FlowTimeline.js'
19
+ import { OPEN_BROWSER_HINT } from '../shared/components/WalletApprovalScreen.js'
20
+ import { readCustodyMode } from '../custody/state.js'
21
+ import { shortAddress } from '../shared/model/format.js'
22
+ import type { ProfileUpdates } from '../identityHubReducer.js'
23
23
  import {
24
24
  normalizeApprovedOperatorWallets,
25
25
  removeApprovedOperatorWallet,
26
26
  upsertApprovedOperatorWallet,
27
27
  type ApprovedOperatorWalletRecord,
28
- } from '../../operatorWallets.js'
28
+ } from '../shared/operatorWallets.js'
29
29
 
30
30
  type OperatorPhase =
31
31
  | { kind: 'main'; notice?: string; error?: string }
@@ -1,9 +1,9 @@
1
1
  import { getAddress, type Address, type PublicClient } from 'viem'
2
- import { validateAgentEnsLink, type DiscoverOptions, type EnsValidation } from '../ens/ensLookup.js'
2
+ import { validateAgentEnsLink, type DiscoverOptions, type EnsValidation } from '../../ens/ensLookup.js'
3
3
  import {
4
4
  validateErc8004TokenOwner,
5
5
  type Erc8004RegistryConfig,
6
- } from '../registry/erc8004.js'
6
+ } from '../../registry/erc8004.js'
7
7
 
8
8
  type TokenOwnerReadClient = Pick<PublicClient, 'readContract'>
9
9
 
@@ -1,7 +1,7 @@
1
1
  import { getAddress, type Address } from 'viem'
2
- import type { AgentEnsRecords, AgentRecordDiff } from '../../../ens/agentRecords.js'
3
- import type { EnsRegistryAction, EnsSetupBlockedPlan } from '../../../ens/ensAutomation.js'
4
- import type { CustodyMode } from '../../model/custody.js'
2
+ import type { AgentEnsRecords, AgentRecordDiff } from '../../ens/agentRecords.js'
3
+ import type { EnsRegistryAction, EnsSetupBlockedPlan } from '../../ens/ensAutomation.js'
4
+ import type { CustodyMode } from '../custody/state.js'
5
5
 
6
6
  export type EnsLinkOptions = {
7
7
  mode: 'simple' | 'advanced'
@@ -1,19 +1,19 @@
1
1
  import type { Address, PublicClient } from 'viem'
2
- import type { EthagentIdentity } from '../../../../storage/config.js'
3
- import type { AgentEnsRecordState, AgentEnsRecords } from '../../../ens/agentRecords.js'
4
- import type { Erc8004RegistryConfig } from '../../../registry/erc8004.js'
2
+ import type { EthagentIdentity } from '../../../storage/config.js'
3
+ import type { AgentEnsRecordState, AgentEnsRecords } from '../../ens/agentRecords.js'
4
+ import type { Erc8004RegistryConfig } from '../../registry/erc8004.js'
5
5
  import {
6
6
  openBrowserWalletSession,
7
7
  type WalletPurpose,
8
- } from '../../../wallet/browserWallet.js'
9
- import type { ProfileUpdates, Step } from '../../identityHubReducer.js'
10
- import type { EffectCallbacks, EnsClearProgress, EnsLinkProgress, EnsUpdateProgress } from '../types.js'
8
+ } from '../../wallet/browserWallet.js'
9
+ import type { ProfileUpdates, Step } from '../identityHubReducer.js'
10
+ import type { EffectCallbacks, EnsClearProgress, EnsLinkProgress, EnsUpdateProgress } from '../shared/effects/types.js'
11
11
  import {
12
12
  runEnsSetupRecordsTransaction,
13
13
  runEnsSetupRegistryTransaction,
14
14
  runUpdateEnsRecords,
15
15
  } from './transactions.js'
16
- import { runRebackupSigningInSession } from '../rebackup/runRebackup.js'
16
+ import { runRebackupSigningInSession } from '../continuity/effects.js'
17
17
 
18
18
  type EnsRecordsFlowArgs = {
19
19
  identity: EthagentIdentity
@@ -2,7 +2,7 @@ export {
2
2
  runEnsLinkFlow,
3
3
  runEnsUnlinkFlow,
4
4
  runEnsUpdateFlow,
5
- } from './flows.js'
5
+ } from './effects.js'
6
6
  export {
7
7
  ensRecordWritesForUpdate,
8
8
  runEnsSetupRecordsTransaction,
@@ -1,5 +1,5 @@
1
1
  import type { EthagentIdentity } from '../../../storage/config.js'
2
- import { readIdentityStateString } from './custody.js'
2
+ import { readIdentityStateString } from '../custody/state.js'
3
3
 
4
4
  export type EnsStatusView =
5
5
  | { kind: 'none' }