ethagent 2.2.0 → 2.4.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.
- package/README.md +11 -0
- package/package.json +2 -1
- package/src/app/FirstRun.tsx +3 -7
- package/src/app/FirstRunTimeline.tsx +1 -1
- package/src/chat/ChatBottomPane.tsx +29 -11
- package/src/chat/ChatScreen.tsx +169 -38
- package/src/chat/ConversationStack.tsx +1 -1
- package/src/chat/MessageList.tsx +185 -72
- package/src/chat/SessionStatus.tsx +3 -1
- package/src/chat/chatScreenUtils.ts +11 -15
- package/src/chat/chatSessionState.ts +5 -2
- package/src/chat/chatTurnOrchestrator.ts +7 -9
- package/src/chat/commands.ts +26 -26
- package/src/chat/display/DiffView.tsx +193 -0
- package/src/chat/display/SyntaxText.tsx +192 -0
- package/src/chat/display/toolCallDisplay.ts +103 -0
- package/src/chat/display/toolResultDisplay.ts +19 -0
- package/src/chat/{ChatInput.tsx → input/ChatInput.tsx} +61 -25
- package/src/chat/input/imageRefs.ts +30 -0
- package/src/chat/{TranscriptView.tsx → transcript/TranscriptView.tsx} +24 -50
- package/src/chat/{transcriptViewport.ts → transcript/transcriptViewport.ts} +12 -30
- package/src/chat/{ContextLimitView.tsx → views/ContextLimitView.tsx} +3 -3
- package/src/chat/{ContinuityEditReviewView.tsx → views/ContinuityEditReviewView.tsx} +11 -3
- package/src/chat/{CopyPicker.tsx → views/CopyPicker.tsx} +4 -5
- package/src/chat/{PermissionPrompt.tsx → views/PermissionPrompt.tsx} +16 -17
- package/src/chat/{PermissionsView.tsx → views/PermissionsView.tsx} +6 -6
- package/src/chat/{PlanApprovalView.tsx → views/PlanApprovalView.tsx} +4 -4
- package/src/chat/{ResumeView.tsx → views/ResumeView.tsx} +50 -41
- package/src/chat/views/RewindView.tsx +410 -0
- package/src/identity/continuity/privateEdit/diff.ts +2 -78
- package/src/identity/hub/OperationalRoutes.tsx +21 -21
- package/src/identity/hub/Routes.tsx +13 -13
- package/src/identity/hub/{flows/continuity → continuity}/ContinuityDashboardScreen.tsx +9 -9
- package/src/identity/hub/{flows/continuity → continuity}/RebackupStorageScreen.tsx +2 -2
- package/src/identity/hub/{flows/continuity → continuity}/RecoveryConfirmScreen.tsx +5 -5
- package/src/identity/hub/{flows/continuity → continuity}/SavePromptScreen.tsx +5 -5
- package/src/identity/hub/{effects/rebackup/runRebackup.ts → continuity/effects.ts} +17 -17
- package/src/identity/hub/{effects/rebackup → continuity}/index.ts +1 -1
- package/src/identity/hub/{effects/shared → continuity}/snapshot.ts +8 -8
- package/src/identity/hub/{effects/rebackup → continuity}/vault.ts +15 -15
- package/src/identity/hub/{flows/create → create}/CreateFlow.tsx +13 -13
- package/src/identity/hub/{effects/create.ts → create/effects.ts} +4 -4
- package/src/identity/hub/{flows/custody → custody}/CustodyEditFlow.tsx +9 -9
- package/src/identity/hub/{flows/custody/custodyFlowActions.ts → custody/actions.ts} +6 -6
- package/src/identity/hub/{flows/custody/custodyFlowHelpers.ts → custody/helpers.ts} +4 -4
- package/src/identity/hub/{effects/vault → custody}/preflight.ts +5 -5
- package/src/identity/hub/{flows/custody/custodyFlowRoutes.tsx → custody/routes.tsx} +8 -8
- package/src/identity/hub/{flows/custody/custodyEffects.ts → custody/transactions.ts} +9 -9
- package/src/identity/hub/{flows/custody/custodyFlowTypes.ts → custody/types.ts} +5 -5
- package/src/identity/hub/{flows/custody/custodyFlowEffects.ts → custody/useCustodyEffects.ts} +7 -7
- package/src/identity/hub/{flows/custody → custody}/useCustodyFlow.tsx +5 -5
- package/src/identity/hub/{flows/ens → ens}/EnsEditAdvancedScreens.tsx +13 -13
- package/src/identity/hub/{flows/ens → ens}/EnsEditFlow.tsx +7 -7
- package/src/identity/hub/{flows/ens → ens}/EnsEditMaintenanceScreens.tsx +10 -10
- package/src/identity/hub/{flows/ens → ens}/EnsEditReviewScreens.tsx +12 -12
- package/src/identity/hub/{flows/ens → ens}/EnsEditRunners.tsx +5 -5
- package/src/identity/hub/{flows/ens → ens}/EnsEditShared.tsx +10 -10
- package/src/identity/hub/{flows/ens → ens}/EnsEditSimpleScreens.tsx +14 -14
- package/src/identity/hub/{flows/ens/IdentityHubEnsFlow.tsx → ens/EnsFlow.tsx} +12 -12
- package/src/identity/hub/{flows/ens/OperatorWalletsScreen.tsx → ens/EnsOperatorWalletsScreen.tsx} +17 -17
- package/src/identity/hub/{advancedEnsValidation.ts → ens/advancedEnsValidation.ts} +2 -2
- package/src/identity/hub/{flows/ens/ensEditCopy.ts → ens/editCopy.ts} +3 -3
- package/src/identity/hub/{effects/ens/flows.ts → ens/effects.ts} +7 -7
- package/src/identity/hub/{effects/ens → ens}/index.ts +1 -1
- package/src/identity/hub/{model/ens.ts → ens/state.ts} +1 -1
- package/src/identity/hub/{effects/ens → ens}/transactions.ts +239 -239
- package/src/identity/hub/{flows/ens/ensEditTypes.ts → ens/types.ts} +7 -7
- package/src/identity/hub/identityHubReducer.ts +3 -3
- package/src/identity/hub/{flows/profile → profile}/EditProfileFlow.tsx +11 -11
- package/src/identity/hub/{effects/publicProfile/runPublicProfileSave.ts → profile/effects.ts} +18 -18
- package/src/identity/hub/{model → profile}/identity.ts +3 -3
- package/src/identity/hub/{effects/profile/profileState.ts → profile/state.ts} +181 -181
- package/src/identity/hub/{flows/restore → restore}/RestoreFlow.tsx +16 -16
- package/src/identity/hub/{effects/restore → restore}/apply.ts +10 -10
- package/src/identity/hub/{effects/restore → restore}/auth.ts +7 -7
- package/src/identity/hub/{effects/restore → restore}/discover.ts +6 -6
- package/src/identity/hub/{effects/restore → restore}/envelopes.ts +2 -2
- package/src/identity/hub/{effects/restore → restore}/fetch.ts +3 -3
- package/src/identity/hub/{effects/restore/shared.ts → restore/helpers.ts} +6 -6
- package/src/identity/hub/{effects/restore → restore}/recovery.ts +10 -10
- package/src/identity/hub/{effects/restore → restore}/resolve.ts +4 -4
- package/src/identity/hub/{effects → restore}/restoreAdmin.ts +1 -1
- package/src/identity/hub/{flows/restore/useRestoreFlowEffects.ts → restore/useRestoreEffects.ts} +5 -5
- package/src/identity/hub/{flows/settings → settings}/StorageCredentialScreen.tsx +5 -5
- package/src/identity/hub/{components → shared/components}/BusyScreen.tsx +4 -4
- package/src/identity/hub/{components → shared/components}/DetailsScreen.tsx +4 -4
- package/src/identity/hub/{components → shared/components}/ErrorScreen.tsx +4 -4
- package/src/identity/hub/{components → shared/components}/FlowTimeline.tsx +1 -1
- package/src/identity/hub/{components → shared/components}/IdentitySummary.tsx +8 -8
- package/src/identity/hub/{components → shared/components}/MenuScreen.tsx +7 -7
- package/src/identity/hub/{components → shared/components}/NetworkScreen.tsx +4 -4
- package/src/identity/hub/{components → shared/components}/PinataJwtInput.tsx +4 -4
- package/src/identity/hub/{components → shared/components}/UnlinkedIdentityScreen.tsx +5 -5
- package/src/identity/hub/{components → shared/components}/WalletApprovalScreen.tsx +6 -6
- package/src/identity/hub/{components → shared/components}/menuFlagsFromReconciliation.ts +1 -1
- package/src/identity/hub/{effects/shared → shared/effects}/profilePrep.ts +1 -1
- package/src/identity/hub/{effects → shared/effects}/receipts.ts +2 -2
- package/src/identity/hub/{effects/shared → shared/effects}/sync.ts +4 -4
- package/src/identity/hub/{effects → shared/effects}/types.ts +3 -3
- package/src/identity/hub/{model → shared/model}/copy.ts +2 -2
- package/src/identity/hub/{model → shared/model}/errors.ts +5 -5
- package/src/identity/hub/{model → shared/model}/network.ts +3 -3
- package/src/identity/hub/{operatorWallets.ts → shared/operatorWallets.ts} +1 -1
- package/src/identity/hub/{reconciliation → shared/reconciliation}/agentReconciliation/hook.ts +1 -1
- package/src/identity/hub/{reconciliation → shared/reconciliation}/agentReconciliation/ownership.ts +2 -2
- package/src/identity/hub/{reconciliation → shared/reconciliation}/agentReconciliation/run.ts +6 -6
- package/src/identity/hub/{utils.ts → shared/utils.ts} +5 -5
- package/src/identity/hub/{flows/token-transfer/IdentityHubTokenTransferFlow.tsx → transfer/TokenTransferFlow.tsx} +8 -8
- package/src/identity/hub/{flows/token-transfer → transfer}/TokenTransferScreens.tsx +14 -14
- package/src/identity/hub/{effects/token-transfer/runTokenTransfer.ts → transfer/effects.ts} +16 -16
- package/src/identity/hub/{effects/token-transfer → transfer}/progress.ts +1 -1
- package/src/identity/hub/useIdentityHubController.ts +11 -11
- package/src/identity/hub/useIdentityHubSideEffects.ts +11 -11
- package/src/models/ModelPicker.tsx +143 -9
- package/src/models/catalog.ts +2 -1
- package/src/models/huggingface.ts +180 -2
- package/src/models/llamacpp.ts +110 -15
- package/src/models/llamacppPreflight.ts +30 -11
- package/src/models/modelPickerOptions.ts +16 -15
- package/src/models/providerDisplay.ts +16 -0
- package/src/providers/anthropic.ts +36 -5
- package/src/providers/contracts.ts +9 -1
- package/src/providers/errors.ts +6 -4
- package/src/providers/gemini.ts +29 -3
- package/src/providers/openai-chat.ts +83 -3
- package/src/providers/openai-responses-format.ts +29 -8
- package/src/providers/openai-responses.ts +22 -7
- package/src/providers/registry.ts +1 -0
- package/src/runtime/sessionMode.ts +1 -1
- package/src/runtime/systemPrompt.ts +3 -1
- package/src/runtime/toolExecution.ts +9 -6
- package/src/runtime/turn.ts +29 -0
- package/src/storage/config.ts +1 -0
- package/src/storage/rewind.ts +20 -0
- package/src/storage/sessions.ts +16 -3
- package/src/tools/bashSafety.ts +7 -3
- package/src/tools/bashTool.ts +1 -1
- package/src/tools/contracts.ts +3 -0
- package/src/tools/deleteFileTool.ts +8 -3
- package/src/tools/editTool.ts +10 -5
- package/src/tools/fileDiff.ts +261 -0
- package/src/tools/privateContinuityEditTool.ts +5 -1
- package/src/tools/writeFileTool.ts +8 -3
- package/src/ui/Spinner.tsx +39 -5
- package/src/ui/TextInput.tsx +2 -2
- package/src/ui/theme.ts +19 -0
- package/src/utils/clipboard.ts +10 -7
- package/src/utils/images.ts +140 -0
- package/src/utils/messages.ts +2 -0
- package/src/chat/RewindView.tsx +0 -386
- package/src/chat/toolResultDisplay.ts +0 -8
- package/src/identity/hub/effects/index.ts +0 -73
- package/src/identity/hub/effects/publicProfile/index.ts +0 -5
- package/src/identity/hub/effects/restore/restoreEffects.ts +0 -22
- package/src/identity/hub/effects/token-transfer/index.ts +0 -6
- /package/src/chat/{chatInputState.ts → input/chatInputState.ts} +0 -0
- /package/src/chat/{chatPaste.ts → input/chatPaste.ts} +0 -0
- /package/src/chat/{textCursor.ts → input/textCursor.ts} +0 -0
- /package/src/identity/hub/{model/continuity.ts → continuity/state.ts} +0 -0
- /package/src/identity/hub/{model/custody.ts → custody/state.ts} +0 -0
- /package/src/identity/hub/{effects/restore → restore}/index.ts +0 -0
- /package/src/identity/hub/{model → shared/model}/format.ts +0 -0
- /package/src/identity/hub/{reconciliation → shared/reconciliation}/agentReconciliation/types.ts +0 -0
- /package/src/identity/hub/{reconciliation → shared/reconciliation}/index.ts +0 -0
- /package/src/identity/hub/{reconciliation → shared/reconciliation}/useAgentReconciliation.ts +0 -0
- /package/src/identity/hub/{reconciliation → shared/reconciliation}/walletSetup.ts +0 -0
- /package/src/identity/hub/{txGuard.ts → shared/txGuard.ts} +0 -0
- /package/src/identity/hub/{model/transfer.ts → transfer/state.ts} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { CustodyFlow, CustodyFlowDeps } from './
|
|
2
|
-
import { createCustodyFlowActions } from './
|
|
3
|
-
import { useCustodyTransactionEffects } from './
|
|
1
|
+
import type { CustodyFlow, CustodyFlowDeps } from './types.js'
|
|
2
|
+
import { createCustodyFlowActions } from './actions.js'
|
|
3
|
+
import { useCustodyTransactionEffects } from './useCustodyEffects.js'
|
|
4
4
|
import {
|
|
5
5
|
renderCustodyStep,
|
|
6
6
|
renderRebackupSubtitle,
|
|
7
|
-
} from './
|
|
7
|
+
} from './routes.js'
|
|
8
8
|
|
|
9
9
|
export function useCustodyFlow(deps: CustodyFlowDeps): CustodyFlow {
|
|
10
10
|
useCustodyTransactionEffects(deps)
|
|
@@ -22,4 +22,4 @@ export type {
|
|
|
22
22
|
CustodyFlowDeps,
|
|
23
23
|
GuardOwnership,
|
|
24
24
|
TriggerRebackup,
|
|
25
|
-
} from './
|
|
25
|
+
} from './types.js'
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { Box, Text } from 'ink'
|
|
3
3
|
import { type Address } from 'viem'
|
|
4
|
-
import { Surface } from '
|
|
5
|
-
import { Select } from '
|
|
6
|
-
import { TextInput } from '
|
|
7
|
-
import { Spinner } from '
|
|
8
|
-
import { theme } from '
|
|
4
|
+
import { Surface } from '../../../ui/Surface.js'
|
|
5
|
+
import { Select } from '../../../ui/Select.js'
|
|
6
|
+
import { TextInput } from '../../../ui/TextInput.js'
|
|
7
|
+
import { Spinner } from '../../../ui/Spinner.js'
|
|
8
|
+
import { theme } from '../../../ui/theme.js'
|
|
9
9
|
import {
|
|
10
10
|
normalizeEthDomain,
|
|
11
11
|
sanitizeSubdomainPrefix,
|
|
12
|
-
} from '
|
|
13
|
-
import { isRootEthName } from '
|
|
14
|
-
import type { Erc8004RegistryConfig } from '
|
|
12
|
+
} from '../../ens/ensLookup.js'
|
|
13
|
+
import { isRootEthName } from '../../ens/ensAutomation.js'
|
|
14
|
+
import type { Erc8004RegistryConfig } from '../../registry/erc8004.js'
|
|
15
15
|
import {
|
|
16
16
|
type CustodyMode,
|
|
17
|
-
} from '
|
|
18
|
-
import { shortAddress } from '
|
|
17
|
+
} from '../custody/state.js'
|
|
18
|
+
import { shortAddress } from '../shared/model/format.js'
|
|
19
19
|
import {
|
|
20
20
|
footerHint,
|
|
21
21
|
} from './EnsEditShared.js'
|
|
22
|
-
import { IdentitySummary } from '
|
|
22
|
+
import { IdentitySummary } from '../shared/components/IdentitySummary.js'
|
|
23
23
|
import {
|
|
24
24
|
EnsSetupBlockedScreen,
|
|
25
25
|
EnsSetupReviewScreen,
|
|
@@ -28,8 +28,8 @@ import { EscCancel } from './EnsEditRunners.js'
|
|
|
28
28
|
import type {
|
|
29
29
|
EnsEditProps,
|
|
30
30
|
EnsPhase,
|
|
31
|
-
} from './
|
|
32
|
-
import type { AgentReconciliation } from '
|
|
31
|
+
} from './types.js'
|
|
32
|
+
import type { AgentReconciliation } from '../shared/reconciliation/index.js'
|
|
33
33
|
|
|
34
34
|
type AdvancedScreenProps = {
|
|
35
35
|
phase: EnsPhase
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { getAddress, type Address } from 'viem'
|
|
3
|
-
import type { BrowserWalletReady } from '
|
|
3
|
+
import type { BrowserWalletReady } from '../../wallet/browserWallet.js'
|
|
4
4
|
import {
|
|
5
5
|
AGENT_RECORD_READ_KEY_LIST,
|
|
6
6
|
buildAgentEnsRecords,
|
|
7
7
|
diffRecords,
|
|
8
8
|
recordsFromTextMap,
|
|
9
|
-
} from '
|
|
9
|
+
} from '../../ens/agentRecords.js'
|
|
10
10
|
import {
|
|
11
11
|
discoverOwnedEnsNameDetails,
|
|
12
12
|
readEthagentTextRecords,
|
|
13
13
|
sanitizeSubdomainPrefix,
|
|
14
14
|
splitSubdomainName,
|
|
15
15
|
validateAgentEnsLink,
|
|
16
|
-
} from '
|
|
16
|
+
} from '../../ens/ensLookup.js'
|
|
17
17
|
import {
|
|
18
18
|
preflightDeleteSubdomain,
|
|
19
19
|
preflightEnsRoot,
|
|
20
20
|
preflightEnsSetup,
|
|
21
|
-
} from '
|
|
21
|
+
} from '../../ens/ensAutomation.js'
|
|
22
22
|
import {
|
|
23
23
|
readCustodyMode,
|
|
24
24
|
readIdentityStateString,
|
|
25
|
-
} from '
|
|
25
|
+
} from '../custody/state.js'
|
|
26
26
|
import {
|
|
27
27
|
discoveryErrorMessage,
|
|
28
28
|
emptyAgentEnsRecords,
|
|
29
29
|
networkLabelForChainId,
|
|
30
30
|
type EnsLinkOptions,
|
|
31
|
-
} from './
|
|
31
|
+
} from './editCopy.js'
|
|
32
32
|
import { rootErrorMessage } from './EnsEditShared.js'
|
|
33
33
|
import { renderAdvancedEnsPhase } from './EnsEditAdvancedScreens.js'
|
|
34
34
|
import { renderEnsMaintenancePhase } from './EnsEditMaintenanceScreens.js'
|
|
@@ -37,7 +37,7 @@ import type {
|
|
|
37
37
|
DiscoveryState,
|
|
38
38
|
EnsEditProps,
|
|
39
39
|
EnsPhase,
|
|
40
|
-
} from './
|
|
40
|
+
} from './types.js'
|
|
41
41
|
|
|
42
42
|
export type { EnsLinkOptions }
|
|
43
43
|
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { Box, Text } from 'ink'
|
|
3
3
|
import type { Address } from 'viem'
|
|
4
|
-
import { Surface } from '
|
|
5
|
-
import { Select } from '
|
|
6
|
-
import { Spinner } from '
|
|
7
|
-
import { theme } from '
|
|
8
|
-
import type { BrowserWalletReady } from '
|
|
4
|
+
import { Surface } from '../../../ui/Surface.js'
|
|
5
|
+
import { Select } from '../../../ui/Select.js'
|
|
6
|
+
import { Spinner } from '../../../ui/Spinner.js'
|
|
7
|
+
import { theme } from '../../../ui/theme.js'
|
|
8
|
+
import type { BrowserWalletReady } from '../../wallet/browserWallet.js'
|
|
9
9
|
import {
|
|
10
10
|
type CustodyMode,
|
|
11
|
-
} from '
|
|
12
|
-
import { shortAddress } from '
|
|
11
|
+
} from '../custody/state.js'
|
|
12
|
+
import { shortAddress } from '../shared/model/format.js'
|
|
13
13
|
import {
|
|
14
14
|
emptyAgentEnsRecords,
|
|
15
15
|
recordsHaveCurrentValues,
|
|
16
16
|
unlinkEnsLinkOptions,
|
|
17
|
-
} from './
|
|
17
|
+
} from './editCopy.js'
|
|
18
18
|
import {
|
|
19
19
|
EnsSetupRow,
|
|
20
20
|
footerHint,
|
|
21
21
|
} from './EnsEditShared.js'
|
|
22
|
-
import { IdentitySummary } from '
|
|
22
|
+
import { IdentitySummary } from '../shared/components/IdentitySummary.js'
|
|
23
23
|
import { UnlinkEnsReviewScreen } from './EnsEditReviewScreens.js'
|
|
24
24
|
import {
|
|
25
25
|
DeleteSubdomainTxRunner,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
import type {
|
|
29
29
|
EnsEditProps,
|
|
30
30
|
EnsPhase,
|
|
31
|
-
} from './
|
|
31
|
+
} from './types.js'
|
|
32
32
|
|
|
33
33
|
type MaintenanceScreenProps = {
|
|
34
34
|
phase: EnsPhase
|
|
@@ -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 '
|
|
5
|
-
import { Select, type SelectOption } from '
|
|
6
|
-
import { theme } from '
|
|
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 '
|
|
13
|
-
import type { EnsValidation } from '
|
|
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 '
|
|
18
|
-
import { createErc8004PublicClient, type Erc8004RegistryConfig } from '
|
|
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 '
|
|
23
|
-
import { ensValidationReasonText } from '
|
|
24
|
-
import { shortAddress } from '
|
|
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 './
|
|
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 './
|
|
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 '
|
|
4
|
+
import { useAppInput } from '../../../app/input/AppInputProvider.js'
|
|
5
5
|
import {
|
|
6
6
|
createMainnetClient,
|
|
7
|
-
} from '
|
|
8
|
-
import type { EnsSubdomainDeletePlan } from '
|
|
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 '
|
|
13
|
-
import { WalletApprovalScreen } from '
|
|
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 '
|
|
5
|
-
import { TextInput } from '
|
|
6
|
-
import { theme } from '
|
|
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 '
|
|
10
|
+
} from '../../ens/agentRecords.js'
|
|
11
11
|
import {
|
|
12
12
|
isEthDomain,
|
|
13
13
|
sanitizeSubdomainPrefix,
|
|
14
|
-
} from '
|
|
14
|
+
} from '../../ens/ensLookup.js'
|
|
15
15
|
import {
|
|
16
16
|
displayCustodyMode,
|
|
17
17
|
readIdentityStateString,
|
|
18
18
|
type CustodyMode,
|
|
19
|
-
} from '
|
|
20
|
-
import { ensValidationReasonText } from '
|
|
21
|
-
import { shortAddress } from '
|
|
22
|
-
import { readValidationFromState } from './
|
|
23
|
-
import type { EnsEditProps } from './
|
|
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 '
|
|
5
|
-
import { Select, type SelectOption } from '
|
|
6
|
-
import { Spinner } from '
|
|
7
|
-
import { theme } from '
|
|
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 '
|
|
12
|
-
import { isRootEthName } from '
|
|
13
|
-
import type { Erc8004RegistryConfig } from '
|
|
14
|
-
import type { BrowserWalletReady } from '
|
|
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 '
|
|
18
|
-
import { shortAddress } from '
|
|
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 './
|
|
23
|
-
import { openExternalUrl } from '
|
|
24
|
-
import { TextInput } from '
|
|
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 './
|
|
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 '
|
|
3
|
-
import { readOwnerAddressField } from '
|
|
4
|
-
import type { BrowserWalletReady } from '
|
|
5
|
-
import type { ProfileUpdates, Step } from '
|
|
6
|
-
import { readCustodyMode } from '
|
|
7
|
-
import { OperatorWalletsScreen } from './
|
|
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 '
|
|
10
|
-
import { WalletApprovalScreen } from '
|
|
11
|
-
import type { AgentReconciliation } from '
|
|
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
|
|
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
|
|
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
|
|
53
|
+
export const EnsFlow: React.FC<EnsFlowProps> = ({
|
|
54
54
|
step,
|
|
55
55
|
walletSession,
|
|
56
56
|
reconciliation,
|
package/src/identity/hub/{flows/ens/OperatorWalletsScreen.tsx → ens/EnsOperatorWalletsScreen.tsx}
RENAMED
|
@@ -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 '
|
|
5
|
-
import { Select, type SelectOption } from '
|
|
6
|
-
import { Spinner } from '
|
|
7
|
-
import { theme } from '
|
|
8
|
-
import { useAppInput } from '
|
|
9
|
-
import { openExternalUrl } from '
|
|
10
|
-
import type { EthagentIdentity } from '
|
|
11
|
-
import { readOwnerAddressField } from '
|
|
12
|
-
import type { Erc8004RegistryConfig } from '
|
|
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 '
|
|
17
|
-
import { requestBrowserWalletSignature, type BrowserWalletReady } from '
|
|
18
|
-
import { FlowTimeline } from '
|
|
19
|
-
import { OPEN_BROWSER_HINT } from '
|
|
20
|
-
import { readCustodyMode } from '
|
|
21
|
-
import { shortAddress } from '
|
|
22
|
-
import type { ProfileUpdates } from '
|
|
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 '
|
|
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 '
|
|
2
|
+
import { validateAgentEnsLink, type DiscoverOptions, type EnsValidation } from '../../ens/ensLookup.js'
|
|
3
3
|
import {
|
|
4
4
|
validateErc8004TokenOwner,
|
|
5
5
|
type Erc8004RegistryConfig,
|
|
6
|
-
} from '
|
|
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 '
|
|
3
|
-
import type { EnsRegistryAction, EnsSetupBlockedPlan } from '
|
|
4
|
-
import type { CustodyMode } from '
|
|
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 '
|
|
3
|
-
import type { AgentEnsRecordState, AgentEnsRecords } from '
|
|
4
|
-
import type { Erc8004RegistryConfig } from '
|
|
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 '
|
|
9
|
-
import type { ProfileUpdates, Step } from '
|
|
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 '../
|
|
16
|
+
import { runRebackupSigningInSession } from '../continuity/effects.js'
|
|
17
17
|
|
|
18
18
|
type EnsRecordsFlowArgs = {
|
|
19
19
|
identity: EthagentIdentity
|