ethagent 3.3.4 → 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.
- package/.claude-plugin/marketplace.json +11 -0
- package/.claude-plugin/plugin.json +35 -0
- package/LICENSE +1 -1
- package/README.md +64 -104
- package/commands/ethagent.md +40 -0
- package/package.json +16 -16
- package/src/app/keybindings/KeybindingProvider.tsx +1 -6
- package/src/app/keybindings/types.ts +1 -6
- package/src/cli/ResetConfirmView.tsx +54 -53
- package/src/cli/demo.ts +86 -0
- package/src/cli/hookIo.ts +45 -0
- package/src/cli/main.tsx +94 -123
- package/src/cli/memoryGuard.ts +49 -0
- package/src/cli/reset.ts +28 -70
- package/src/cli/sessionStart.ts +33 -0
- package/src/cli/status.ts +46 -0
- package/src/cli/sync.ts +167 -0
- package/src/cli/syncAdapters/claude-code.ts +86 -0
- package/src/cli/syncAdapters/codex.ts +66 -0
- package/src/cli/syncAdapters/index.ts +45 -0
- package/src/cli/syncAdapters/managedBlock.ts +175 -0
- package/src/cli/syncAdapters/shared.ts +63 -0
- package/src/identity/continuity/envelopeParse.ts +20 -1
- package/src/identity/continuity/publicSkills.ts +3 -1
- package/src/identity/continuity/skills/publicSkillsSync.ts +2 -1
- package/src/identity/continuity/skills/scaffold.ts +5 -2
- package/src/identity/continuity/snapshots.ts +12 -5
- package/src/identity/continuity/storage/defaults.ts +20 -19
- package/src/identity/continuity/storage/status.ts +1 -1
- package/src/identity/ens/ensLookup/constants.ts +1 -1
- package/src/identity/manager/IdentityManager.tsx +33 -0
- package/src/identity/{hub → manager}/OperationalRoutes.tsx +37 -18
- package/src/identity/{hub → manager}/Routes.tsx +48 -34
- package/src/identity/{hub → manager}/continuity/ContinuityDashboardScreen.tsx +9 -19
- package/src/identity/{hub → manager}/continuity/RebackupStorageScreen.tsx +3 -3
- package/src/identity/manager/continuity/RecoveryConfirmScreen.tsx +102 -0
- package/src/identity/{hub → manager}/continuity/SavePromptScreen.tsx +2 -3
- package/src/identity/{hub → manager}/continuity/completion.ts +1 -1
- package/src/identity/{hub → manager}/continuity/effects.ts +1 -1
- package/src/identity/{hub → manager}/continuity/skills/DeleteSkillConfirmScreen.tsx +2 -2
- package/src/identity/{hub → manager}/continuity/skills/NewSkillScreen.tsx +0 -5
- package/src/identity/{hub → manager}/continuity/skills/NewSkillVisibilityScreen.tsx +4 -4
- package/src/identity/{hub → manager}/continuity/skills/SkillActionsScreen.tsx +6 -22
- package/src/identity/{hub → manager}/continuity/skills/SkillsTreeScreen.tsx +5 -17
- package/src/identity/{hub → manager}/continuity/snapshot.ts +1 -1
- package/src/identity/{hub → manager}/continuity/vault.ts +1 -1
- package/src/identity/{hub → manager}/create/CreateFlow.tsx +59 -32
- package/src/identity/{hub → manager}/create/effects.ts +19 -10
- package/src/identity/manager/create/importScan.ts +122 -0
- package/src/identity/{hub → manager}/custody/CustodyEditFlow.tsx +17 -61
- package/src/identity/{hub → manager}/custody/actions.ts +1 -15
- package/src/identity/{hub → manager}/custody/routes.tsx +20 -40
- package/src/identity/{hub → manager}/custody/transactions.ts +1 -0
- package/src/identity/{hub → manager}/custody/types.ts +1 -2
- package/src/identity/{hub → manager}/custody/useCustodyEffects.ts +1 -1
- package/src/identity/{hub → manager}/ens/EnsEditAdvancedScreens.tsx +2 -2
- package/src/identity/{hub → manager}/ens/EnsEditMaintenanceScreens.tsx +12 -23
- package/src/identity/{hub → manager}/ens/EnsEditReviewScreens.tsx +18 -42
- package/src/identity/{hub → manager}/ens/EnsEditRunners.tsx +1 -1
- package/src/identity/{hub → manager}/ens/EnsEditShared.tsx +0 -2
- package/src/identity/{hub → manager}/ens/EnsEditSimpleScreens.tsx +10 -19
- package/src/identity/{hub → manager}/ens/EnsFlow.tsx +133 -41
- package/src/identity/{hub → manager}/ens/EnsOperatorWalletsScreen.tsx +14 -19
- package/src/identity/{hub → manager}/ens/editCopy.ts +1 -14
- package/src/identity/{hub → manager}/profile/EditProfileFlow.tsx +99 -66
- package/src/identity/{hub → manager}/profile/effects.ts +1 -3
- package/src/identity/{hub → manager}/profile/operatorSave.ts +1 -1
- package/src/identity/{hub → manager}/profile/state.ts +1 -1
- package/src/identity/{hub/identityHubReducer.ts → manager/reducer.ts} +25 -26
- package/src/identity/{hub → manager}/restore/RestoreFlow.tsx +16 -24
- package/src/identity/{hub → manager}/restore/apply.ts +1 -1
- package/src/identity/{hub → manager}/restore/auth.ts +1 -1
- package/src/identity/{hub → manager}/restore/discover.ts +1 -1
- package/src/identity/{hub → manager}/restore/fetch.ts +1 -1
- package/src/identity/{hub → manager}/restore/restoreAdmin.ts +1 -1
- package/src/identity/{hub → manager}/restore/useRestoreEffects.ts +2 -9
- package/src/identity/{hub → manager}/settings/StorageCredentialScreen.tsx +10 -25
- package/src/identity/{hub → manager}/shared/components/DetailsScreen.tsx +5 -7
- package/src/identity/{hub → manager}/shared/components/ErrorScreen.tsx +6 -10
- package/src/identity/{hub → manager}/shared/components/FlowTimeline.tsx +4 -3
- package/src/identity/{hub → manager}/shared/components/IdentitySummary.tsx +19 -59
- package/src/identity/manager/shared/components/LazyMenu.tsx +147 -0
- package/src/identity/manager/shared/components/MenuScreen.tsx +220 -0
- package/src/identity/manager/shared/components/OperationCompleteScreen.tsx +28 -0
- package/src/identity/{hub → manager}/shared/components/UnlinkedIdentityScreen.tsx +9 -10
- package/src/identity/{hub → manager}/shared/components/WalletApprovalScreen.tsx +1 -2
- package/src/identity/manager/shared/components/Wordmark.tsx +54 -0
- package/src/identity/{hub → manager}/shared/components/menuFlagsFromReconciliation.ts +39 -15
- package/src/identity/{hub → manager}/shared/effects/profilePrep.ts +1 -1
- package/src/identity/manager/shared/effects/types.ts +30 -0
- package/src/identity/{hub → manager}/shared/model/copy.ts +0 -4
- package/src/identity/{hub → manager}/shared/model/errors.ts +32 -3
- package/src/identity/{hub → manager}/shared/model/network.ts +2 -2
- package/src/identity/{hub → manager}/shared/reconciliation/agentReconciliation/hook.ts +5 -0
- package/src/identity/{hub → manager}/shared/reconciliation/agentReconciliation/run.ts +1 -1
- package/src/identity/{hub/shared/reconciliation/useAgentReconciliation.ts → manager/shared/reconciliation/index.ts} +6 -0
- package/src/identity/{hub → manager}/shared/utils.ts +6 -10
- package/src/identity/{hub → manager}/transfer/TokenTransferFlow.tsx +3 -3
- package/src/identity/{hub → manager}/transfer/TokenTransferScreens.tsx +4 -10
- package/src/identity/{hub → manager}/transfer/effects.ts +1 -1
- package/src/identity/{hub → manager}/types.ts +5 -6
- package/src/identity/{hub/useIdentityHubContinuity.ts → manager/useContinuity.ts} +59 -27
- package/src/identity/{hub/useIdentityHubController.ts → manager/useController.ts} +38 -35
- package/src/identity/{hub/useIdentityHubSideEffects.ts → manager/useSideEffects.ts} +40 -4
- package/src/identity/registry/erc8004/discovery.ts +3 -17
- package/src/identity/registry/erc8004/utils.ts +1 -1
- package/src/identity/storage/ipfs.ts +21 -1
- package/src/identity/wallet/browserWallet/html.ts +10 -2
- package/src/identity/wallet/browserWallet/http.ts +18 -0
- package/src/identity/wallet/browserWallet/requestServer.ts +5 -1
- package/src/identity/wallet/browserWallet/requests.ts +10 -28
- package/src/identity/wallet/browserWallet/session.ts +26 -33
- package/src/identity/wallet/browserWallet/validation.ts +14 -0
- package/src/identity/wallet/browserWallet/walletPageSource.ts +22 -40
- package/src/identity/wallet/page/boot.ts +43 -0
- package/src/identity/wallet/page/config.ts +59 -0
- package/src/identity/wallet/page/constants.ts +12 -0
- package/src/identity/wallet/page/copy.ts +47 -68
- package/src/identity/wallet/page/css.ts +638 -0
- package/src/identity/wallet/page/{errorView.ts → errors.ts} +5 -14
- package/src/identity/wallet/page/{controller.ts → flow.ts} +4 -71
- package/src/identity/wallet/page/markup.ts +44 -34
- package/src/identity/wallet/page/{walletProvider.ts → provider.ts} +0 -3
- package/src/identity/wallet/page/resize.ts +95 -0
- package/src/identity/wallet/page/state.ts +135 -8
- package/src/identity/wallet/page/timeline.ts +161 -0
- package/src/identity/wallet/page/view.ts +22 -302
- package/src/storage/config.ts +30 -80
- package/src/storage/reset.ts +31 -0
- package/src/storage/secrets.ts +1 -16
- package/src/ui/Select.tsx +27 -5
- package/src/ui/Spinner.tsx +16 -15
- package/src/ui/Surface.tsx +21 -17
- package/src/ui/TextArea.tsx +173 -0
- package/src/ui/TextInput.tsx +31 -133
- package/src/ui/theme.ts +22 -13
- package/src/utils/clipboard.ts +0 -140
- package/src/app/FirstRun.tsx +0 -577
- package/src/app/FirstRunTimeline.tsx +0 -51
- package/src/app/firstRunConfig.ts +0 -26
- package/src/app/hooks/useCancelRequest.ts +0 -22
- package/src/app/hooks/useDoublePress.ts +0 -46
- package/src/app/hooks/useExitOnCtrlC.ts +0 -36
- package/src/auth/openaiOAuth/credentials.ts +0 -47
- package/src/auth/openaiOAuth/crypto.ts +0 -23
- package/src/auth/openaiOAuth/index.ts +0 -238
- package/src/auth/openaiOAuth/landingPage.ts +0 -116
- package/src/auth/openaiOAuth/listener.ts +0 -151
- package/src/auth/openaiOAuth/refresh.ts +0 -70
- package/src/auth/openaiOAuth/shared.ts +0 -115
- package/src/chat/ChatBottomPane.tsx +0 -296
- package/src/chat/ChatScreen.tsx +0 -1685
- package/src/chat/ConversationStack.tsx +0 -56
- package/src/chat/MessageList.tsx +0 -638
- package/src/chat/SessionStatus.tsx +0 -53
- package/src/chat/chatEnvironment.ts +0 -16
- package/src/chat/chatScreenUtils.ts +0 -194
- package/src/chat/chatSessionState.ts +0 -146
- package/src/chat/chatTurnContext.ts +0 -50
- package/src/chat/chatTurnOrchestrator.ts +0 -603
- package/src/chat/chatTurnRows.ts +0 -64
- package/src/chat/commands.ts +0 -494
- package/src/chat/continuityEditReview.ts +0 -42
- package/src/chat/display/DiffView.tsx +0 -193
- package/src/chat/display/SyntaxText.tsx +0 -192
- package/src/chat/display/toolCallDisplay.ts +0 -103
- package/src/chat/display/toolResultDisplay.ts +0 -19
- package/src/chat/input/ChatInput.tsx +0 -625
- package/src/chat/input/chatInputHelpers.ts +0 -62
- package/src/chat/input/chatInputState.ts +0 -247
- package/src/chat/input/chatPaste.ts +0 -49
- package/src/chat/input/imageRefs.ts +0 -30
- package/src/chat/input/inputRendering.tsx +0 -93
- package/src/chat/input/textCursor.ts +0 -212
- package/src/chat/messageMarkdown.ts +0 -220
- package/src/chat/messageRows.ts +0 -43
- package/src/chat/planImplementation.ts +0 -62
- package/src/chat/slashCommandHandlers.ts +0 -122
- package/src/chat/slashCommandViews.ts +0 -120
- package/src/chat/transcript/TranscriptView.tsx +0 -184
- package/src/chat/transcript/transcriptViewport.ts +0 -295
- package/src/chat/views/ContextLimitView.tsx +0 -95
- package/src/chat/views/ContinuityEditReviewView.tsx +0 -50
- package/src/chat/views/CopyPicker.tsx +0 -50
- package/src/chat/views/PermissionPrompt.tsx +0 -156
- package/src/chat/views/PermissionsView.tsx +0 -165
- package/src/chat/views/PlanApprovalView.tsx +0 -91
- package/src/chat/views/ResumeView.tsx +0 -273
- package/src/chat/views/RewindView.tsx +0 -412
- package/src/cli/preview.tsx +0 -14
- package/src/cli/updateNotice.ts +0 -54
- package/src/identity/continuity/privateEdit/apply.ts +0 -170
- package/src/identity/continuity/privateEdit/diff.ts +0 -6
- package/src/identity/continuity/privateEdit/files.ts +0 -23
- package/src/identity/continuity/privateEdit/types.ts +0 -28
- package/src/identity/continuity/privateEdit.ts +0 -46
- package/src/identity/hub/IdentityHub.tsx +0 -14
- package/src/identity/hub/continuity/RecoveryConfirmScreen.tsx +0 -104
- package/src/identity/hub/ens/effects.ts +0 -218
- package/src/identity/hub/shared/components/MenuScreen.tsx +0 -241
- package/src/identity/hub/shared/effects/types.ts +0 -53
- package/src/identity/hub/shared/reconciliation/index.ts +0 -14
- package/src/identity/wallet/page/grainient.ts +0 -278
- package/src/identity/wallet/page/html.ts +0 -28
- package/src/identity/wallet/page/styles/base.ts +0 -260
- package/src/identity/wallet/page/styles/components.ts +0 -262
- package/src/identity/wallet/page/styles/index.ts +0 -5
- package/src/identity/wallet/page/styles/responsive.ts +0 -247
- package/src/identity/wallet/page.tsx +0 -38
- package/src/mcp/approvals.ts +0 -113
- package/src/mcp/config.ts +0 -235
- package/src/mcp/manager.ts +0 -482
- package/src/mcp/managerHelpers.ts +0 -70
- package/src/mcp/names.ts +0 -19
- package/src/mcp/output.ts +0 -96
- package/src/models/ModelPicker.tsx +0 -1009
- package/src/models/catalog.ts +0 -327
- package/src/models/huggingface.ts +0 -712
- package/src/models/huggingfaceStorage.ts +0 -136
- package/src/models/llamacpp.ts +0 -848
- package/src/models/llamacppCommands.ts +0 -44
- package/src/models/llamacppConfig.ts +0 -34
- package/src/models/llamacppDiscovery.ts +0 -176
- package/src/models/llamacppOutput.ts +0 -65
- package/src/models/llamacppPreflight.ts +0 -158
- package/src/models/modelDisplay.ts +0 -180
- package/src/models/modelPickerCatalogFlow.ts +0 -56
- package/src/models/modelPickerCredentials.ts +0 -166
- package/src/models/modelPickerData.ts +0 -41
- package/src/models/modelPickerDisplay.tsx +0 -132
- package/src/models/modelPickerHfFlow.ts +0 -192
- package/src/models/modelPickerLocalRunnerFlow.ts +0 -115
- package/src/models/modelPickerOptions.ts +0 -457
- package/src/models/modelPickerTypes.ts +0 -69
- package/src/models/modelPickerUninstallFlow.ts +0 -48
- package/src/models/modelPickerViewHelpers.ts +0 -174
- package/src/models/modelRecommendation.ts +0 -139
- package/src/models/providerDisplay.ts +0 -16
- package/src/models/runtimeDetection.ts +0 -81
- package/src/models/uncensoredCatalog.ts +0 -86
- package/src/providers/anthropic.ts +0 -290
- package/src/providers/contracts.ts +0 -71
- package/src/providers/errors.ts +0 -80
- package/src/providers/gemini.ts +0 -391
- package/src/providers/openai-chat.ts +0 -474
- package/src/providers/openai-responses-format.ts +0 -177
- package/src/providers/openai-responses.ts +0 -306
- package/src/providers/openaiChatWire.ts +0 -124
- package/src/providers/registry.ts +0 -120
- package/src/providers/retry.ts +0 -58
- package/src/providers/sse.ts +0 -93
- package/src/runtime/compaction.ts +0 -395
- package/src/runtime/cwd.ts +0 -43
- package/src/runtime/providerTurn.ts +0 -38
- package/src/runtime/sessionMode.ts +0 -55
- package/src/runtime/systemPrompt.ts +0 -213
- package/src/runtime/textToolParser.ts +0 -161
- package/src/runtime/toolClaimGuards.ts +0 -143
- package/src/runtime/toolExecution.ts +0 -304
- package/src/runtime/toolIntent.ts +0 -143
- package/src/runtime/turn.ts +0 -369
- package/src/runtime/turnNudges.ts +0 -223
- package/src/runtime/turnTypes.ts +0 -86
- package/src/storage/factoryReset.ts +0 -127
- package/src/storage/history.ts +0 -58
- package/src/storage/permissions.ts +0 -76
- package/src/storage/rewind.ts +0 -266
- package/src/storage/sessionExport.ts +0 -49
- package/src/storage/sessions.ts +0 -495
- package/src/tools/bashSafety.ts +0 -186
- package/src/tools/bashTool.ts +0 -140
- package/src/tools/changeDirectoryTool.ts +0 -213
- package/src/tools/contracts.ts +0 -192
- package/src/tools/deleteFileTool.ts +0 -116
- package/src/tools/editTool.ts +0 -165
- package/src/tools/editUtils.ts +0 -170
- package/src/tools/fileDiff.ts +0 -261
- package/src/tools/listDirectoryTool.ts +0 -55
- package/src/tools/listSkillFilesTool.ts +0 -77
- package/src/tools/listSkillsTool.ts +0 -68
- package/src/tools/mcpResourceTools.ts +0 -95
- package/src/tools/permissionRules.ts +0 -85
- package/src/tools/privateContinuityEditTool.ts +0 -187
- package/src/tools/privateContinuityReadTool.ts +0 -106
- package/src/tools/readSkillTool.ts +0 -107
- package/src/tools/readTool.ts +0 -85
- package/src/tools/registry.ts +0 -103
- package/src/tools/writeFileTool.ts +0 -167
- package/src/ui/BrandSplash.tsx +0 -133
- package/src/ui/terminalTitle.ts +0 -30
- package/src/utils/images.ts +0 -140
- package/src/utils/markdownSegments.ts +0 -51
- package/src/utils/messages.ts +0 -37
- package/src/utils/withRetry.ts +0 -324
- /package/src/identity/{hub → manager}/continuity/state.ts +0 -0
- /package/src/identity/{hub → manager}/custody/helpers.ts +0 -0
- /package/src/identity/{hub → manager}/custody/preflight.ts +0 -0
- /package/src/identity/{hub → manager}/custody/state.ts +0 -0
- /package/src/identity/{hub → manager}/custody/useCustodyFlow.tsx +0 -0
- /package/src/identity/{hub → manager}/ens/EnsEditFlow.tsx +0 -0
- /package/src/identity/{hub → manager}/ens/advancedEnsValidation.ts +0 -0
- /package/src/identity/{hub → manager}/ens/state.ts +0 -0
- /package/src/identity/{hub → manager}/ens/transactions.ts +0 -0
- /package/src/identity/{hub → manager}/ens/types.ts +0 -0
- /package/src/identity/{hub → manager}/profile/identity.ts +0 -0
- /package/src/identity/{hub → manager}/restore/envelopes.ts +0 -0
- /package/src/identity/{hub → manager}/restore/helpers.ts +0 -0
- /package/src/identity/{hub → manager}/restore/recovery.ts +0 -0
- /package/src/identity/{hub → manager}/restore/resolve.ts +0 -0
- /package/src/identity/{hub → manager}/shared/components/BusyScreen.tsx +0 -0
- /package/src/identity/{hub → manager}/shared/components/NetworkScreen.tsx +0 -0
- /package/src/identity/{hub → manager}/shared/components/PinataJwtInput.tsx +0 -0
- /package/src/identity/{hub → manager}/shared/effects/receipts.ts +0 -0
- /package/src/identity/{hub → manager}/shared/effects/sync.ts +0 -0
- /package/src/identity/{hub → manager}/shared/model/format.ts +0 -0
- /package/src/identity/{hub → manager}/shared/operatorWallets.ts +0 -0
- /package/src/identity/{hub → manager}/shared/reconciliation/agentReconciliation/ownership.ts +0 -0
- /package/src/identity/{hub → manager}/shared/reconciliation/agentReconciliation/types.ts +0 -0
- /package/src/identity/{hub → manager}/shared/reconciliation/walletSetup.ts +0 -0
- /package/src/identity/{hub → manager}/shared/txGuard.ts +0 -0
- /package/src/identity/{hub → manager}/transfer/progress.ts +0 -0
- /package/src/identity/{hub → manager}/transfer/state.ts +0 -0
|
@@ -1,59 +1,7 @@
|
|
|
1
|
-
import { config } from './state.js'
|
|
2
|
-
import { glyphs } from './html.js'
|
|
3
|
-
|
|
4
|
-
export const CHAINS: Record<string, { name: string }> = {
|
|
5
|
-
"0x1": { name: "Ethereum Mainnet" },
|
|
6
|
-
"0xaa36a7": { name: "Sepolia" },
|
|
7
|
-
"0x2105": { name: "Base" },
|
|
8
|
-
"0x14a34": { name: "Base Sepolia" },
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export interface FlowCopy {
|
|
12
|
-
accent: string;
|
|
13
|
-
tabTitle: string;
|
|
14
|
-
label: string;
|
|
15
|
-
title: string;
|
|
16
|
-
detail: string | null;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const FLOW_COPY: Record<string, FlowCopy> = {
|
|
20
|
-
account: { accent: "sign", tabTitle: "Connect Wallet", label: "Connection Request", title: "Connect Wallet", detail: null },
|
|
21
|
-
sign: { accent: "sign", tabTitle: "Sign Message", label: "Signature Request", title: "Sign Message", detail: "message" },
|
|
22
|
-
"sign-transaction": { accent: "transaction", tabTitle: "Sign Snapshot", label: "Snapshot Signature", title: "Sign Snapshot", detail: "message" },
|
|
23
|
-
transaction: { accent: "transaction", tabTitle: "Submit Transaction", label: "Onchain Transaction", title: "Submit Transaction", detail: "registry" },
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export const TRANSACTION_TITLES: Record<string, string> = {
|
|
27
|
-
"register-agent": "Mint Agent Token",
|
|
28
|
-
"create-agent": "Create Agent",
|
|
29
|
-
"update-ens-records": "Submit With ENS Controller Wallet",
|
|
30
|
-
"clear-ens-records": "Submit With ENS Controller Wallet",
|
|
31
|
-
"create-simple-ens-subdomain": "Submit With Connected Wallet",
|
|
32
|
-
"set-simple-ens-records": "Submit With Connected Wallet",
|
|
33
|
-
"create-agent-ens-subdomain": "Owner Wallet Required",
|
|
34
|
-
"set-agent-ens-records": "Owner Wallet Required",
|
|
35
|
-
"publish-transfer-snapshot": "Switch Back to Sender Wallet",
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export function transactionPurposeTitle(): string {
|
|
39
|
-
const key = config.purpose || "";
|
|
40
|
-
const fromPurpose = PURPOSE_COPY[key]?.flowTitle;
|
|
41
|
-
const explicit = TRANSACTION_TITLES[key];
|
|
42
|
-
return fromPurpose || explicit || FLOW_COPY.transaction!.title;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export const STATE_TITLES = {
|
|
46
|
-
connecting: "Connecting Wallet",
|
|
47
|
-
approveSign: "Sign Message",
|
|
48
|
-
preparingTransaction: "Preparing Transaction",
|
|
49
|
-
approveTransaction: "Review Transaction",
|
|
50
|
-
error: "Wallet Error",
|
|
51
|
-
default: "Wallet Action",
|
|
52
|
-
};
|
|
53
|
-
|
|
54
1
|
export interface SubCopy { text: string; hint: string; }
|
|
55
2
|
export interface PurposeCopyEntry {
|
|
56
3
|
flowTitle: string;
|
|
4
|
+
flowSubtitle?: string;
|
|
57
5
|
account?: SubCopy;
|
|
58
6
|
sign?: SubCopy;
|
|
59
7
|
prepare?: SubCopy;
|
|
@@ -64,182 +12,214 @@ export interface PurposeCopyEntry {
|
|
|
64
12
|
export const PURPOSE_COPY: Record<string, PurposeCopyEntry> = {
|
|
65
13
|
"connect-operator-wallet": {
|
|
66
14
|
flowTitle: "Connect Wallet",
|
|
15
|
+
flowSubtitle: "Reads your operator wallet address for the agent's ENS records. No signature.",
|
|
67
16
|
account: { text: "Connect Wallet", hint: "Reads the operator wallet address for the agent ENS records. No signature or transaction." },
|
|
68
17
|
prepare: { text: "Reading Operator Wallet...", hint: "Return to the terminal." },
|
|
69
18
|
},
|
|
70
19
|
"create-agent": {
|
|
71
20
|
flowTitle: "Create Agent",
|
|
21
|
+
flowSubtitle: "Mints a new ERC-8004 agent token to this wallet.",
|
|
72
22
|
sign: { text: "Sign With Owner Wallet", hint: "Creates encrypted recovery access. No token approval." },
|
|
73
23
|
prepare: { text: "Saving Snapshot...", hint: "Keep this page open." },
|
|
74
24
|
transaction: { text: "Submit With Owner Wallet", hint: "Submits one onchain transaction that mints a new ERC-8004 agent token to this wallet." },
|
|
75
25
|
},
|
|
76
26
|
"restore-owner-wallet": {
|
|
77
27
|
flowTitle: "Owner Wallet Required",
|
|
28
|
+
flowSubtitle: "Decrypts this snapshot with your owner wallet. No transaction.",
|
|
78
29
|
sign: { text: "Sign With Owner Wallet", hint: "Decrypts this snapshot. No transaction." },
|
|
79
30
|
prepare: { text: "Verifying Owner Wallet...", hint: "Return to the terminal." },
|
|
80
31
|
},
|
|
81
32
|
"restore-operator-wallet": {
|
|
82
33
|
flowTitle: "Operator Wallet Required",
|
|
34
|
+
flowSubtitle: "Decrypts this snapshot with your operator wallet. No transaction.",
|
|
83
35
|
sign: { text: "Sign With Operator Wallet", hint: "Decrypts this snapshot. No transaction." },
|
|
84
36
|
prepare: { text: "Verifying Operator Wallet...", hint: "Return to the terminal." },
|
|
85
37
|
},
|
|
86
38
|
"update-snapshot-owner": {
|
|
87
39
|
flowTitle: "Owner Wallet Required",
|
|
88
|
-
|
|
40
|
+
flowSubtitle: "Saves and publishes an updated snapshot that changes ownership-protected fields.",
|
|
41
|
+
sign: { text: "Sign With Owner Wallet", hint: "Signs your owner restore-access key and encrypts local files. Owner wallet is required because this update changes ownership-protected fields." },
|
|
89
42
|
prepare: { text: "Saving Snapshot...", hint: "Keep this page open." },
|
|
90
43
|
transaction: { text: "Submit With Owner Wallet", hint: "Publishes the updated snapshot to the ERC-8004 token URI." },
|
|
91
44
|
},
|
|
92
45
|
"update-snapshot-operator": {
|
|
93
|
-
flowTitle: "Operator Wallet Save",
|
|
46
|
+
flowTitle: "Operator Wallet: Save Snapshot",
|
|
47
|
+
flowSubtitle: "Publishes the latest agent snapshot through the Vault.",
|
|
94
48
|
sign: { text: "Sign With Operator Wallet", hint: "Signs the encrypted snapshot for restore access." },
|
|
95
49
|
prepare: { text: "Saving Snapshot...", hint: "Keep this page open." },
|
|
96
50
|
transaction: { text: "Submit With Operator Wallet", hint: "Publishes the latest agent snapshot through the Vault." },
|
|
97
51
|
},
|
|
98
52
|
"update-snapshot-connected": {
|
|
99
53
|
flowTitle: "Save Snapshot",
|
|
100
|
-
|
|
54
|
+
flowSubtitle: "Encrypts your files and publishes the updated snapshot onchain.",
|
|
55
|
+
sign: { text: "Sign With Connected Wallet", hint: "Signs your restore-access key and encrypts local files. Single-wallet setup; no token approval." },
|
|
101
56
|
prepare: { text: "Saving Snapshot...", hint: "Keep this page open." },
|
|
102
57
|
transaction: { text: "Submit With Connected Wallet", hint: "Publishes the updated snapshot to the ERC-8004 token URI." },
|
|
103
58
|
},
|
|
104
59
|
"update-ens": {
|
|
105
60
|
flowTitle: "Update ENS in Agent Snapshot",
|
|
61
|
+
flowSubtitle: "Points your agent ENS name at a new snapshot.",
|
|
106
62
|
sign: { text: "Sign With Owner Wallet", hint: "Saves a new agent snapshot with this ENS name. No onchain ENS records change in this signature." },
|
|
107
63
|
prepare: { text: "Saving Snapshot...", hint: "Keep this page open." },
|
|
108
64
|
transaction: { text: "Submit With Owner Wallet", hint: "Publishes the updated ERC-8004 token URI pointing to the new snapshot." },
|
|
109
65
|
},
|
|
110
66
|
"clear-ens": {
|
|
111
67
|
flowTitle: "Unlink ENS from Agent",
|
|
68
|
+
flowSubtitle: "Removes the ENS name from your agent snapshot.",
|
|
112
69
|
sign: { text: "Sign With Owner Wallet", hint: "Saves a new agent snapshot with no ENS name. No onchain ENS records change in this signature." },
|
|
113
70
|
prepare: { text: "Saving Snapshot...", hint: "Keep this page open." },
|
|
114
71
|
transaction: { text: "Submit With Owner Wallet", hint: "Publishes the updated ERC-8004 token URI pointing to the new snapshot." },
|
|
115
72
|
},
|
|
116
73
|
"update-profile-owner": {
|
|
117
74
|
flowTitle: "Owner Wallet Required",
|
|
75
|
+
flowSubtitle: "Saves public profile changes that touch ownership-protected fields.",
|
|
118
76
|
sign: { text: "Sign With Owner Wallet", hint: "Saves public profile changes. Owner wallet is required because this update changes ownership-protected fields." },
|
|
119
77
|
prepare: { text: "Preparing Profile Update...", hint: "Keep this page open." },
|
|
120
78
|
transaction: { text: "Submit With Owner Wallet", hint: "Publishes the updated public profile to the ERC-8004 token URI." },
|
|
121
79
|
},
|
|
122
80
|
"update-profile-operator": {
|
|
123
|
-
flowTitle: "Operator Wallet Profile
|
|
81
|
+
flowTitle: "Operator Wallet: Update Profile",
|
|
82
|
+
flowSubtitle: "Publishes your updated agent profile through the Vault.",
|
|
124
83
|
sign: { text: "Sign With Operator Wallet", hint: "Signs the encrypted snapshot for restore access." },
|
|
125
84
|
prepare: { text: "Preparing Profile Update...", hint: "Keep this page open." },
|
|
126
85
|
transaction: { text: "Submit With Operator Wallet", hint: "Publishes the updated agent profile through the Vault. No ENS write." },
|
|
127
86
|
},
|
|
128
87
|
"update-profile-connected": {
|
|
129
88
|
flowTitle: "Update Public Profile",
|
|
89
|
+
flowSubtitle: "Publishes your updated public agent profile onchain.",
|
|
130
90
|
sign: { text: "Sign With Connected Wallet", hint: "Saves public profile changes. Single-wallet setup; no token approval." },
|
|
131
91
|
prepare: { text: "Preparing Profile Update...", hint: "Keep this page open." },
|
|
132
92
|
transaction: { text: "Submit With Connected Wallet", hint: "Publishes the updated public profile to the ERC-8004 token URI." },
|
|
133
93
|
},
|
|
134
94
|
"update-ens-records": {
|
|
135
95
|
flowTitle: "Update ENS Records",
|
|
96
|
+
flowSubtitle: "Writes your agent ENS text records on Ethereum Mainnet.",
|
|
136
97
|
sign: { text: "Sign With ENS Controller Wallet", hint: "Authorizes ENS record changes. No token approval." },
|
|
137
98
|
prepare: { text: "Preparing ENS Transaction...", hint: "Keep this page open." },
|
|
138
99
|
transaction: { text: "Submit With ENS Controller Wallet", hint: "Submit one Ethereum Mainnet ENS record transaction." },
|
|
139
100
|
},
|
|
140
101
|
"clear-ens-records": {
|
|
141
102
|
flowTitle: "Clear ENS Records",
|
|
103
|
+
flowSubtitle: "Clears your agent's ENS text records on Ethereum Mainnet.",
|
|
142
104
|
sign: { text: "Sign With ENS Controller Wallet", hint: "Authorizes clearing ethagent ENS text records. No token approval." },
|
|
143
105
|
prepare: { text: "Preparing ENS Transaction...", hint: "Keep this page open." },
|
|
144
106
|
transaction: { text: "Submit With ENS Controller Wallet", hint: "Submit one Ethereum Mainnet transaction to clear ethagent ENS text records." },
|
|
145
107
|
},
|
|
146
108
|
"create-simple-ens-subdomain": {
|
|
147
109
|
flowTitle: "Review ENS Subdomain Creation",
|
|
110
|
+
flowSubtitle: "Creates the agent ENS subdomain under a name you own.",
|
|
148
111
|
sign: { text: "Sign With Connected Wallet", hint: "Connected wallet owns the ENS root and is creating the agent subdomain." },
|
|
149
112
|
prepare: { text: "Preparing ENS Transaction...", hint: "Keep this page open." },
|
|
150
113
|
transaction: { text: "Submit With Connected Wallet", hint: "Creates the agent ENS subdomain on Ethereum Mainnet. Must come from the parent name's owner." },
|
|
151
114
|
},
|
|
152
115
|
"set-simple-ens-records": {
|
|
153
116
|
flowTitle: "Apply ENS Records",
|
|
117
|
+
flowSubtitle: "Writes the agent ENS text records onchain.",
|
|
154
118
|
sign: { text: "Sign With Connected Wallet", hint: "Connected wallet writes the agent ENS records." },
|
|
155
119
|
prepare: { text: "Preparing ENS Transaction...", hint: "Keep this page open." },
|
|
156
120
|
transaction: { text: "Submit With Connected Wallet", hint: "Writes the agent ENS text records onchain. Must come from the name's controller." },
|
|
157
121
|
},
|
|
158
122
|
"create-agent-ens-subdomain": {
|
|
159
123
|
flowTitle: "Review Agent ENS Subdomain",
|
|
124
|
+
flowSubtitle: "Creates the agent ENS subdomain under your owner-controlled root.",
|
|
160
125
|
sign: { text: "Sign With Owner Wallet", hint: "Owner wallet controls the ENS root that the agent subdomain hangs off." },
|
|
161
126
|
prepare: { text: "Preparing ENS Transaction...", hint: "Keep this page open." },
|
|
162
127
|
transaction: { text: "Submit With Owner Wallet", hint: "Creates the agent ENS subdomain on Ethereum Mainnet. Must come from the parent name's owner wallet." },
|
|
163
128
|
},
|
|
164
129
|
"set-agent-ens-records": {
|
|
165
130
|
flowTitle: "Apply Agent ENS Records",
|
|
131
|
+
flowSubtitle: "Writes the agent ENS records pointing at your operator wallet.",
|
|
166
132
|
sign: { text: "Sign With Owner Wallet", hint: "Owner wallet writes the agent ENS records pointing at the operator wallet." },
|
|
167
133
|
prepare: { text: "Preparing ENS Transaction...", hint: "Keep this page open." },
|
|
168
134
|
transaction: { text: "Submit With Owner Wallet", hint: "Writes the agent ENS text and address records onchain. Must come from the name's controller." },
|
|
169
135
|
},
|
|
170
136
|
"update-operators": {
|
|
171
137
|
flowTitle: "Owner Wallet Required",
|
|
138
|
+
flowSubtitle: "Publishes a new list of operator wallets allowed to act for the agent.",
|
|
172
139
|
sign: { text: "Sign With Owner Wallet", hint: "Authorizes the new operator wallet access list. No token approval." },
|
|
173
140
|
prepare: { text: "Preparing Operator Wallets...", hint: "Keep this page open." },
|
|
174
141
|
transaction: { text: "Submit With Owner Wallet", hint: "Publishes the updated operator wallet access list onchain." },
|
|
175
142
|
},
|
|
176
143
|
"operator-proof": {
|
|
177
144
|
flowTitle: "Operator Wallet Required",
|
|
145
|
+
flowSubtitle: "Proves operator wallet control to create restore access. No transaction.",
|
|
178
146
|
sign: { text: "Sign With Operator Wallet", hint: "Creates restore access. No token approval." },
|
|
179
147
|
prepare: { text: "Verifying Operator Wallet...", hint: "Return to the terminal." },
|
|
180
148
|
},
|
|
181
149
|
"sync-operator-vault": {
|
|
182
150
|
flowTitle: "Owner Wallet Required",
|
|
151
|
+
flowSubtitle: "Updates which operator wallets can rotate the agent URI through the Vault.",
|
|
183
152
|
prepare: { text: "Preparing Vault Operator Update...", hint: "Keep this page open." },
|
|
184
153
|
transaction: { text: "Submit With Owner Wallet", hint: "Updates the Vault metadata-operator list so authorized operator wallets can rotate the agent URI." },
|
|
185
154
|
},
|
|
186
155
|
"refetch-snapshot": {
|
|
187
156
|
flowTitle: "Refetch Latest Snapshot",
|
|
157
|
+
flowSubtitle: "Decrypts the latest snapshot with any authorized wallet. No transaction.",
|
|
188
158
|
sign: { text: "Sign With Any Authorized Wallet", hint: "The owner wallet or any authorized operator wallet can decrypt this snapshot. No transaction." },
|
|
189
159
|
prepare: { text: "Verifying Wallet...", hint: "Return to the terminal." },
|
|
190
160
|
},
|
|
191
161
|
"prepare-transfer-sender": {
|
|
192
|
-
flowTitle: "
|
|
162
|
+
flowTitle: "Sender Wallet: Sign Snapshot",
|
|
163
|
+
flowSubtitle: "Creates sender restore access for the transfer. No transaction.",
|
|
193
164
|
sign: { text: "Sign With Sender Wallet", hint: "Creates sender restore access. No token approval." },
|
|
194
165
|
prepare: { text: "Verifying Sender Wallet...", hint: "Return to the terminal." },
|
|
195
166
|
},
|
|
196
167
|
"prepare-transfer-target": {
|
|
197
|
-
flowTitle: "
|
|
168
|
+
flowTitle: "Receiver Wallet: Sign Restore Access",
|
|
169
|
+
flowSubtitle: "Creates receiver restore access for the transfer. No transaction.",
|
|
198
170
|
sign: { text: "Sign With Receiver Wallet", hint: "Creates receiver restore access. No token approval." },
|
|
199
171
|
prepare: { text: "Verifying Receiver Wallet...", hint: "Return to the terminal." },
|
|
200
172
|
},
|
|
201
173
|
"publish-transfer-snapshot": {
|
|
202
|
-
flowTitle: "
|
|
174
|
+
flowTitle: "Sender Wallet: Publish Snapshot",
|
|
175
|
+
flowSubtitle: "Publishes the transfer snapshot to the agent token URI.",
|
|
203
176
|
prepare: { text: "Preparing Token Update...", hint: "Keep this page open." },
|
|
204
177
|
transaction: { text: "Submit With Sender Wallet", hint: "Submits one transaction to publish the transfer snapshot to the ERC-8004 token URI." },
|
|
205
178
|
},
|
|
206
179
|
"deploy-agent-vault": {
|
|
207
180
|
flowTitle: "Deploy Vault",
|
|
181
|
+
flowSubtitle: "Deploys your agent's Vault contract onchain. One-time setup.",
|
|
208
182
|
prepare: { text: "Preparing Vault Deploy...", hint: "Keep this page open." },
|
|
209
183
|
transaction: { text: "Submit With Owner Wallet", hint: "Deploys the Vault contract onchain. One-time setup per agent." },
|
|
210
184
|
errorContext: "While submitting the Vault deploy",
|
|
211
185
|
},
|
|
212
186
|
"deposit-agent-vault": {
|
|
213
187
|
flowTitle: "Deposit Token Into Vault",
|
|
188
|
+
flowSubtitle: "Locks the agent token in its Vault so updates route through it.",
|
|
214
189
|
prepare: { text: "Preparing Vault Deposit...", hint: "Keep this page open." },
|
|
215
190
|
transaction: { text: "Submit With Owner Wallet", hint: "Sends the agent token to the Vault so the vault can save updates on your behalf." },
|
|
216
191
|
errorContext: "While submitting the Vault deposit",
|
|
217
192
|
},
|
|
218
193
|
"unwrap-agent-vault": {
|
|
219
194
|
flowTitle: "Unwrap Token From Vault",
|
|
195
|
+
flowSubtitle: "Returns the agent token from its Vault to your owner wallet.",
|
|
220
196
|
prepare: { text: "Preparing Vault Unwrap...", hint: "Keep this page open." },
|
|
221
197
|
transaction: { text: "Submit With Owner Wallet", hint: "Returns the agent token from the Vault to your owner wallet." },
|
|
222
198
|
},
|
|
223
199
|
"rotate-agent-uri-vault-owner": {
|
|
224
200
|
flowTitle: "Save Update Through Vault",
|
|
225
|
-
|
|
201
|
+
flowSubtitle: "Publishes your latest snapshot onchain through the Vault.",
|
|
202
|
+
sign: { text: "Sign With Owner Wallet", hint: "Signs your owner restore-access key for the new snapshot. No token approval." },
|
|
226
203
|
prepare: { text: "Preparing Update...", hint: "Keep this page open." },
|
|
227
204
|
transaction: { text: "Submit With Owner Wallet", hint: "Saves your update onchain through the Vault. Your token is locked in its dedicated Vault, so updates go through it." },
|
|
228
205
|
},
|
|
229
206
|
"rotate-agent-uri-vault-operator": {
|
|
230
207
|
flowTitle: "Save Update Through Vault",
|
|
231
|
-
|
|
208
|
+
flowSubtitle: "Publishes your latest snapshot onchain through the Vault.",
|
|
209
|
+
sign: { text: "Sign With Operator Wallet", hint: "Signs your operator restore-access key for the new snapshot. No token approval." },
|
|
232
210
|
prepare: { text: "Preparing Update...", hint: "Keep this page open." },
|
|
233
211
|
transaction: { text: "Submit With Operator Wallet", hint: "Publishes the latest agent snapshot through the Vault. Your token is locked in its dedicated Vault, so the operator wallet calls the vault to publish." },
|
|
234
212
|
},
|
|
235
213
|
"withdraw-vault": {
|
|
236
214
|
flowTitle: "Withdraw Token From Vault",
|
|
215
|
+
flowSubtitle: "Temporarily returns the agent token to your owner wallet; Vault stays configured.",
|
|
237
216
|
prepare: { text: "Preparing Token Withdrawal...", hint: "Keep this page open." },
|
|
238
217
|
transaction: { text: "Submit With Owner Wallet", hint: "Temporarily returns the agent token from the vault to your owner wallet. Vault stays configured so you can redeposit later." },
|
|
239
218
|
errorContext: "While submitting the Vault withdraw",
|
|
240
219
|
},
|
|
241
220
|
"delete-ens-subdomain": {
|
|
242
221
|
flowTitle: "Delete ENS Subdomain",
|
|
222
|
+
flowSubtitle: "Removes the subdomain from its parent ENS name, freeing the label.",
|
|
243
223
|
prepare: { text: "Preparing Subdomain Deletion...", hint: "Keep this page open." },
|
|
244
224
|
transaction: { text: "Submit With Owner Wallet", hint: "Clears the subdomain entry in the parent ENS name. After this, the label is freed for reuse." },
|
|
245
225
|
errorContext: "While deleting the ENS subdomain",
|
|
@@ -256,6 +236,9 @@ export function purposeCopy(): PurposeCopyEntry {
|
|
|
256
236
|
}
|
|
257
237
|
return copy;
|
|
258
238
|
}
|
|
239
|
+
export function purposeSubtitle(): string {
|
|
240
|
+
return PURPOSE_COPY[config.purpose || ""]?.flowSubtitle || "";
|
|
241
|
+
}
|
|
259
242
|
export function requirePurposeSubCopy(key: keyof PurposeCopyEntry): SubCopy {
|
|
260
243
|
const copy = purposeCopy();
|
|
261
244
|
const sub = copy[key] as SubCopy | undefined;
|
|
@@ -285,15 +268,11 @@ export function ensTokenChainHint(): string {
|
|
|
285
268
|
}
|
|
286
269
|
export function transactionCopy(): SubCopy {
|
|
287
270
|
const txCopy = requirePurposeSubCopy("transaction");
|
|
288
|
-
|
|
289
|
-
const text = config.expectedAccount ? txCopy.text + " (" + shortAddr(config.expectedAccount) + ")" : txCopy.text;
|
|
290
|
-
return { text, hint: txCopy.hint + expected + ensTokenChainHint() };
|
|
271
|
+
return { text: txCopy.text, hint: txCopy.hint + ensTokenChainHint() };
|
|
291
272
|
}
|
|
292
273
|
export function signCopy(): SubCopy {
|
|
293
274
|
const sigCopy = requirePurposeSubCopy("sign");
|
|
294
|
-
|
|
295
|
-
const text = config.expectedAccount ? sigCopy.text + " (" + shortAddr(config.expectedAccount) + ")" : sigCopy.text;
|
|
296
|
-
return { text, hint: sigCopy.hint + expected + ensTokenChainHint() };
|
|
275
|
+
return { text: sigCopy.text, hint: sigCopy.hint + ensTokenChainHint() };
|
|
297
276
|
}
|
|
298
277
|
|
|
299
278
|
export function chainLabel(hex?: string): string {
|