thaddeus 1.0.26 → 1.0.28
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/package.json +14 -5
- package/src/QueryEngine.js +926 -0
- package/src/Task.js +49 -0
- package/src/Tool.js +61 -0
- package/src/assistant/gate.js +5 -0
- package/src/assistant/index.js +106 -0
- package/src/assistant/sessionHistory.js +145 -0
- package/src/bootstrap/state.js +1163 -0
- package/src/bridge/bridgeApi.js +304 -0
- package/src/bridge/bridgeConfig.js +39 -0
- package/src/bridge/bridgeDebug.js +73 -0
- package/src/bridge/bridgeEnabled.js +185 -0
- package/src/bridge/bridgeMain.js +2289 -0
- package/src/bridge/bridgeMessaging.js +353 -0
- package/src/bridge/bridgePermissionCallbacks.js +10 -0
- package/src/bridge/bridgePointer.js +175 -0
- package/src/bridge/bridgeStatusUtil.js +105 -0
- package/src/bridge/bridgeUI.js +411 -0
- package/src/bridge/capacityWake.js +35 -0
- package/src/bridge/codeSessionApi.js +111 -0
- package/src/bridge/createSession.js +273 -0
- package/src/bridge/debugUtils.js +115 -0
- package/src/bridge/envLessBridgeConfig.js +120 -0
- package/src/bridge/flushGate.js +65 -0
- package/src/bridge/inboundAttachments.js +152 -0
- package/src/bridge/inboundMessages.js +63 -0
- package/src/bridge/initReplBridge.js +431 -0
- package/src/bridge/jwtUtils.js +185 -0
- package/src/bridge/peerSessions.js +5 -0
- package/src/bridge/pollConfig.js +85 -0
- package/src/bridge/pollConfigDefaults.js +62 -0
- package/src/bridge/remoteBridgeCore.js +712 -0
- package/src/bridge/replBridge.js +1719 -0
- package/src/bridge/replBridgeHandle.js +30 -0
- package/src/bridge/replBridgeTransport.js +236 -0
- package/src/bridge/sessionIdCompat.js +56 -0
- package/src/bridge/sessionRunner.js +421 -0
- package/src/bridge/trustedDevice.js +170 -0
- package/src/bridge/types.js +9 -0
- package/src/bridge/webhookSanitizer.js +6 -0
- package/src/bridge/workSecret.js +99 -0
- package/src/buddy/CompanionSprite.js +348 -0
- package/src/buddy/companion.js +107 -0
- package/src/buddy/prompt.js +33 -0
- package/src/buddy/sprites.js +488 -0
- package/src/buddy/types.js +90 -0
- package/src/buddy/useBuddyNotification.js +85 -0
- package/src/cli/bg.js +17 -0
- package/src/cli/exit.js +30 -0
- package/src/cli/handlers/agents.js +55 -0
- package/src/cli/handlers/auth.js +249 -0
- package/src/cli/handlers/autoMode.js +128 -0
- package/src/cli/handlers/mcp.js +335 -0
- package/src/cli/handlers/plugins.js +634 -0
- package/src/cli/handlers/templateJobs.js +19 -0
- package/src/cli/handlers/util.js +76 -0
- package/src/cli/ndjsonSafeStringify.js +27 -0
- package/src/cli/print.js +4294 -0
- package/src/cli/remoteIO.js +208 -0
- package/src/cli/structuredIO.js +644 -0
- package/src/cli/transports/HybridTransport.js +233 -0
- package/src/cli/transports/SSETransport.js +538 -0
- package/src/cli/transports/SerialBatchEventUploader.js +224 -0
- package/src/cli/transports/WebSocketTransport.js +613 -0
- package/src/cli/transports/WorkerStateUploader.js +88 -0
- package/src/cli/transports/ccrClient.js +711 -0
- package/src/cli/transports/transportUtils.js +39 -0
- package/src/cli/update.js +314 -0
- package/src/commandCenter/launch.js +39 -0
- package/src/commandCenter/phoneApi.js +168 -0
- package/src/commandCenter/phoneStore.js +159 -0
- package/src/commandCenter/reactorBus.js +130 -0
- package/src/commandCenter/server.js +288 -0
- package/src/commandCenter/server.ts +42 -7
- package/src/commandCenter/tunnel.js +199 -0
- package/src/commands/add-dir/add-dir.js +121 -0
- package/src/commands/add-dir/index.js +8 -0
- package/src/commands/add-dir/validation.js +76 -0
- package/src/commands/advisor.js +88 -0
- package/src/commands/agents/agents.js +10 -0
- package/src/commands/agents/index.js +7 -0
- package/src/commands/agents-platform/index.js +2 -0
- package/src/commands/assistant/index.js +86 -0
- package/src/commands/backup/index.js +31 -0
- package/src/commands/branch/branch.js +205 -0
- package/src/commands/branch/index.js +11 -0
- package/src/commands/bridge/bridge.js +513 -0
- package/src/commands/bridge/index.js +22 -0
- package/src/commands/bridge-kick.js +179 -0
- package/src/commands/brief.js +89 -0
- package/src/commands/btw/btw.js +235 -0
- package/src/commands/btw/index.js +9 -0
- package/src/commands/buddy/buddy.js +100 -0
- package/src/commands/buddy/index.js +11 -0
- package/src/commands/chrome/chrome.js +291 -0
- package/src/commands/chrome/index.js +10 -0
- package/src/commands/clear/caches.js +116 -0
- package/src/commands/clear/clear.js +5 -0
- package/src/commands/clear/conversation.js +189 -0
- package/src/commands/clear/index.js +9 -0
- package/src/commands/color/color.js +58 -0
- package/src/commands/color/index.js +9 -0
- package/src/commands/commit-push-pr.js +137 -0
- package/src/commands/commit.js +80 -0
- package/src/commands/compact/compact.js +194 -0
- package/src/commands/compact/index.js +11 -0
- package/src/commands/config/config.js +6 -0
- package/src/commands/config/index.js +8 -0
- package/src/commands/context/context-noninteractive.js +219 -0
- package/src/commands/context/context.js +45 -0
- package/src/commands/context/index.js +21 -0
- package/src/commands/coordinator.js +34 -0
- package/src/commands/copy/copy.js +366 -0
- package/src/commands/copy/index.js +7 -0
- package/src/commands/cost/cost.js +21 -0
- package/src/commands/cost/index.js +16 -0
- package/src/commands/createMovedToPluginCommand.js +33 -0
- package/src/commands/desktop/desktop.js +6 -0
- package/src/commands/desktop/index.js +22 -0
- package/src/commands/diff/diff.js +6 -0
- package/src/commands/diff/index.js +6 -0
- package/src/commands/doctor/doctor.js +6 -0
- package/src/commands/doctor/index.js +9 -0
- package/src/commands/effort/effort.js +166 -0
- package/src/commands/effort/index.js +11 -0
- package/src/commands/exit/exit.js +32 -0
- package/src/commands/exit/index.js +9 -0
- package/src/commands/export/export.js +87 -0
- package/src/commands/export/index.js +8 -0
- package/src/commands/extra-usage/extra-usage-core.js +99 -0
- package/src/commands/extra-usage/extra-usage-noninteractive.js +13 -0
- package/src/commands/extra-usage/extra-usage.js +15 -0
- package/src/commands/extra-usage/index.js +29 -0
- package/src/commands/fast/fast.js +276 -0
- package/src/commands/fast/index.js +19 -0
- package/src/commands/feedback/feedback.js +11 -0
- package/src/commands/feedback/index.js +20 -0
- package/src/commands/files/files.js +11 -0
- package/src/commands/files/index.js +9 -0
- package/src/commands/force-snip.js +19 -0
- package/src/commands/fork/index.js +67 -0
- package/src/commands/heapdump/heapdump.js +14 -0
- package/src/commands/heapdump/index.js +9 -0
- package/src/commands/help/help.js +6 -0
- package/src/commands/help/index.js +7 -0
- package/src/commands/hooks/hooks.js +12 -0
- package/src/commands/hooks/index.js +8 -0
- package/src/commands/ide/ide.js +615 -0
- package/src/commands/ide/index.js +8 -0
- package/src/commands/init-verifiers.js +258 -0
- package/src/commands/init.js +248 -0
- package/src/commands/insights.js +2554 -0
- package/src/commands/install-github-app/ApiKeyStep.js +230 -0
- package/src/commands/install-github-app/CheckExistingSecretStep.js +194 -0
- package/src/commands/install-github-app/CheckGitHubStep.js +16 -0
- package/src/commands/install-github-app/ChooseRepoStep.js +211 -0
- package/src/commands/install-github-app/CreatingStep.js +53 -0
- package/src/commands/install-github-app/ErrorStep.js +84 -0
- package/src/commands/install-github-app/ExistingWorkflowStep.js +105 -0
- package/src/commands/install-github-app/InstallAppStep.js +97 -0
- package/src/commands/install-github-app/OAuthFlowStep.js +190 -0
- package/src/commands/install-github-app/SuccessStep.js +94 -0
- package/src/commands/install-github-app/WarningsStep.js +71 -0
- package/src/commands/install-github-app/index.js +10 -0
- package/src/commands/install-github-app/install-github-app.js +593 -0
- package/src/commands/install-github-app/setupGitHubActions.js +227 -0
- package/src/commands/install-slack-app/index.js +9 -0
- package/src/commands/install-slack-app/install-slack-app.js +25 -0
- package/src/commands/install.js +198 -0
- package/src/commands/keybindings/index.js +10 -0
- package/src/commands/keybindings/keybindings.js +47 -0
- package/src/commands/login/index.js +21 -0
- package/src/commands/login/login.js +135 -0
- package/src/commands/logout/index.js +11 -0
- package/src/commands/logout/logout.js +75 -0
- package/src/commands/mcp/addCommand.js +183 -0
- package/src/commands/mcp/index.js +9 -0
- package/src/commands/mcp/mcp.js +78 -0
- package/src/commands/mcp/xaaIdpCommand.js +193 -0
- package/src/commands/memories/index.js +9 -0
- package/src/commands/memories/index.ts +12 -0
- package/src/commands/memories/memories.tsx +949 -0
- package/src/commands/memory/index.js +7 -0
- package/src/commands/memory/memory.js +71 -0
- package/src/commands/mobile/index.js +9 -0
- package/src/commands/mobile/mobile.js +279 -0
- package/src/commands/model/index.js +14 -0
- package/src/commands/model/model.js +284 -0
- package/src/commands/output-style/index.js +8 -0
- package/src/commands/output-style/output-style.js +6 -0
- package/src/commands/passes/index.js +17 -0
- package/src/commands/passes/passes.js +23 -0
- package/src/commands/peers/index.js +68 -0
- package/src/commands/permissions/index.js +8 -0
- package/src/commands/permissions/permissions.js +9 -0
- package/src/commands/plan/index.js +8 -0
- package/src/commands/plan/plan.js +116 -0
- package/src/commands/plugin/AddMarketplace.js +96 -0
- package/src/commands/plugin/BrowseMarketplace.js +582 -0
- package/src/commands/plugin/DiscoverPlugins.js +613 -0
- package/src/commands/plugin/ManageMarketplaces.js +583 -0
- package/src/commands/plugin/ManagePlugins.js +1783 -0
- package/src/commands/plugin/PluginErrors.js +124 -0
- package/src/commands/plugin/PluginOptionsDialog.js +367 -0
- package/src/commands/plugin/PluginOptionsFlow.js +97 -0
- package/src/commands/plugin/PluginSettings.js +1041 -0
- package/src/commands/plugin/PluginTrustWarning.js +35 -0
- package/src/commands/plugin/UnifiedInstalledCell.js +616 -0
- package/src/commands/plugin/ValidatePlugin.js +96 -0
- package/src/commands/plugin/index.js +10 -0
- package/src/commands/plugin/parseArgs.js +71 -0
- package/src/commands/plugin/plugin.js +6 -0
- package/src/commands/plugin/pluginDetailsHelpers.js +95 -0
- package/src/commands/plugin/usePagination.js +89 -0
- package/src/commands/pr_comments/index.js +49 -0
- package/src/commands/privacy-settings/index.js +11 -0
- package/src/commands/privacy-settings/privacy-settings.js +55 -0
- package/src/commands/proactive.js +29 -0
- package/src/commands/rate-limit-options/index.js +15 -0
- package/src/commands/rate-limit-options/rate-limit-options.js +213 -0
- package/src/commands/release-notes/index.js +8 -0
- package/src/commands/release-notes/release-notes.js +38 -0
- package/src/commands/reload-plugins/index.js +11 -0
- package/src/commands/reload-plugins/reload-plugins.js +52 -0
- package/src/commands/remote-env/index.js +12 -0
- package/src/commands/remote-env/remote-env.js +6 -0
- package/src/commands/remote-setup/api.js +155 -0
- package/src/commands/remote-setup/index.js +15 -0
- package/src/commands/remote-setup/remote-setup.js +150 -0
- package/src/commands/remoteControlServer/index.js +58 -0
- package/src/commands/rename/generateSessionName.js +58 -0
- package/src/commands/rename/index.js +9 -0
- package/src/commands/rename/rename.js +52 -0
- package/src/commands/resume/index.js +9 -0
- package/src/commands/resume/resume.js +239 -0
- package/src/commands/review/UltrareviewOverageDialog.js +97 -0
- package/src/commands/review/reviewRemote.js +259 -0
- package/src/commands/review/ultrareviewCommand.js +58 -0
- package/src/commands/review/ultrareviewEnabled.js +10 -0
- package/src/commands/review.js +53 -0
- package/src/commands/rewind/index.js +10 -0
- package/src/commands/rewind/rewind.js +7 -0
- package/src/commands/sandbox-toggle/index.js +41 -0
- package/src/commands/sandbox-toggle/sandbox-toggle.js +73 -0
- package/src/commands/security-review.js +231 -0
- package/src/commands/session/index.js +13 -0
- package/src/commands/session/session.js +143 -0
- package/src/commands/skills/index.js +7 -0
- package/src/commands/skills/skills.js +6 -0
- package/src/commands/speak.js +21 -0
- package/src/commands/start-business.js +1575 -0
- package/src/commands/start-business.ts +1581 -0
- package/src/commands/stats/index.js +7 -0
- package/src/commands/stats/stats.js +6 -0
- package/src/commands/status/index.js +8 -0
- package/src/commands/status/status.js +6 -0
- package/src/commands/statusline.js +22 -0
- package/src/commands/stickers/index.js +8 -0
- package/src/commands/stickers/stickers.js +14 -0
- package/src/commands/subscribe-pr.js +131 -0
- package/src/commands/tag/index.js +9 -0
- package/src/commands/tag/tag.js +215 -0
- package/src/commands/tasks/index.js +8 -0
- package/src/commands/tasks/tasks.js +6 -0
- package/src/commands/terminalSetup/index.js +18 -0
- package/src/commands/terminalSetup/terminalSetup.js +491 -0
- package/src/commands/thaddeus-usage/index.js +17 -0
- package/src/commands/theme/index.js +7 -0
- package/src/commands/theme/theme.js +51 -0
- package/src/commands/thinkback/index.js +9 -0
- package/src/commands/thinkback/thinkback.js +528 -0
- package/src/commands/thinkback-play/index.js +13 -0
- package/src/commands/thinkback-play/thinkback-play.js +34 -0
- package/src/commands/torch.js +122 -0
- package/src/commands/ultraplan.js +416 -0
- package/src/commands/upgrade/index.js +12 -0
- package/src/commands/upgrade/upgrade.js +38 -0
- package/src/commands/usage/index.js +7 -0
- package/src/commands/usage/usage.js +6 -0
- package/src/commands/version.js +17 -0
- package/src/commands/vim/index.js +8 -0
- package/src/commands/vim/vim.js +25 -0
- package/src/commands/voice/index.js +13 -0
- package/src/commands/voice/voice.js +44 -0
- package/src/commands/workflows/index.js +123 -0
- package/src/commands.js +614 -0
- package/src/commands.ts +4 -0
- package/src/components/AgentProgressLine.js +112 -0
- package/src/components/AntModelSwitchCallout.js +8 -0
- package/src/components/App.js +46 -0
- package/src/components/ApproveApiKey.js +125 -0
- package/src/components/AutoModeOptInDialog.js +140 -0
- package/src/components/AutoUpdater.js +156 -0
- package/src/components/AutoUpdaterWrapper.js +78 -0
- package/src/components/AwsAuthStatusBox.js +88 -0
- package/src/components/BaseTextInput.js +105 -0
- package/src/components/BashModeProgress.js +49 -0
- package/src/components/BridgeDialog.js +415 -0
- package/src/components/BypassPermissionsModeDialog.js +87 -0
- package/src/components/ChannelDowngradeDialog.js +101 -0
- package/src/components/ClaudeInChromeOnboarding.js +126 -0
- package/src/components/ClaudeMdExternalIncludesDialog.js +137 -0
- package/src/components/ClickableImageRef.js +65 -0
- package/src/components/CompactSummary.js +120 -0
- package/src/components/ConfigurableShortcutHint.js +35 -0
- package/src/components/ConsoleOAuthFlow.js +554 -0
- package/src/components/ContextSuggestions.js +44 -0
- package/src/components/ContextVisualization.js +482 -0
- package/src/components/CoordinatorAgentStatus.js +261 -0
- package/src/components/CostThresholdDialog.js +49 -0
- package/src/components/CtrlOToExpand.js +50 -0
- package/src/components/CustomSelect/SelectMulti.js +150 -0
- package/src/components/CustomSelect/index.js +2 -0
- package/src/components/CustomSelect/option-map.js +32 -0
- package/src/components/CustomSelect/select-input-option.js +426 -0
- package/src/components/CustomSelect/select-option.js +24 -0
- package/src/components/CustomSelect/select.js +518 -0
- package/src/components/CustomSelect/use-multi-select-state.js +214 -0
- package/src/components/CustomSelect/use-select-input.js +170 -0
- package/src/components/CustomSelect/use-select-navigation.js +366 -0
- package/src/components/CustomSelect/use-select-state.js +22 -0
- package/src/components/DesktopHandoff.js +195 -0
- package/src/components/DesktopUpsell/DesktopUpsellStartup.js +174 -0
- package/src/components/DevBar.js +51 -0
- package/src/components/DevChannelsDialog.js +104 -0
- package/src/components/DiagnosticsDisplay.js +91 -0
- package/src/components/EffortCallout.js +264 -0
- package/src/components/EffortIndicator.js +28 -0
- package/src/components/ExitFlow.js +41 -0
- package/src/components/ExportDialog.js +101 -0
- package/src/components/FallbackToolUseErrorMessage.js +116 -0
- package/src/components/FallbackToolUseRejectedMessage.js +17 -0
- package/src/components/FastIcon.js +43 -0
- package/src/components/Feedback.js +369 -0
- package/src/components/FeedbackSurvey/FeedbackSurvey.js +151 -0
- package/src/components/FeedbackSurvey/FeedbackSurveyView.js +104 -0
- package/src/components/FeedbackSurvey/TranscriptSharePrompt.js +84 -0
- package/src/components/FeedbackSurvey/submitTranscriptShare.js +10 -0
- package/src/components/FeedbackSurvey/useDebouncedDigitInput.js +51 -0
- package/src/components/FeedbackSurvey/useFeedbackSurvey.js +258 -0
- package/src/components/FeedbackSurvey/useFrustrationDetection.js +8 -0
- package/src/components/FeedbackSurvey/useMemorySurvey.js +191 -0
- package/src/components/FeedbackSurvey/usePostCompactSurvey.js +202 -0
- package/src/components/FeedbackSurvey/useSurveyState.js +80 -0
- package/src/components/FileEditToolDiff.js +167 -0
- package/src/components/FileEditToolUpdatedMessage.js +112 -0
- package/src/components/FileEditToolUseRejectedMessage.js +158 -0
- package/src/components/FilePathLink.js +35 -0
- package/src/components/FullscreenLayout.js +578 -0
- package/src/components/GlobalSearchDialog.js +340 -0
- package/src/components/HelpV2/Commands.js +66 -0
- package/src/components/HelpV2/General.js +25 -0
- package/src/components/HelpV2/HelpV2.js +186 -0
- package/src/components/HighlightedCode/Fallback.js +193 -0
- package/src/components/HighlightedCode.js +185 -0
- package/src/components/HistorySearchDialog.js +93 -0
- package/src/components/IdeAutoConnectDialog.js +154 -0
- package/src/components/IdeOnboardingDialog.js +175 -0
- package/src/components/IdeStatusIndicator.js +50 -0
- package/src/components/IdleReturnDialog.js +117 -0
- package/src/components/InterruptedByUser.js +16 -0
- package/src/components/InvalidConfigDialog.js +135 -0
- package/src/components/InvalidSettingsDialog.js +85 -0
- package/src/components/KeybindingWarnings.js +55 -0
- package/src/components/LanguagePicker.js +84 -0
- package/src/components/LogSelector.js +1579 -0
- package/src/components/LogoV2/AnimatedAsterisk.js +43 -0
- package/src/components/LogoV2/AnimatedClawd.js +64 -0
- package/src/components/LogoV2/ChannelsNotice.js +262 -0
- package/src/components/LogoV2/Clawd.js +33 -0
- package/src/components/LogoV2/CondensedLogo.js +160 -0
- package/src/components/LogoV2/EmergencyTip.js +48 -0
- package/src/components/LogoV2/Feed.js +85 -0
- package/src/components/LogoV2/FeedColumn.js +55 -0
- package/src/components/LogoV2/GuestPassesUpsell.js +71 -0
- package/src/components/LogoV2/LogoV2.js +565 -0
- package/src/components/LogoV2/Opus1mMergeNotice.js +57 -0
- package/src/components/LogoV2/OverageCreditUpsell.js +161 -0
- package/src/components/LogoV2/VoiceModeNotice.js +71 -0
- package/src/components/LogoV2/WelcomeV2.js +14 -0
- package/src/components/LogoV2/feedConfigs.js +79 -0
- package/src/components/LspRecommendation/LspRecommendationMenu.js +46 -0
- package/src/components/MCPServerApprovalDialog.js +114 -0
- package/src/components/MCPServerDesktopImportDialog.js +206 -0
- package/src/components/MCPServerDialogCopy.js +16 -0
- package/src/components/MCPServerMultiselectDialog.js +134 -0
- package/src/components/ManagedSettingsSecurityDialog/ManagedSettingsSecurityDialog.js +150 -0
- package/src/components/ManagedSettingsSecurityDialog/utils.js +105 -0
- package/src/components/Markdown.js +233 -0
- package/src/components/MarkdownTable.js +280 -0
- package/src/components/MemoryUsageIndicator.js +28 -0
- package/src/components/Message.js +564 -0
- package/src/components/MessageModel.js +37 -0
- package/src/components/MessageResponse.js +73 -0
- package/src/components/MessageRow.js +346 -0
- package/src/components/MessageSelector.js +744 -0
- package/src/components/MessageTimestamp.js +58 -0
- package/src/components/Messages.js +645 -0
- package/src/components/ModelPicker.js +452 -0
- package/src/components/NativeAutoUpdater.js +152 -0
- package/src/components/NotebookEditToolUseRejectedMessage.js +84 -0
- package/src/components/OffscreenFreeze.js +35 -0
- package/src/components/Onboarding.js +174 -0
- package/src/components/OutputStylePicker.js +103 -0
- package/src/components/PackageManagerAutoUpdater.js +99 -0
- package/src/components/Passes/Passes.js +114 -0
- package/src/components/PrBadge.js +91 -0
- package/src/components/PressEnterToContinue.js +16 -0
- package/src/components/PromptInput/HistorySearchInput.js +45 -0
- package/src/components/PromptInput/IssueFlagBanner.js +8 -0
- package/src/components/PromptInput/Notifications.js +220 -0
- package/src/components/PromptInput/PromptInput.js +2014 -0
- package/src/components/PromptInput/PromptInputFooter.js +85 -0
- package/src/components/PromptInput/PromptInputFooterLeftSide.js +408 -0
- package/src/components/PromptInput/PromptInputFooterSuggestions.js +281 -0
- package/src/components/PromptInput/PromptInputHelpMenu.js +380 -0
- package/src/components/PromptInput/PromptInputModeIndicator.js +73 -0
- package/src/components/PromptInput/PromptInputQueuedCommands.js +105 -0
- package/src/components/PromptInput/PromptInputStashNotice.js +21 -0
- package/src/components/PromptInput/SandboxPromptFooterHint.js +66 -0
- package/src/components/PromptInput/ShimmeredInput.js +133 -0
- package/src/components/PromptInput/VoiceIndicator.js +137 -0
- package/src/components/PromptInput/inputModes.js +24 -0
- package/src/components/PromptInput/inputPaste.js +62 -0
- package/src/components/PromptInput/useMaybeTruncateInput.js +33 -0
- package/src/components/PromptInput/usePromptInputPlaceholder.js +53 -0
- package/src/components/PromptInput/useShowFastIconHint.js +23 -0
- package/src/components/PromptInput/useSwarmBanner.js +112 -0
- package/src/components/PromptInput/utils.js +50 -0
- package/src/components/QuickOpenDialog.js +244 -0
- package/src/components/RemoteCallout.js +53 -0
- package/src/components/RemoteEnvironmentDialog.js +346 -0
- package/src/components/ResumeTask.js +173 -0
- package/src/components/SandboxViolationExpandedView.js +106 -0
- package/src/components/ScrollKeybindingHandler.js +982 -0
- package/src/components/SearchBox.js +56 -0
- package/src/components/SentryErrorBoundary.js +16 -0
- package/src/components/SessionBackgroundHint.js +105 -0
- package/src/components/SessionPreview.js +200 -0
- package/src/components/Settings/Config.js +1626 -0
- package/src/components/Settings/Settings.js +131 -0
- package/src/components/Settings/Status.js +230 -0
- package/src/components/Settings/Usage.js +341 -0
- package/src/components/ShowInIDEPrompt.js +152 -0
- package/src/components/SkillImprovementSurvey.js +130 -0
- package/src/components/Spinner/FlashingChar.js +52 -0
- package/src/components/Spinner/GlimmerMessage.js +329 -0
- package/src/components/Spinner/ShimmerChar.js +23 -0
- package/src/components/Spinner/SpinnerAnimationRow.js +170 -0
- package/src/components/Spinner/SpinnerGlyph.js +70 -0
- package/src/components/Spinner/TeammateSpinnerLine.js +171 -0
- package/src/components/Spinner/TeammateSpinnerTree.js +269 -0
- package/src/components/Spinner/index.js +9 -0
- package/src/components/Spinner/teammateSelectHint.js +1 -0
- package/src/components/Spinner/useShimmerAnimation.js +22 -0
- package/src/components/Spinner/useStalledAnimation.js +63 -0
- package/src/components/Spinner/utils.js +78 -0
- package/src/components/Spinner.js +474 -0
- package/src/components/Stats.js +1000 -0
- package/src/components/StatusLine.js +286 -0
- package/src/components/StatusNotices.js +50 -0
- package/src/components/StructuredDiff/Fallback.js +336 -0
- package/src/components/StructuredDiff/colorDiff.js +37 -0
- package/src/components/StructuredDiff.js +153 -0
- package/src/components/StructuredDiffList.js +9 -0
- package/src/components/TagTabs.js +101 -0
- package/src/components/TaskListV2.js +333 -0
- package/src/components/TeammateViewHeader.js +88 -0
- package/src/components/TeleportError.js +191 -0
- package/src/components/TeleportProgress.js +131 -0
- package/src/components/TeleportRepoMismatchDialog.js +98 -0
- package/src/components/TeleportResumeWrapper.js +158 -0
- package/src/components/TeleportStash.js +82 -0
- package/src/components/TextInput.js +108 -0
- package/src/components/ThaddeusHint/PluginHintMenu.js +37 -0
- package/src/components/ThemePicker.js +331 -0
- package/src/components/ThinkingToggle.js +154 -0
- package/src/components/TokenWarning.js +171 -0
- package/src/components/ToolUseLoader.js +35 -0
- package/src/components/TrustDialog/TrustDialog.js +301 -0
- package/src/components/TrustDialog/utils.js +199 -0
- package/src/components/UndercoverAutoCallout.js +5 -0
- package/src/components/ValidationErrorsList.js +147 -0
- package/src/components/VimTextInput.js +136 -0
- package/src/components/VirtualMessageList.js +893 -0
- package/src/components/WorkflowMultiselectDialog.js +118 -0
- package/src/components/WorktreeExitDialog.js +220 -0
- package/src/components/agents/AgentDetail.js +227 -0
- package/src/components/agents/AgentEditor.js +147 -0
- package/src/components/agents/AgentNavigationFooter.js +22 -0
- package/src/components/agents/AgentsList.js +436 -0
- package/src/components/agents/AgentsMenu.js +849 -0
- package/src/components/agents/ColorPicker.js +110 -0
- package/src/components/agents/ModelSelector.js +63 -0
- package/src/components/agents/SnapshotUpdateDialog.js +14 -0
- package/src/components/agents/ToolSelector.js +557 -0
- package/src/components/agents/agentFileUtils.js +179 -0
- package/src/components/agents/generateAgent.js +161 -0
- package/src/components/agents/new-agent-creation/CreateAgentWizard.js +89 -0
- package/src/components/agents/new-agent-creation/wizard-steps/ColorStep.js +81 -0
- package/src/components/agents/new-agent-creation/wizard-steps/ConfirmStep.js +387 -0
- package/src/components/agents/new-agent-creation/wizard-steps/ConfirmStepWrapper.js +63 -0
- package/src/components/agents/new-agent-creation/wizard-steps/DescriptionStep.js +126 -0
- package/src/components/agents/new-agent-creation/wizard-steps/GenerateStep.js +118 -0
- package/src/components/agents/new-agent-creation/wizard-steps/LocationStep.js +80 -0
- package/src/components/agents/new-agent-creation/wizard-steps/MemoryStep.js +108 -0
- package/src/components/agents/new-agent-creation/wizard-steps/MethodStep.js +80 -0
- package/src/components/agents/new-agent-creation/wizard-steps/ModelStep.js +49 -0
- package/src/components/agents/new-agent-creation/wizard-steps/PromptStep.js +131 -0
- package/src/components/agents/new-agent-creation/wizard-steps/ToolsStep.js +52 -0
- package/src/components/agents/new-agent-creation/wizard-steps/TypeStep.js +100 -0
- package/src/components/agents/types.js +4 -0
- package/src/components/agents/utils.js +14 -0
- package/src/components/agents/validateAgent.js +79 -0
- package/src/components/design-system/Byline.js +72 -0
- package/src/components/design-system/Dialog.js +117 -0
- package/src/components/design-system/Divider.js +110 -0
- package/src/components/design-system/FuzzyPicker.js +191 -0
- package/src/components/design-system/KeyboardShortcutHint.js +68 -0
- package/src/components/design-system/ListItem.js +184 -0
- package/src/components/design-system/LoadingState.js +69 -0
- package/src/components/design-system/Pane.js +69 -0
- package/src/components/design-system/ProgressBar.js +63 -0
- package/src/components/design-system/Ratchet.js +71 -0
- package/src/components/design-system/StatusIcon.js +70 -0
- package/src/components/design-system/Tabs.js +269 -0
- package/src/components/design-system/ThemeProvider.js +137 -0
- package/src/components/design-system/ThemedBox.js +126 -0
- package/src/components/design-system/ThemedText.js +60 -0
- package/src/components/design-system/color.js +22 -0
- package/src/components/diff/DiffDetailView.js +285 -0
- package/src/components/diff/DiffDialog.js +387 -0
- package/src/components/diff/DiffFileList.js +292 -0
- package/src/components/grove/Grove.js +483 -0
- package/src/components/hooks/HooksConfigMenu.js +583 -0
- package/src/components/hooks/PromptDialog.js +82 -0
- package/src/components/hooks/SelectEventMode.js +118 -0
- package/src/components/hooks/SelectHookMode.js +101 -0
- package/src/components/hooks/SelectMatcherMode.js +131 -0
- package/src/components/hooks/ViewHookMode.js +204 -0
- package/src/components/mcp/CapabilitiesSection.js +56 -0
- package/src/components/mcp/ElicitationDialog.js +945 -0
- package/src/components/mcp/MCPAgentServerMenu.js +95 -0
- package/src/components/mcp/MCPListPanel.js +505 -0
- package/src/components/mcp/MCPReconnect.js +168 -0
- package/src/components/mcp/MCPRemoteServerMenu.js +460 -0
- package/src/components/mcp/MCPSettings.js +414 -0
- package/src/components/mcp/MCPStdioServerMenu.js +95 -0
- package/src/components/mcp/MCPToolDetailView.js +219 -0
- package/src/components/mcp/MCPToolListView.js +137 -0
- package/src/components/mcp/McpParsingWarnings.js +212 -0
- package/src/components/mcp/index.js +8 -0
- package/src/components/mcp/utils/reconnectHelpers.js +35 -0
- package/src/components/memory/MemoryFileSelector.js +454 -0
- package/src/components/memory/MemoryUpdateNotification.js +43 -0
- package/src/components/messageActions.js +418 -0
- package/src/components/messages/AdvisorMessage.js +152 -0
- package/src/components/messages/AssistantRedactedThinkingMessage.js +28 -0
- package/src/components/messages/AssistantTextMessage.js +287 -0
- package/src/components/messages/AssistantThinkingMessage.js +70 -0
- package/src/components/messages/AssistantToolUseMessage.js +324 -0
- package/src/components/messages/AttachmentMessage.js +418 -0
- package/src/components/messages/CollapsedReadSearchContent.js +363 -0
- package/src/components/messages/CompactBoundaryMessage.js +19 -0
- package/src/components/messages/GroupedToolUseContent.js +37 -0
- package/src/components/messages/HighlightedThinkingText.js +165 -0
- package/src/components/messages/HookProgressMessage.js +111 -0
- package/src/components/messages/PlanApprovalMessage.js +213 -0
- package/src/components/messages/RateLimitMessage.js +149 -0
- package/src/components/messages/ShutdownMessage.js +124 -0
- package/src/components/messages/SnipBoundaryMessage.js +7 -0
- package/src/components/messages/SystemAPIErrorMessage.js +136 -0
- package/src/components/messages/SystemTextMessage.js +842 -0
- package/src/components/messages/TaskAssignmentMessage.js +72 -0
- package/src/components/messages/UserAgentNotificationMessage.js +78 -0
- package/src/components/messages/UserBashInputMessage.js +52 -0
- package/src/components/messages/UserBashOutputMessage.js +55 -0
- package/src/components/messages/UserChannelMessage.js +130 -0
- package/src/components/messages/UserCommandMessage.js +107 -0
- package/src/components/messages/UserCrossSessionMessage.js +11 -0
- package/src/components/messages/UserForkBoilerplateMessage.js +11 -0
- package/src/components/messages/UserGitHubWebhookMessage.js +12 -0
- package/src/components/messages/UserImageMessage.js +54 -0
- package/src/components/messages/UserLocalCommandOutputMessage.js +170 -0
- package/src/components/messages/UserMemoryInputMessage.js +73 -0
- package/src/components/messages/UserPlanMessage.js +38 -0
- package/src/components/messages/UserPromptMessage.js +63 -0
- package/src/components/messages/UserResourceUpdateMessage.js +102 -0
- package/src/components/messages/UserTeammateMessage.js +156 -0
- package/src/components/messages/UserTextMessage.js +270 -0
- package/src/components/messages/UserToolResultMessage/RejectedPlanMessage.js +28 -0
- package/src/components/messages/UserToolResultMessage/RejectedToolUseMessage.js +17 -0
- package/src/components/messages/UserToolResultMessage/UserToolCanceledMessage.js +17 -0
- package/src/components/messages/UserToolResultMessage/UserToolErrorMessage.js +92 -0
- package/src/components/messages/UserToolResultMessage/UserToolRejectMessage.js +74 -0
- package/src/components/messages/UserToolResultMessage/UserToolResultMessage.js +84 -0
- package/src/components/messages/UserToolResultMessage/UserToolSuccessMessage.js +58 -0
- package/src/components/messages/UserToolResultMessage/utils.js +43 -0
- package/src/components/messages/nullRenderingAttachments.js +58 -0
- package/src/components/messages/teamMemCollapsed.js +142 -0
- package/src/components/messages/teamMemSaved.js +16 -0
- package/src/components/permissions/AskUserQuestionPermissionRequest/AskUserQuestionPermissionRequest.js +659 -0
- package/src/components/permissions/AskUserQuestionPermissionRequest/PreviewBox.js +219 -0
- package/src/components/permissions/AskUserQuestionPermissionRequest/PreviewQuestionView.js +227 -0
- package/src/components/permissions/AskUserQuestionPermissionRequest/QuestionNavigationBar.js +175 -0
- package/src/components/permissions/AskUserQuestionPermissionRequest/QuestionView.js +444 -0
- package/src/components/permissions/AskUserQuestionPermissionRequest/SubmitQuestionsView.js +137 -0
- package/src/components/permissions/AskUserQuestionPermissionRequest/use-multiple-choice-state.js +100 -0
- package/src/components/permissions/BashPermissionRequest/BashPermissionRequest.js +404 -0
- package/src/components/permissions/BashPermissionRequest/bashToolUseOptions.js +110 -0
- package/src/components/permissions/ComputerUseApproval/ComputerUseApproval.js +449 -0
- package/src/components/permissions/EnterPlanModePermissionRequest/EnterPlanModePermissionRequest.js +126 -0
- package/src/components/permissions/ExitPlanModePermissionRequest/ExitPlanModePermissionRequest.js +653 -0
- package/src/components/permissions/FallbackPermissionRequest.js +349 -0
- package/src/components/permissions/FileEditPermissionRequest/FileEditPermissionRequest.js +185 -0
- package/src/components/permissions/FilePermissionDialog/FilePermissionDialog.js +108 -0
- package/src/components/permissions/FilePermissionDialog/ideDiffConfig.js +13 -0
- package/src/components/permissions/FilePermissionDialog/permissionOptions.js +137 -0
- package/src/components/permissions/FilePermissionDialog/useFilePermissionDialog.js +131 -0
- package/src/components/permissions/FilePermissionDialog/usePermissionHandler.js +86 -0
- package/src/components/permissions/FileWritePermissionRequest/FileWritePermissionRequest.js +164 -0
- package/src/components/permissions/FileWritePermissionRequest/FileWriteToolDiff.js +79 -0
- package/src/components/permissions/FilesystemPermissionRequest/FilesystemPermissionRequest.js +113 -0
- package/src/components/permissions/MonitorPermissionRequest/MonitorPermissionRequest.js +7 -0
- package/src/components/permissions/NotebookEditPermissionRequest/NotebookEditPermissionRequest.js +164 -0
- package/src/components/permissions/NotebookEditPermissionRequest/NotebookEditToolDiff.js +218 -0
- package/src/components/permissions/PermissionDecisionDebugInfo.js +467 -0
- package/src/components/permissions/PermissionDialog.js +55 -0
- package/src/components/permissions/PermissionExplanation.js +269 -0
- package/src/components/permissions/PermissionPrompt.js +316 -0
- package/src/components/permissions/PermissionRequest.js +159 -0
- package/src/components/permissions/PermissionRequestTitle.js +58 -0
- package/src/components/permissions/PermissionRuleExplanation.js +110 -0
- package/src/components/permissions/PowerShellPermissionRequest/PowerShellPermissionRequest.js +178 -0
- package/src/components/permissions/PowerShellPermissionRequest/powershellToolUseOptions.js +73 -0
- package/src/components/permissions/ReviewArtifactPermissionRequest/ReviewArtifactPermissionRequest.js +7 -0
- package/src/components/permissions/SandboxPermissionRequest.js +162 -0
- package/src/components/permissions/SedEditPermissionRequest/SedEditPermissionRequest.js +228 -0
- package/src/components/permissions/SkillPermissionRequest/SkillPermissionRequest.js +385 -0
- package/src/components/permissions/WebFetchPermissionRequest/WebFetchPermissionRequest.js +259 -0
- package/src/components/permissions/WorkerBadge.js +44 -0
- package/src/components/permissions/WorkerPendingPermission.js +107 -0
- package/src/components/permissions/hooks.js +163 -0
- package/src/components/permissions/rules/AddPermissionRules.js +171 -0
- package/src/components/permissions/rules/AddWorkspaceDirectory.js +335 -0
- package/src/components/permissions/rules/PermissionRuleDescription.js +78 -0
- package/src/components/permissions/rules/PermissionRuleInput.js +136 -0
- package/src/components/permissions/rules/PermissionRuleList.js +1190 -0
- package/src/components/permissions/rules/RecentDenialsTab.js +205 -0
- package/src/components/permissions/rules/RemoveWorkspaceDirectory.js +103 -0
- package/src/components/permissions/rules/WorkspaceTab.js +133 -0
- package/src/components/permissions/shellPermissionHelpers.js +112 -0
- package/src/components/permissions/useShellPermissionFeedback.js +108 -0
- package/src/components/permissions/utils.js +14 -0
- package/src/components/sandbox/SandboxConfigTab.js +48 -0
- package/src/components/sandbox/SandboxDependenciesTab.js +123 -0
- package/src/components/sandbox/SandboxDoctorSection.js +47 -0
- package/src/components/sandbox/SandboxOverridesTab.js +193 -0
- package/src/components/sandbox/SandboxSettings.js +297 -0
- package/src/components/shell/ExpandShellOutputContext.js +33 -0
- package/src/components/shell/OutputLine.js +110 -0
- package/src/components/shell/ShellProgressMessage.js +144 -0
- package/src/components/shell/ShellTimeDisplay.js +72 -0
- package/src/components/skills/SkillsMenu.js +239 -0
- package/src/components/tasks/AsyncAgentDetailDialog.js +235 -0
- package/src/components/tasks/BackgroundTask.js +364 -0
- package/src/components/tasks/BackgroundTaskStatus.js +419 -0
- package/src/components/tasks/BackgroundTasksDialog.js +494 -0
- package/src/components/tasks/DreamDetailDialog.js +251 -0
- package/src/components/tasks/InProcessTeammateDetailDialog.js +275 -0
- package/src/components/tasks/MonitorMcpDetailDialog.js +7 -0
- package/src/components/tasks/RemoteSessionDetailDialog.js +868 -0
- package/src/components/tasks/RemoteSessionProgress.js +249 -0
- package/src/components/tasks/ShellDetailDialog.js +403 -0
- package/src/components/tasks/ShellProgress.js +77 -0
- package/src/components/tasks/WorkflowDetailDialog.js +7 -0
- package/src/components/tasks/renderToolActivity.js +29 -0
- package/src/components/tasks/taskStatusUtils.js +94 -0
- package/src/components/teams/TeamStatus.js +77 -0
- package/src/components/teams/TeamsDialog.js +673 -0
- package/src/components/ui/OrderedList.js +66 -0
- package/src/components/ui/OrderedListItem.js +41 -0
- package/src/components/ui/TreeSelect.js +300 -0
- package/src/components/wizard/WizardDialogLayout.js +48 -0
- package/src/components/wizard/WizardNavigationFooter.js +11 -0
- package/src/components/wizard/WizardProvider.js +217 -0
- package/src/components/wizard/index.js +4 -0
- package/src/components/wizard/useWizard.js +9 -0
- package/src/constants/apiLimits.js +81 -0
- package/src/constants/betas.js +45 -0
- package/src/constants/common.js +29 -0
- package/src/constants/cyberRiskInstruction.js +23 -0
- package/src/constants/errorIds.js +14 -0
- package/src/constants/figures.js +38 -0
- package/src/constants/files.js +150 -0
- package/src/constants/github-app.js +139 -0
- package/src/constants/identity.js +112 -0
- package/src/constants/keys.js +10 -0
- package/src/constants/messages.js +1 -0
- package/src/constants/oauth.js +175 -0
- package/src/constants/outputStyles.js +162 -0
- package/src/constants/product.js +54 -0
- package/src/constants/prompts.js +994 -0
- package/src/constants/spinnerVerbs.js +98 -0
- package/src/constants/system.js +77 -0
- package/src/constants/systemPromptSections.js +39 -0
- package/src/constants/toolLimits.js +50 -0
- package/src/constants/tools.js +103 -0
- package/src/constants/turnCompletionVerbs.js +12 -0
- package/src/constants/xml.js +73 -0
- package/src/context/QueuedMessageContext.js +51 -0
- package/src/context/fpsMetrics.js +22 -0
- package/src/context/mailbox.js +35 -0
- package/src/context/modalContext.js +34 -0
- package/src/context/notifications.js +199 -0
- package/src/context/overlayContext.js +149 -0
- package/src/context/promptOverlayContext.js +118 -0
- package/src/context/stats.js +207 -0
- package/src/context/voice.js +74 -0
- package/src/context.js +146 -0
- package/src/coordinator/coordinatorMode.js +345 -0
- package/src/coordinator/workerAgent.js +24 -0
- package/src/cost-tracker.js +208 -0
- package/src/costHook.js +17 -0
- package/src/daemon/main.js +19 -0
- package/src/dialogLaunchers.js +77 -0
- package/src/entrypoints/agentSdkTypes.js +202 -0
- package/src/entrypoints/cli.js +226 -0
- package/src/entrypoints/init.js +265 -0
- package/src/entrypoints/mcp.js +141 -0
- package/src/entrypoints/sandboxTypes.js +112 -0
- package/src/entrypoints/sdk/controlSchemas.js +452 -0
- package/src/entrypoints/sdk/controlTypes.js +1 -0
- package/src/entrypoints/sdk/coreSchemas.js +1331 -0
- package/src/entrypoints/sdk/coreTypes.generated.js +3 -0
- package/src/entrypoints/sdk/coreTypes.js +49 -0
- package/src/entrypoints/sdk/runtimeTypes.js +1 -0
- package/src/entrypoints/sdk/sdkUtilityTypes.js +1 -0
- package/src/entrypoints/sdk/settingsTypes.generated.js +1 -0
- package/src/entrypoints/sdk/toolTypes.js +1 -0
- package/src/environment-runner/main.js +8 -0
- package/src/history.js +386 -0
- package/src/hooks/fileSuggestions.js +635 -0
- package/src/hooks/notifs/useAntOrgWarningNotification.js +5 -0
- package/src/hooks/notifs/useAutoModeUnavailableNotification.js +47 -0
- package/src/hooks/notifs/useCanSwitchToExistingSubscription.js +58 -0
- package/src/hooks/notifs/useDeprecationWarningNotification.js +43 -0
- package/src/hooks/notifs/useFastModeNotification.js +164 -0
- package/src/hooks/notifs/useIDEStatusIndicator.js +174 -0
- package/src/hooks/notifs/useInstallMessages.js +27 -0
- package/src/hooks/notifs/useLspInitializationNotification.js +144 -0
- package/src/hooks/notifs/useMcpConnectivityStatus.js +81 -0
- package/src/hooks/notifs/useModelMigrationNotifications.js +53 -0
- package/src/hooks/notifs/useNpmDeprecationNotification.js +25 -0
- package/src/hooks/notifs/usePluginAutoupdateNotification.js +83 -0
- package/src/hooks/notifs/usePluginInstallationStatus.js +128 -0
- package/src/hooks/notifs/useRateLimitWarningNotification.js +119 -0
- package/src/hooks/notifs/useSettingsErrors.js +64 -0
- package/src/hooks/notifs/useStartupNotification.js +33 -0
- package/src/hooks/notifs/useTeammateShutdownNotification.js +64 -0
- package/src/hooks/renderPlaceholder.js +26 -0
- package/src/hooks/toolPermission/PermissionContext.js +211 -0
- package/src/hooks/toolPermission/handlers/coordinatorHandler.js +44 -0
- package/src/hooks/toolPermission/handlers/interactiveHandler.js +397 -0
- package/src/hooks/toolPermission/handlers/swarmWorkerHandler.js +108 -0
- package/src/hooks/toolPermission/permissionLogging.js +145 -0
- package/src/hooks/unifiedSuggestions.js +130 -0
- package/src/hooks/useAfterFirstRender.js +12 -0
- package/src/hooks/useApiKeyVerification.js +63 -0
- package/src/hooks/useArrowKeyHistory.js +203 -0
- package/src/hooks/useAssistantHistory.js +193 -0
- package/src/hooks/useAwaySummary.js +105 -0
- package/src/hooks/useBackgroundTaskNavigation.js +204 -0
- package/src/hooks/useBlink.js +28 -0
- package/src/hooks/useCanUseTool.js +193 -0
- package/src/hooks/useCancelRequest.js +195 -0
- package/src/hooks/useChromeExtensionNotification.js +50 -0
- package/src/hooks/useClipboardImageHint.js +59 -0
- package/src/hooks/useCommandKeybindings.js +87 -0
- package/src/hooks/useCommandQueue.js +10 -0
- package/src/hooks/useCopyOnSelect.js +88 -0
- package/src/hooks/useDeferredHookMessages.js +43 -0
- package/src/hooks/useDiffData.js +69 -0
- package/src/hooks/useDiffInIDE.js +252 -0
- package/src/hooks/useDirectConnect.js +150 -0
- package/src/hooks/useDoublePress.js +44 -0
- package/src/hooks/useDynamicConfig.js +17 -0
- package/src/hooks/useElapsedTime.js +25 -0
- package/src/hooks/useExitOnCtrlCD.js +57 -0
- package/src/hooks/useExitOnCtrlCDWithKeybindings.js +17 -0
- package/src/hooks/useFileHistorySnapshotInit.js +14 -0
- package/src/hooks/useGlobalKeybindings.js +213 -0
- package/src/hooks/useHistorySearch.js +241 -0
- package/src/hooks/useIDEIntegration.js +56 -0
- package/src/hooks/useIdeAtMentioned.js +51 -0
- package/src/hooks/useIdeConnectionStatus.js +21 -0
- package/src/hooks/useIdeLogging.js +29 -0
- package/src/hooks/useIdeSelection.js +106 -0
- package/src/hooks/useInboxPoller.js +709 -0
- package/src/hooks/useInputBuffer.js +73 -0
- package/src/hooks/useIssueFlagBanner.js +115 -0
- package/src/hooks/useLogMessages.js +98 -0
- package/src/hooks/useLspPluginRecommendation.js +176 -0
- package/src/hooks/useMailboxBridge.js +15 -0
- package/src/hooks/useMainLoopModel.js +25 -0
- package/src/hooks/useManagePlugins.js +261 -0
- package/src/hooks/useMemoryUsage.js +28 -0
- package/src/hooks/useMergedClients.js +11 -0
- package/src/hooks/useMergedCommands.js +10 -0
- package/src/hooks/useMergedTools.js +32 -0
- package/src/hooks/useMinDisplayTime.js +26 -0
- package/src/hooks/useNotifyAfterTimeout.js +51 -0
- package/src/hooks/useOfficialMarketplaceNotification.js +47 -0
- package/src/hooks/usePasteHandler.js +195 -0
- package/src/hooks/usePluginRecommendationBase.js +101 -0
- package/src/hooks/usePrStatus.js +91 -0
- package/src/hooks/usePromptSuggestion.js +128 -0
- package/src/hooks/usePromptsFromClaudeInChrome.js +66 -0
- package/src/hooks/useQueueProcessor.js +46 -0
- package/src/hooks/useRemoteSession.js +431 -0
- package/src/hooks/useReplBridge.js +715 -0
- package/src/hooks/useSSHSession.js +167 -0
- package/src/hooks/useScheduledTasks.js +104 -0
- package/src/hooks/useSearchInput.js +302 -0
- package/src/hooks/useSessionBackgrounding.js +132 -0
- package/src/hooks/useSettings.js +10 -0
- package/src/hooks/useSettingsChange.js +13 -0
- package/src/hooks/useSkillImprovementSurvey.js +69 -0
- package/src/hooks/useSkillsChange.js +51 -0
- package/src/hooks/useSwarmInitialization.js +67 -0
- package/src/hooks/useSwarmPermissionPoller.js +215 -0
- package/src/hooks/useTaskListWatcher.js +157 -0
- package/src/hooks/useTasksV2.js +220 -0
- package/src/hooks/useTeammateViewAutoExit.js +55 -0
- package/src/hooks/useTeleportResume.js +81 -0
- package/src/hooks/useTerminalSize.js +9 -0
- package/src/hooks/useTextInput.js +397 -0
- package/src/hooks/useThaddeusHintRecommendation.js +117 -0
- package/src/hooks/useTimeout.js +10 -0
- package/src/hooks/useTurnDiffs.js +160 -0
- package/src/hooks/useTypeahead.js +1250 -0
- package/src/hooks/useUpdateNotification.js +21 -0
- package/src/hooks/useVimInput.js +232 -0
- package/src/hooks/useVirtualScroll.js +627 -0
- package/src/hooks/useVoice.js +952 -0
- package/src/hooks/useVoiceEnabled.js +21 -0
- package/src/hooks/useVoiceIntegration.js +629 -0
- package/src/infrastructure/audit.js +210 -0
- package/src/infrastructure/guardrails.js +513 -0
- package/src/infrastructure/index.js +11 -0
- package/src/ink/Ansi.js +269 -0
- package/src/ink/bidi.js +117 -0
- package/src/ink/clearTerminal.js +58 -0
- package/src/ink/colorize.js +198 -0
- package/src/ink/components/AlternateScreen.js +74 -0
- package/src/ink/components/App.js +562 -0
- package/src/ink/components/AppContext.js +11 -0
- package/src/ink/components/Box.js +155 -0
- package/src/ink/components/Button.js +166 -0
- package/src/ink/components/ClockContext.js +108 -0
- package/src/ink/components/CursorDeclarationContext.js +3 -0
- package/src/ink/components/ErrorOverview.js +50 -0
- package/src/ink/components/Link.js +34 -0
- package/src/ink/components/Newline.js +30 -0
- package/src/ink/components/NoSelect.js +57 -0
- package/src/ink/components/RawAnsi.js +46 -0
- package/src/ink/components/ScrollBox.js +171 -0
- package/src/ink/components/Spacer.js +20 -0
- package/src/ink/components/StdinContext.js +16 -0
- package/src/ink/components/TerminalFocusContext.js +45 -0
- package/src/ink/components/TerminalSizeContext.js +3 -0
- package/src/ink/components/Text.js +195 -0
- package/src/ink/constants.js +2 -0
- package/src/ink/dom.js +298 -0
- package/src/ink/events/click-event.js +36 -0
- package/src/ink/events/dispatcher.js +172 -0
- package/src/ink/events/emitter.js +31 -0
- package/src/ink/events/event-handlers.js +30 -0
- package/src/ink/events/event.js +9 -0
- package/src/ink/events/focus-event.js +16 -0
- package/src/ink/events/input-event.js +161 -0
- package/src/ink/events/keyboard-event.js +46 -0
- package/src/ink/events/terminal-event.js +78 -0
- package/src/ink/events/terminal-focus-event.js +15 -0
- package/src/ink/focus.js +158 -0
- package/src/ink/frame.js +30 -0
- package/src/ink/get-max-width.js +23 -0
- package/src/ink/hit-test.js +113 -0
- package/src/ink/hooks/use-animation-frame.js +48 -0
- package/src/ink/hooks/use-app.js +7 -0
- package/src/ink/hooks/use-declared-cursor.js +60 -0
- package/src/ink/hooks/use-input.js +70 -0
- package/src/ink/hooks/use-interval.js +54 -0
- package/src/ink/hooks/use-search-highlight.js +32 -0
- package/src/ink/hooks/use-selection.js +60 -0
- package/src/ink/hooks/use-stdin.js +7 -0
- package/src/ink/hooks/use-tab-status.js +57 -0
- package/src/ink/hooks/use-terminal-focus.js +15 -0
- package/src/ink/hooks/use-terminal-title.js +29 -0
- package/src/ink/hooks/use-terminal-viewport.js +77 -0
- package/src/ink/ink.js +1645 -0
- package/src/ink/instances.js +7 -0
- package/src/ink/layout/engine.js +4 -0
- package/src/ink/layout/geometry.js +61 -0
- package/src/ink/layout/node.js +62 -0
- package/src/ink/layout/yoga.js +237 -0
- package/src/ink/line-width-cache.js +19 -0
- package/src/ink/log-update.js +583 -0
- package/src/ink/measure-element.js +8 -0
- package/src/ink/measure-text.js +35 -0
- package/src/ink/node-cache.js +30 -0
- package/src/ink/optimizer.js +81 -0
- package/src/ink/output.js +556 -0
- package/src/ink/parse-keypress.js +695 -0
- package/src/ink/reconciler.js +384 -0
- package/src/ink/render-border.js +134 -0
- package/src/ink/render-node-to-output.js +1216 -0
- package/src/ink/render-to-screen.js +171 -0
- package/src/ink/renderer.js +129 -0
- package/src/ink/root.js +80 -0
- package/src/ink/screen.js +1132 -0
- package/src/ink/searchHighlight.js +78 -0
- package/src/ink/selection.js +792 -0
- package/src/ink/squash-text-nodes.js +56 -0
- package/src/ink/stringWidth.js +200 -0
- package/src/ink/styles.js +299 -0
- package/src/ink/supports-hyperlinks.js +40 -0
- package/src/ink/tabstops.js +39 -0
- package/src/ink/terminal-focus-state.js +35 -0
- package/src/ink/terminal-querier.js +173 -0
- package/src/ink/terminal.js +208 -0
- package/src/ink/termio/ansi.js +70 -0
- package/src/ink/termio/csi.js +260 -0
- package/src/ink/termio/dec.js +53 -0
- package/src/ink/termio/esc.js +55 -0
- package/src/ink/termio/osc.js +432 -0
- package/src/ink/termio/parser.js +356 -0
- package/src/ink/termio/sgr.js +292 -0
- package/src/ink/termio/tokenize.js +264 -0
- package/src/ink/termio/types.js +55 -0
- package/src/ink/termio.js +24 -0
- package/src/ink/useTerminalNotification.js +57 -0
- package/src/ink/warn.js +10 -0
- package/src/ink/widest-line.js +14 -0
- package/src/ink/wrap-text.js +54 -0
- package/src/ink/wrapAnsi.js +6 -0
- package/src/ink.js +50 -0
- package/src/integrations/credentialStore.js +176 -0
- package/src/integrations/index.js +5 -0
- package/src/integrations/integrationManager.js +180 -0
- package/src/integrations/providers/BaseProvider.js +180 -0
- package/src/integrations/providers/GitHubProvider.js +217 -0
- package/src/integrations/providers/GmailProvider.js +204 -0
- package/src/integrations/providers/GoogleCalendarProvider.js +113 -0
- package/src/integrations/providers/HubSpotProvider.js +159 -0
- package/src/integrations/providers/JiraProvider.js +216 -0
- package/src/integrations/providers/NotionProvider.js +221 -0
- package/src/integrations/providers/QuickBooksProvider.js +176 -0
- package/src/integrations/providers/SlackProvider.js +174 -0
- package/src/integrations/providers/StripeProvider.js +206 -0
- package/src/integrations/providers/TwilioProvider.js +239 -0
- package/src/integrations/providers/_template.js +112 -0
- package/src/integrations/types.js +7 -0
- package/src/interactiveHelpers.js +308 -0
- package/src/jobs/classifier.js +6 -0
- package/src/keybindings/KeybindingContext.js +184 -0
- package/src/keybindings/KeybindingProviderSetup.js +259 -0
- package/src/keybindings/defaultBindings.js +333 -0
- package/src/keybindings/loadUserBindings.js +393 -0
- package/src/keybindings/match.js +111 -0
- package/src/keybindings/parser.js +184 -0
- package/src/keybindings/reservedShortcuts.js +109 -0
- package/src/keybindings/resolver.js +182 -0
- package/src/keybindings/schema.js +205 -0
- package/src/keybindings/shortcutFormat.js +48 -0
- package/src/keybindings/template.js +40 -0
- package/src/keybindings/useKeybinding.js +161 -0
- package/src/keybindings/useShortcutDisplay.js +43 -0
- package/src/keybindings/validate.js +395 -0
- package/src/main.js +4128 -0
- package/src/memdir/findRelevantMemories.js +99 -0
- package/src/memdir/memdir.js +406 -0
- package/src/memdir/memoryAge.js +52 -0
- package/src/memdir/memoryScan.js +65 -0
- package/src/memdir/memoryShapeTelemetry.js +8 -0
- package/src/memdir/memoryTypes.js +260 -0
- package/src/memdir/paths.js +235 -0
- package/src/memdir/teamMemPaths.js +261 -0
- package/src/memdir/teamMemPrompts.js +82 -0
- package/src/migrations/migrateAutoUpdatesToSettings.js +47 -0
- package/src/migrations/migrateBypassPermissionsAcceptedToSettings.js +32 -0
- package/src/migrations/migrateEnableAllProjectMcpServersToSettings.js +83 -0
- package/src/migrations/migrateFennecToOpus.js +39 -0
- package/src/migrations/migrateLegacyOpusToCurrent.js +44 -0
- package/src/migrations/migrateOpusToOpus1m.js +31 -0
- package/src/migrations/migrateReplBridgeEnabledToRemoteControlAtStartup.js +23 -0
- package/src/migrations/migrateSonnet1mToSonnet45.js +38 -0
- package/src/migrations/migrateSonnet45ToSonnet46.js +48 -0
- package/src/migrations/resetAutoModeOptInForDefaultOffer.js +47 -0
- package/src/migrations/resetProToOpusDefault.js +46 -0
- package/src/moreright/useMoreRight.js +13 -0
- package/src/native-ts/color-diff/index.js +819 -0
- package/src/native-ts/file-index/index.js +328 -0
- package/src/native-ts/yoga-layout/enums.js +101 -0
- package/src/native-ts/yoga-layout/index.js +2113 -0
- package/src/outputStyles/loadOutputStylesDir.js +71 -0
- package/src/plugins/builtinPlugins.js +132 -0
- package/src/plugins/bundled/index.js +22 -0
- package/src/proactive/index.js +138 -0
- package/src/proactive/useProactive.js +82 -0
- package/src/projectOnboardingState.js +61 -0
- package/src/query/config.js +17 -0
- package/src/query/deps.js +12 -0
- package/src/query/stopHooks.js +332 -0
- package/src/query/tokenBudget.js +49 -0
- package/src/query.js +1264 -0
- package/src/remote/RemoteSessionManager.js +172 -0
- package/src/remote/SessionsWebSocket.js +308 -0
- package/src/remote/remotePermissionBridge.js +70 -0
- package/src/remote/sdkMessageAdapter.js +227 -0
- package/src/replLauncher.js +7 -0
- package/src/schemas/hooks.js +174 -0
- package/src/screens/Doctor.js +580 -0
- package/src/screens/REPL.js +4500 -0
- package/src/screens/ResumeConversation.js +339 -0
- package/src/self-hosted-runner/main.js +8 -0
- package/src/server/backends/dangerousBackend.js +8 -0
- package/src/server/connectHeadless.js +6 -0
- package/src/server/createDirectConnectSession.js +62 -0
- package/src/server/directConnectManager.js +153 -0
- package/src/server/lockfile.js +11 -0
- package/src/server/parseConnectUrl.js +20 -0
- package/src/server/server.js +12 -0
- package/src/server/serverBanner.js +9 -0
- package/src/server/serverLog.js +11 -0
- package/src/server/sessionManager.js +19 -0
- package/src/server/types.js +7 -0
- package/src/services/AgentSummary/agentSummary.js +147 -0
- package/src/services/MagicDocs/magicDocs.js +193 -0
- package/src/services/MagicDocs/prompts.js +110 -0
- package/src/services/PromptSuggestion/promptSuggestion.js +402 -0
- package/src/services/PromptSuggestion/speculation.js +643 -0
- package/src/services/SessionMemory/prompts.js +254 -0
- package/src/services/SessionMemory/sessionMemory.js +358 -0
- package/src/services/SessionMemory/sessionMemoryUtils.js +157 -0
- package/src/services/analytics/config.js +27 -0
- package/src/services/analytics/datadog.js +26 -0
- package/src/services/analytics/firstPartyEventLogger.js +65 -0
- package/src/services/analytics/firstPartyEventLoggingExporter.js +595 -0
- package/src/services/analytics/growthbook.js +103 -0
- package/src/services/analytics/index.js +91 -0
- package/src/services/analytics/metadata.js +696 -0
- package/src/services/analytics/sink.js +19 -0
- package/src/services/analytics/sinkKillswitch.js +19 -0
- package/src/services/api/adminRequests.js +57 -0
- package/src/services/api/bootstrap.js +118 -0
- package/src/services/api/claude.js +2466 -0
- package/src/services/api/client.js +335 -0
- package/src/services/api/dumpPrompts.js +174 -0
- package/src/services/api/emptyUsage.js +20 -0
- package/src/services/api/errorUtils.js +203 -0
- package/src/services/api/errors.js +926 -0
- package/src/services/api/filesApi.js +523 -0
- package/src/services/api/firstTokenDate.js +49 -0
- package/src/services/api/grove.js +44 -0
- package/src/services/api/logging.js +484 -0
- package/src/services/api/metricsOptOut.js +15 -0
- package/src/services/api/overageCreditGrant.js +123 -0
- package/src/services/api/promptCacheBreakDetection.js +510 -0
- package/src/services/api/referral.js +219 -0
- package/src/services/api/sessionIngress.js +358 -0
- package/src/services/api/ultrareviewQuota.js +29 -0
- package/src/services/api/usage.js +31 -0
- package/src/services/api/withRetry.js +587 -0
- package/src/services/api/xai/anthropic-shim.js +885 -0
- package/src/services/api/xai/brightDataSearch.js +161 -0
- package/src/services/api/xai/thaddeus-engine.js +605 -0
- package/src/services/api/xai/xai-client.js +276 -0
- package/src/services/autoDream/autoDream.js +244 -0
- package/src/services/autoDream/config.js +17 -0
- package/src/services/autoDream/consolidationLock.js +122 -0
- package/src/services/autoDream/consolidationPrompt.js +55 -0
- package/src/services/awaySummary.js +61 -0
- package/src/services/claudeAiLimits.js +331 -0
- package/src/services/claudeAiLimitsHook.js +15 -0
- package/src/services/compact/apiMicrocompact.js +97 -0
- package/src/services/compact/autoCompact.js +234 -0
- package/src/services/compact/cachedMCConfig.js +5 -0
- package/src/services/compact/compact.js +1256 -0
- package/src/services/compact/compactWarningHook.js +12 -0
- package/src/services/compact/compactWarningState.js +15 -0
- package/src/services/compact/grouping.js +58 -0
- package/src/services/compact/microCompact.js +414 -0
- package/src/services/compact/postCompactCleanup.js +70 -0
- package/src/services/compact/prompt.js +325 -0
- package/src/services/compact/reactiveCompact.js +20 -0
- package/src/services/compact/sessionMemoryCompact.js +467 -0
- package/src/services/compact/snipCompact.js +23 -0
- package/src/services/compact/snipProjection.js +11 -0
- package/src/services/compact/timeBasedMCConfig.js +11 -0
- package/src/services/contextCollapse/index.js +33 -0
- package/src/services/contextCollapse/operations.js +5 -0
- package/src/services/contextCollapse/persist.js +5 -0
- package/src/services/diagnosticTracking.js +282 -0
- package/src/services/elevenlabsTTS.js +245 -0
- package/src/services/extractMemories/extractMemories.js +442 -0
- package/src/services/extractMemories/prompts.js +129 -0
- package/src/services/internalLogging.js +68 -0
- package/src/services/lsp/LSPClient.js +306 -0
- package/src/services/lsp/LSPDiagnosticRegistry.js +277 -0
- package/src/services/lsp/LSPServerInstance.js +388 -0
- package/src/services/lsp/LSPServerManager.js +305 -0
- package/src/services/lsp/config.js +57 -0
- package/src/services/lsp/manager.js +246 -0
- package/src/services/lsp/passiveFeedback.js +226 -0
- package/src/services/mcp/InProcessTransport.js +54 -0
- package/src/services/mcp/MCPConnectionManager.js +50 -0
- package/src/services/mcp/SdkControlTransport.js +115 -0
- package/src/services/mcp/auth.js +1882 -0
- package/src/services/mcp/channelAllowlist.js +57 -0
- package/src/services/mcp/channelNotification.js +235 -0
- package/src/services/mcp/channelPermissions.js +192 -0
- package/src/services/mcp/claudeai.js +123 -0
- package/src/services/mcp/client.js +2478 -0
- package/src/services/mcp/config.js +1271 -0
- package/src/services/mcp/elicitationHandler.js +192 -0
- package/src/services/mcp/envExpansion.js +30 -0
- package/src/services/mcp/headersHelper.js +93 -0
- package/src/services/mcp/mcpStringUtils.js +85 -0
- package/src/services/mcp/normalization.js +21 -0
- package/src/services/mcp/oauthPort.js +69 -0
- package/src/services/mcp/officialRegistry.js +20 -0
- package/src/services/mcp/types.js +94 -0
- package/src/services/mcp/useManageMCPConnections.js +818 -0
- package/src/services/mcp/utils.js +433 -0
- package/src/services/mcp/vscodeSdkMcp.js +69 -0
- package/src/services/mcp/xaa.js +342 -0
- package/src/services/mcp/xaaIdpLogin.js +377 -0
- package/src/services/mcpServerApproval.js +30 -0
- package/src/services/mockRateLimits.js +666 -0
- package/src/services/notifier.js +114 -0
- package/src/services/oauth/auth-code-listener.js +165 -0
- package/src/services/oauth/client.js +397 -0
- package/src/services/oauth/crypto.js +19 -0
- package/src/services/oauth/getOauthProfile.js +48 -0
- package/src/services/oauth/index.js +133 -0
- package/src/services/plugins/PluginInstallationManager.js +139 -0
- package/src/services/plugins/pluginCliCommands.js +230 -0
- package/src/services/plugins/pluginOperations.js +826 -0
- package/src/services/policyLimits/index.js +547 -0
- package/src/services/policyLimits/types.js +9 -0
- package/src/services/preventSleep.js +143 -0
- package/src/services/rateLimitMessages.js +271 -0
- package/src/services/rateLimitMocking.js +91 -0
- package/src/services/remoteManagedSettings/index.js +534 -0
- package/src/services/remoteManagedSettings/securityCheck.js +60 -0
- package/src/services/remoteManagedSettings/syncCache.js +90 -0
- package/src/services/remoteManagedSettings/syncCacheState.js +89 -0
- package/src/services/remoteManagedSettings/types.js +12 -0
- package/src/services/sessionTranscript/sessionTranscript.js +5 -0
- package/src/services/settingsSync/index.js +478 -0
- package/src/services/settingsSync/types.js +35 -0
- package/src/services/skillSearch/featureCheck.js +8 -0
- package/src/services/skillSearch/localSearch.js +5 -0
- package/src/services/skillSearch/prefetch.js +8 -0
- package/src/services/skillSearch/remoteSkillLoader.js +8 -0
- package/src/services/skillSearch/remoteSkillState.js +11 -0
- package/src/services/skillSearch/signals.js +3 -0
- package/src/services/skillSearch/telemetry.js +8 -0
- package/src/services/teamMemorySync/index.js +976 -0
- package/src/services/teamMemorySync/secretScanner.js +275 -0
- package/src/services/teamMemorySync/teamMemSecretGuard.js +33 -0
- package/src/services/teamMemorySync/types.js +47 -0
- package/src/services/teamMemorySync/watcher.js +326 -0
- package/src/services/thaddeusAuth.js +485 -0
- package/src/services/thaddeusAuthTypes.js +9 -0
- package/src/services/thaddeusLoginFlow.js +236 -0
- package/src/services/tips/tipHistory.js +17 -0
- package/src/services/tips/tipRegistry.js +593 -0
- package/src/services/tips/tipScheduler.js +40 -0
- package/src/services/tokenEstimation.js +365 -0
- package/src/services/toolUseSummary/toolUseSummaryGenerator.js +87 -0
- package/src/services/tools/StreamingToolExecutor.js +413 -0
- package/src/services/tools/toolExecution.js +1309 -0
- package/src/services/tools/toolHooks.js +454 -0
- package/src/services/tools/toolOrchestration.js +110 -0
- package/src/services/vcr.js +291 -0
- package/src/services/voice.js +392 -0
- package/src/services/voiceKeyterms.js +94 -0
- package/src/services/voiceStreamSTT.js +405 -0
- package/src/setup.js +310 -0
- package/src/skills/bundled/batch.js +114 -0
- package/src/skills/bundled/claudeApi.js +145 -0
- package/src/skills/bundled/claudeApiContent.js +71 -0
- package/src/skills/bundled/claudeInChrome.js +27 -0
- package/src/skills/bundled/debug.js +99 -0
- package/src/skills/bundled/dream.js +49 -0
- package/src/skills/bundled/emailSetup.js +196 -0
- package/src/skills/bundled/hunter.js +28 -0
- package/src/skills/bundled/index.js +80 -0
- package/src/skills/bundled/keybindings.js +292 -0
- package/src/skills/bundled/loop.js +81 -0
- package/src/skills/bundled/loremIpsum.js +264 -0
- package/src/skills/bundled/reactor.js +31 -0
- package/src/skills/bundled/remember.js +73 -0
- package/src/skills/bundled/runSkillGenerator.js +12 -0
- package/src/skills/bundled/scheduleRemoteAgents.js +373 -0
- package/src/skills/bundled/simplify.js +66 -0
- package/src/skills/bundled/skillify.js +182 -0
- package/src/skills/bundled/stuck.js +69 -0
- package/src/skills/bundled/updateConfig.js +463 -0
- package/src/skills/bundled/verify.js +23 -0
- package/src/skills/bundled/verifyContent.js +10 -0
- package/src/skills/bundledSkills.js +159 -0
- package/src/skills/loadSkillsDir.js +736 -0
- package/src/skills/mcpSkillBuilders.js +10 -0
- package/src/skills/mcpSkills.js +5 -0
- package/src/state/AppState.js +182 -0
- package/src/state/AppStateStore.js +117 -0
- package/src/state/onChangeAppState.js +132 -0
- package/src/state/selectors.js +51 -0
- package/src/state/store.js +21 -0
- package/src/state/teammateViewHelpers.js +124 -0
- package/src/stubs/ant-chrome-mcp/index.js +4 -0
- package/src/stubs/ant-computer-use-input/index.js +2 -0
- package/src/stubs/ant-computer-use-mcp/index.js +7 -0
- package/src/stubs/ant-computer-use-mcp/sentinelApps.js +2 -0
- package/src/stubs/ant-computer-use-mcp/types.js +3 -0
- package/src/stubs/ant-computer-use-swift/index.js +1 -0
- package/src/stubs/anthropic-sandbox/index.js +34 -0
- package/src/tasks/DreamTask/DreamTask.js +99 -0
- package/src/tasks/InProcessTeammateTask/InProcessTeammateTask.js +116 -0
- package/src/tasks/InProcessTeammateTask/types.js +35 -0
- package/src/tasks/LocalAgentTask/LocalAgentTask.js +507 -0
- package/src/tasks/LocalMainSessionTask.js +338 -0
- package/src/tasks/LocalShellTask/LocalShellTask.js +475 -0
- package/src/tasks/LocalShellTask/guards.js +9 -0
- package/src/tasks/LocalShellTask/killShellTasks.js +59 -0
- package/src/tasks/LocalWorkflowTask/LocalWorkflowTask.js +7 -0
- package/src/tasks/MonitorMcpTask/MonitorMcpTask.js +20 -0
- package/src/tasks/RemoteAgentTask/RemoteAgentTask.js +742 -0
- package/src/tasks/pillLabel.js +69 -0
- package/src/tasks/stopTask.js +67 -0
- package/src/tasks/types.js +18 -0
- package/src/tasks.js +37 -0
- package/src/tools/AIEmployeesTool/AIEmployeesTool.js +674 -0
- package/src/tools/AIEmployeesTool/constants.js +1 -0
- package/src/tools/AIEmployeesTool/prompt.js +56 -0
- package/src/tools/AgentTool/AgentTool.js +1221 -0
- package/src/tools/AgentTool/UI.js +593 -0
- package/src/tools/AgentTool/agentColorManager.js +43 -0
- package/src/tools/AgentTool/agentDisplay.js +72 -0
- package/src/tools/AgentTool/agentMemory.js +125 -0
- package/src/tools/AgentTool/agentMemorySnapshot.js +136 -0
- package/src/tools/AgentTool/agentToolUtils.js +456 -0
- package/src/tools/AgentTool/built-in/exploreAgent.js +76 -0
- package/src/tools/AgentTool/built-in/generalPurposeAgent.js +28 -0
- package/src/tools/AgentTool/built-in/planAgent.js +87 -0
- package/src/tools/AgentTool/built-in/statuslineSetup.js +140 -0
- package/src/tools/AgentTool/built-in/thaddeusGuideAgent.js +174 -0
- package/src/tools/AgentTool/built-in/verificationAgent.js +146 -0
- package/src/tools/AgentTool/builtInAgents.js +56 -0
- package/src/tools/AgentTool/constants.js +11 -0
- package/src/tools/AgentTool/forkSubagent.js +177 -0
- package/src/tools/AgentTool/loadAgentsDir.js +497 -0
- package/src/tools/AgentTool/prompt.js +260 -0
- package/src/tools/AgentTool/resumeAgent.js +182 -0
- package/src/tools/AgentTool/runAgent.js +627 -0
- package/src/tools/AppointmentsTool/AppointmentsTool.js +628 -0
- package/src/tools/AppointmentsTool/constants.js +1 -0
- package/src/tools/AppointmentsTool/prompt.js +15 -0
- package/src/tools/AskUserQuestionTool/AskUserQuestionTool.js +238 -0
- package/src/tools/AskUserQuestionTool/prompt.js +38 -0
- package/src/tools/BashTool/BashTool.js +1009 -0
- package/src/tools/BashTool/BashToolResultMessage.js +169 -0
- package/src/tools/BashTool/UI.js +134 -0
- package/src/tools/BashTool/bashCommandHelpers.js +184 -0
- package/src/tools/BashTool/bashPermissions.js +2023 -0
- package/src/tools/BashTool/bashSecurity.js +2267 -0
- package/src/tools/BashTool/commandSemantics.js +105 -0
- package/src/tools/BashTool/commentLabel.js +14 -0
- package/src/tools/BashTool/destructiveCommandWarning.js +88 -0
- package/src/tools/BashTool/modeValidation.js +86 -0
- package/src/tools/BashTool/pathValidation.js +1079 -0
- package/src/tools/BashTool/prompt.js +333 -0
- package/src/tools/BashTool/readOnlyValidation.js +1794 -0
- package/src/tools/BashTool/sedEditParser.js +282 -0
- package/src/tools/BashTool/sedValidation.js +580 -0
- package/src/tools/BashTool/shouldUseSandbox.js +125 -0
- package/src/tools/BashTool/toolName.js +2 -0
- package/src/tools/BashTool/utils.js +180 -0
- package/src/tools/BriefTool/BriefTool.js +173 -0
- package/src/tools/BriefTool/UI.js +67 -0
- package/src/tools/BriefTool/attachments.js +86 -0
- package/src/tools/BriefTool/prompt.js +19 -0
- package/src/tools/BriefTool/upload.js +136 -0
- package/src/tools/CalendarTool/CalendarTool.js +498 -0
- package/src/tools/CalendarTool/constants.js +1 -0
- package/src/tools/CalendarTool/prompt.js +11 -0
- package/src/tools/ConfigTool/ConfigTool.js +398 -0
- package/src/tools/ConfigTool/UI.js +25 -0
- package/src/tools/ConfigTool/constants.js +1 -0
- package/src/tools/ConfigTool/prompt.js +82 -0
- package/src/tools/ConfigTool/supportedSettings.js +180 -0
- package/src/tools/ContactsTool/ContactsTool.js +648 -0
- package/src/tools/ContactsTool/constants.js +1 -0
- package/src/tools/ContactsTool/prompt.js +15 -0
- package/src/tools/CtxInspectTool/CtxInspectTool.js +44 -0
- package/src/tools/DiscoverSkillsTool/prompt.js +4 -0
- package/src/tools/EmailReadTool/index.js +410 -0
- package/src/tools/EmailSendTool/index.js +178 -0
- package/src/tools/EnterPlanModeTool/EnterPlanModeTool.js +98 -0
- package/src/tools/EnterPlanModeTool/UI.js +14 -0
- package/src/tools/EnterPlanModeTool/constants.js +1 -0
- package/src/tools/EnterPlanModeTool/prompt.js +164 -0
- package/src/tools/EnterWorktreeTool/EnterWorktreeTool.js +104 -0
- package/src/tools/EnterWorktreeTool/UI.js +9 -0
- package/src/tools/EnterWorktreeTool/constants.js +1 -0
- package/src/tools/EnterWorktreeTool/prompt.js +30 -0
- package/src/tools/ExitPlanModeTool/ExitPlanModeV2Tool.js +383 -0
- package/src/tools/ExitPlanModeTool/UI.js +32 -0
- package/src/tools/ExitPlanModeTool/constants.js +2 -0
- package/src/tools/ExitPlanModeTool/prompt.js +27 -0
- package/src/tools/ExitWorktreeTool/ExitWorktreeTool.js +257 -0
- package/src/tools/ExitWorktreeTool/UI.js +10 -0
- package/src/tools/ExitWorktreeTool/constants.js +1 -0
- package/src/tools/ExitWorktreeTool/prompt.js +32 -0
- package/src/tools/FileEditTool/FileEditTool.js +480 -0
- package/src/tools/FileEditTool/UI.js +202 -0
- package/src/tools/FileEditTool/constants.js +7 -0
- package/src/tools/FileEditTool/prompt.js +24 -0
- package/src/tools/FileEditTool/types.js +50 -0
- package/src/tools/FileEditTool/utils.js +579 -0
- package/src/tools/FileReadTool/FileReadTool.js +889 -0
- package/src/tools/FileReadTool/UI.js +126 -0
- package/src/tools/FileReadTool/imageProcessor.js +46 -0
- package/src/tools/FileReadTool/limits.js +70 -0
- package/src/tools/FileReadTool/prompt.js +31 -0
- package/src/tools/FileWriteTool/FileWriteTool.js +341 -0
- package/src/tools/FileWriteTool/UI.js +339 -0
- package/src/tools/FileWriteTool/prompt.js +15 -0
- package/src/tools/GlobTool/GlobTool.js +161 -0
- package/src/tools/GlobTool/UI.js +40 -0
- package/src/tools/GlobTool/prompt.js +6 -0
- package/src/tools/GrepTool/GrepTool.js +439 -0
- package/src/tools/GrepTool/UI.js +155 -0
- package/src/tools/GrepTool/prompt.js +16 -0
- package/src/tools/IntegrationsTool/IntegrationsTool.js +217 -0
- package/src/tools/IntegrationsTool/constants.js +1 -0
- package/src/tools/IntegrationsTool/prompt.js +41 -0
- package/src/tools/InteractionsTool/InteractionsTool.js +525 -0
- package/src/tools/InteractionsTool/constants.js +1 -0
- package/src/tools/InteractionsTool/prompt.js +14 -0
- package/src/tools/InvoicesTool/InvoicesTool.js +581 -0
- package/src/tools/InvoicesTool/constants.js +1 -0
- package/src/tools/InvoicesTool/prompt.js +15 -0
- package/src/tools/LSPTool/LSPTool.js +660 -0
- package/src/tools/LSPTool/UI.js +205 -0
- package/src/tools/LSPTool/formatters.js +445 -0
- package/src/tools/LSPTool/prompt.js +20 -0
- package/src/tools/LSPTool/schemas.js +197 -0
- package/src/tools/LSPTool/symbolContext.js +75 -0
- package/src/tools/LeadScorerTool/LeadScorerTool.js +509 -0
- package/src/tools/LeadScorerTool/constants.js +1 -0
- package/src/tools/LeadScorerTool/prompt.js +11 -0
- package/src/tools/ListMcpResourcesTool/ListMcpResourcesTool.js +100 -0
- package/src/tools/ListMcpResourcesTool/UI.js +17 -0
- package/src/tools/ListMcpResourcesTool/prompt.js +18 -0
- package/src/tools/ListPeersTool/ListPeersTool.js +45 -0
- package/src/tools/MCPTool/MCPTool.js +60 -0
- package/src/tools/MCPTool/UI.js +343 -0
- package/src/tools/MCPTool/classifyForCollapse.js +597 -0
- package/src/tools/MCPTool/prompt.js +3 -0
- package/src/tools/McpAuthTool/McpAuthTool.js +162 -0
- package/src/tools/MonitorTool/MonitorTool.js +55 -0
- package/src/tools/NotebookEditTool/NotebookEditTool.js +421 -0
- package/src/tools/NotebookEditTool/UI.js +41 -0
- package/src/tools/NotebookEditTool/constants.js +2 -0
- package/src/tools/NotebookEditTool/prompt.js +2 -0
- package/src/tools/OverflowTestTool/OverflowTestTool.js +51 -0
- package/src/tools/PhoneBridgeTool/PhoneBridgeTool.js +301 -0
- package/src/tools/PhoneBridgeTool/constants.js +1 -0
- package/src/tools/PhoneBridgeTool/prompt.js +26 -0
- package/src/tools/PowerShellTool/PowerShellTool.js +900 -0
- package/src/tools/PowerShellTool/UI.js +58 -0
- package/src/tools/PowerShellTool/clmTypes.js +207 -0
- package/src/tools/PowerShellTool/commandSemantics.js +115 -0
- package/src/tools/PowerShellTool/commonParameters.js +27 -0
- package/src/tools/PowerShellTool/destructiveCommandWarning.js +92 -0
- package/src/tools/PowerShellTool/gitSafety.js +185 -0
- package/src/tools/PowerShellTool/modeValidation.js +357 -0
- package/src/tools/PowerShellTool/pathValidation.js +1712 -0
- package/src/tools/PowerShellTool/powershellPermissions.js +1351 -0
- package/src/tools/PowerShellTool/powershellSecurity.js +942 -0
- package/src/tools/PowerShellTool/prompt.js +132 -0
- package/src/tools/PowerShellTool/readOnlyValidation.js +1633 -0
- package/src/tools/PowerShellTool/toolName.js +2 -0
- package/src/tools/PushNotificationTool/PushNotificationTool.js +35 -0
- package/src/tools/REPLTool/REPLTool.js +44 -0
- package/src/tools/REPLTool/constants.js +43 -0
- package/src/tools/REPLTool/primitiveTools.js +36 -0
- package/src/tools/ReadMcpResourceTool/ReadMcpResourceTool.js +112 -0
- package/src/tools/ReadMcpResourceTool/UI.js +24 -0
- package/src/tools/ReadMcpResourceTool/prompt.js +15 -0
- package/src/tools/RemoteTriggerTool/RemoteTriggerTool.js +142 -0
- package/src/tools/RemoteTriggerTool/UI.js +12 -0
- package/src/tools/RemoteTriggerTool/prompt.js +12 -0
- package/src/tools/ReviewArtifactTool/ReviewArtifactTool.js +51 -0
- package/src/tools/ScheduleCronTool/CronCreateTool.js +120 -0
- package/src/tools/ScheduleCronTool/CronDeleteTool.js +74 -0
- package/src/tools/ScheduleCronTool/CronListTool.js +77 -0
- package/src/tools/ScheduleCronTool/UI.js +29 -0
- package/src/tools/ScheduleCronTool/prompt.js +115 -0
- package/src/tools/SendMessageTool/SendMessageTool.js +673 -0
- package/src/tools/SendMessageTool/UI.js +24 -0
- package/src/tools/SendMessageTool/constants.js +1 -0
- package/src/tools/SendMessageTool/prompt.js +47 -0
- package/src/tools/SendUserFileTool/SendUserFileTool.js +35 -0
- package/src/tools/SendUserFileTool/prompt.js +5 -0
- package/src/tools/SkillTool/SkillTool.js +825 -0
- package/src/tools/SkillTool/UI.js +61 -0
- package/src/tools/SkillTool/constants.js +1 -0
- package/src/tools/SkillTool/prompt.js +184 -0
- package/src/tools/SleepTool/SleepTool.js +42 -0
- package/src/tools/SleepTool/prompt.js +14 -0
- package/src/tools/SnipTool/SnipTool.js +47 -0
- package/src/tools/SnipTool/prompt.js +5 -0
- package/src/tools/SubscribePRTool/SubscribePRTool.js +49 -0
- package/src/tools/SuggestBackgroundPRTool/SuggestBackgroundPRTool.js +44 -0
- package/src/tools/SyntheticOutputTool/SyntheticOutputTool.js +138 -0
- package/src/tools/SyntheticOutputTool/SyntheticOutputTool.ts +1 -1
- package/src/tools/TaskCreateTool/TaskCreateTool.js +104 -0
- package/src/tools/TaskCreateTool/constants.js +1 -0
- package/src/tools/TaskCreateTool/prompt.js +52 -0
- package/src/tools/TaskGetTool/TaskGetTool.js +106 -0
- package/src/tools/TaskGetTool/constants.js +1 -0
- package/src/tools/TaskGetTool/prompt.js +23 -0
- package/src/tools/TaskListTool/TaskListTool.js +89 -0
- package/src/tools/TaskListTool/constants.js +1 -0
- package/src/tools/TaskListTool/prompt.js +44 -0
- package/src/tools/TaskOutputTool/TaskOutputTool.js +536 -0
- package/src/tools/TaskOutputTool/constants.js +1 -0
- package/src/tools/TaskStopTool/TaskStopTool.js +110 -0
- package/src/tools/TaskStopTool/UI.js +31 -0
- package/src/tools/TaskStopTool/prompt.js +7 -0
- package/src/tools/TaskUpdateTool/TaskUpdateTool.js +301 -0
- package/src/tools/TaskUpdateTool/constants.js +1 -0
- package/src/tools/TaskUpdateTool/prompt.js +76 -0
- package/src/tools/TeamCreateTool/TeamCreateTool.js +177 -0
- package/src/tools/TeamCreateTool/UI.js +4 -0
- package/src/tools/TeamCreateTool/constants.js +1 -0
- package/src/tools/TeamCreateTool/prompt.js +113 -0
- package/src/tools/TeamDeleteTool/TeamDeleteTool.js +102 -0
- package/src/tools/TeamDeleteTool/UI.js +13 -0
- package/src/tools/TeamDeleteTool/constants.js +1 -0
- package/src/tools/TeamDeleteTool/prompt.js +16 -0
- package/src/tools/TerminalCaptureTool/TerminalCaptureTool.js +47 -0
- package/src/tools/TerminalCaptureTool/prompt.js +11 -0
- package/src/tools/TodoWriteTool/TodoWriteTool.js +99 -0
- package/src/tools/TodoWriteTool/constants.js +1 -0
- package/src/tools/TodoWriteTool/prompt.js +181 -0
- package/src/tools/ToolSearchTool/ToolSearchTool.js +357 -0
- package/src/tools/ToolSearchTool/constants.js +1 -0
- package/src/tools/ToolSearchTool/prompt.js +97 -0
- package/src/tools/TungstenTool/TungstenLiveMonitor.js +7 -0
- package/src/tools/TungstenTool/TungstenTool.js +3 -0
- package/src/tools/VerifyPlanExecutionTool/VerifyPlanExecutionTool.js +45 -0
- package/src/tools/VerifyPlanExecutionTool/constants.js +2 -0
- package/src/tools/WebBrowserTool/WebBrowserPanel.js +5 -0
- package/src/tools/WebBrowserTool/WebBrowserTool.js +58 -0
- package/src/tools/WebFetchTool/UI.js +31 -0
- package/src/tools/WebFetchTool/WebFetchTool.js +246 -0
- package/src/tools/WebFetchTool/preapproved.js +154 -0
- package/src/tools/WebFetchTool/prompt.js +39 -0
- package/src/tools/WebFetchTool/utils.js +368 -0
- package/src/tools/WebSearchTool/UI.js +67 -0
- package/src/tools/WebSearchTool/WebSearchTool.js +396 -0
- package/src/tools/WebSearchTool/prompt.js +32 -0
- package/src/tools/WorkflowTool/WorkflowPermissionRequest.js +7 -0
- package/src/tools/WorkflowTool/WorkflowTool.js +51 -0
- package/src/tools/WorkflowTool/bundled/index.js +5 -0
- package/src/tools/WorkflowTool/constants.js +1 -0
- package/src/tools/WorkflowTool/createWorkflowCommand.js +5 -0
- package/src/tools/shared/gitOperationTracking.js +220 -0
- package/src/tools/shared/spawnMultiAgent.js +805 -0
- package/src/tools/testing/TestingPermissionTool.js +72 -0
- package/src/tools/utils.js +24 -0
- package/src/tools.js +365 -0
- package/src/types/command.js +8 -0
- package/src/types/connectorText.js +3 -0
- package/src/types/generated/events_mono/claude_code/v1/claude_code_internal_event.js +673 -0
- package/src/types/generated/events_mono/common/v1/auth.js +49 -0
- package/src/types/generated/events_mono/growthbook/v1/growthbook_experiment_event.js +147 -0
- package/src/types/generated/google/protobuf/timestamp.js +38 -0
- package/src/types/hooks.js +153 -0
- package/src/types/ids.js +27 -0
- package/src/types/logs.js +11 -0
- package/src/types/permissions.js +25 -0
- package/src/types/plugin.js +72 -0
- package/src/types/textInputTypes.js +20 -0
- package/src/upstreamproxy/relay.js +346 -0
- package/src/upstreamproxy/upstreamproxy.js +234 -0
- package/src/utils/CircularBuffer.js +75 -0
- package/src/utils/Cursor.js +1229 -0
- package/src/utils/QueryGuard.js +115 -0
- package/src/utils/Shell.js +374 -0
- package/src/utils/ShellCommand.js +336 -0
- package/src/utils/abortController.js +74 -0
- package/src/utils/activityManager.js +127 -0
- package/src/utils/advisor.js +77 -0
- package/src/utils/agentContext.js +91 -0
- package/src/utils/agentId.js +83 -0
- package/src/utils/agentSwarmsEnabled.js +37 -0
- package/src/utils/agenticSessionSearch.js +255 -0
- package/src/utils/analyzeContext.js +846 -0
- package/src/utils/ansiToPng.js +259 -0
- package/src/utils/ansiToSvg.js +207 -0
- package/src/utils/api.js +555 -0
- package/src/utils/apiPreconnect.js +62 -0
- package/src/utils/appleTerminalBackup.js +95 -0
- package/src/utils/argumentSubstitution.js +114 -0
- package/src/utils/array.js +12 -0
- package/src/utils/asciicast.js +200 -0
- package/src/utils/attachments.js +2518 -0
- package/src/utils/attribution.js +308 -0
- package/src/utils/auth.js +1598 -0
- package/src/utils/authFileDescriptor.js +152 -0
- package/src/utils/authPortable.js +14 -0
- package/src/utils/autoModeDenials.js +15 -0
- package/src/utils/autoRunIssue.js +113 -0
- package/src/utils/autoUpdater.js +457 -0
- package/src/utils/aws.js +44 -0
- package/src/utils/awsAuthStatusManager.js +66 -0
- package/src/utils/background/remote/preconditions.js +175 -0
- package/src/utils/background/remote/remoteSession.js +53 -0
- package/src/utils/backgroundHousekeeping.js +64 -0
- package/src/utils/bash/ParsedCommand.js +241 -0
- package/src/utils/bash/ShellSnapshot.js +489 -0
- package/src/utils/bash/ast.js +2590 -0
- package/src/utils/bash/bashParser.js +4355 -0
- package/src/utils/bash/bashPipeCommand.js +249 -0
- package/src/utils/bash/commands.js +1131 -0
- package/src/utils/bash/heredoc.js +647 -0
- package/src/utils/bash/parser.js +195 -0
- package/src/utils/bash/prefix.js +154 -0
- package/src/utils/bash/registry.js +23 -0
- package/src/utils/bash/shellCompletion.js +196 -0
- package/src/utils/bash/shellPrefix.js +25 -0
- package/src/utils/bash/shellQuote.js +253 -0
- package/src/utils/bash/shellQuoting.js +106 -0
- package/src/utils/bash/specs/alias.js +11 -0
- package/src/utils/bash/specs/index.js +16 -0
- package/src/utils/bash/specs/nohup.js +10 -0
- package/src/utils/bash/specs/pyright.js +88 -0
- package/src/utils/bash/specs/sleep.js +10 -0
- package/src/utils/bash/specs/srun.js +28 -0
- package/src/utils/bash/specs/time.js +10 -0
- package/src/utils/bash/specs/timeout.js +17 -0
- package/src/utils/bash/treeSitterAnalysis.js +407 -0
- package/src/utils/betas.js +331 -0
- package/src/utils/billing.js +54 -0
- package/src/utils/binaryCheck.js +40 -0
- package/src/utils/browser.js +58 -0
- package/src/utils/bufferedWriter.js +77 -0
- package/src/utils/bundledMode.js +19 -0
- package/src/utils/businessDb.js +390 -0
- package/src/utils/caCerts.js +91 -0
- package/src/utils/caCertsConfig.js +77 -0
- package/src/utils/cachePaths.js +28 -0
- package/src/utils/classifierApprovals.js +66 -0
- package/src/utils/classifierApprovalsHook.js +10 -0
- package/src/utils/claudeDesktop.js +108 -0
- package/src/utils/claudeInChrome/chromeNativeHost.js +416 -0
- package/src/utils/claudeInChrome/common.js +466 -0
- package/src/utils/claudeInChrome/mcpServer.js +237 -0
- package/src/utils/claudeInChrome/prompt.js +79 -0
- package/src/utils/claudeInChrome/setup.js +304 -0
- package/src/utils/claudeInChrome/setupPortable.js +172 -0
- package/src/utils/claudeInChrome/toolRendering.js +235 -0
- package/src/utils/claudemd.js +1052 -0
- package/src/utils/cleanup.js +514 -0
- package/src/utils/cleanupRegistry.js +22 -0
- package/src/utils/cliArgs.js +53 -0
- package/src/utils/cliHighlight.js +45 -0
- package/src/utils/codeIndexing.js +149 -0
- package/src/utils/collapseBackgroundBashNotifications.js +70 -0
- package/src/utils/collapseHookSummaries.js +48 -0
- package/src/utils/collapseReadSearch.js +869 -0
- package/src/utils/collapseTeammateShutdowns.js +44 -0
- package/src/utils/combinedAbortSignal.js +40 -0
- package/src/utils/commandLifecycle.js +7 -0
- package/src/utils/commitAttribution.js +718 -0
- package/src/utils/completionCache.js +138 -0
- package/src/utils/computerUse/appNames.js +170 -0
- package/src/utils/computerUse/cleanup.js +65 -0
- package/src/utils/computerUse/common.js +56 -0
- package/src/utils/computerUse/computerUseLock.js +183 -0
- package/src/utils/computerUse/drainRunLoop.js +71 -0
- package/src/utils/computerUse/escHotkey.js +53 -0
- package/src/utils/computerUse/executor.js +480 -0
- package/src/utils/computerUse/gates.js +55 -0
- package/src/utils/computerUse/hostAdapter.js +62 -0
- package/src/utils/computerUse/inputLoader.js +25 -0
- package/src/utils/computerUse/mcpServer.js +84 -0
- package/src/utils/computerUse/setup.js +42 -0
- package/src/utils/computerUse/swiftLoader.js +18 -0
- package/src/utils/computerUse/toolRendering.js +101 -0
- package/src/utils/computerUse/wrapper.js +317 -0
- package/src/utils/concurrentSessions.js +179 -0
- package/src/utils/config.js +1078 -0
- package/src/utils/configConstants.js +18 -0
- package/src/utils/contentArray.js +45 -0
- package/src/utils/context.js +185 -0
- package/src/utils/contextAnalysis.js +171 -0
- package/src/utils/contextSuggestions.js +158 -0
- package/src/utils/controlMessageCompat.js +31 -0
- package/src/utils/conversationRecovery.js +434 -0
- package/src/utils/cron.js +260 -0
- package/src/utils/cronJitterConfig.js +62 -0
- package/src/utils/cronScheduler.js +388 -0
- package/src/utils/cronTasks.js +328 -0
- package/src/utils/cronTasksLock.js +159 -0
- package/src/utils/crossProjectResume.js +46 -0
- package/src/utils/crypto.js +13 -0
- package/src/utils/cwd.js +29 -0
- package/src/utils/debug.js +220 -0
- package/src/utils/debugFilter.js +125 -0
- package/src/utils/deepLink/banner.js +103 -0
- package/src/utils/deepLink/parseDeepLink.js +138 -0
- package/src/utils/deepLink/protocolHandler.js +119 -0
- package/src/utils/deepLink/registerProtocol.js +291 -0
- package/src/utils/deepLink/terminalLauncher.js +455 -0
- package/src/utils/deepLink/terminalPreference.js +51 -0
- package/src/utils/desktopDeepLink.js +208 -0
- package/src/utils/detectRepository.js +157 -0
- package/src/utils/diagLogs.js +74 -0
- package/src/utils/diff.js +108 -0
- package/src/utils/directMemberMessage.js +34 -0
- package/src/utils/displayTags.js +46 -0
- package/src/utils/doctorContextWarnings.js +179 -0
- package/src/utils/doctorDiagnostic.js +494 -0
- package/src/utils/dxt/helpers.js +64 -0
- package/src/utils/dxt/zip.js +167 -0
- package/src/utils/earlyInput.js +166 -0
- package/src/utils/editor.js +163 -0
- package/src/utils/effort.js +271 -0
- package/src/utils/embeddedTools.js +26 -0
- package/src/utils/employeeChat.js +271 -0
- package/src/utils/employeeDb.js +326 -0
- package/src/utils/env.js +358 -0
- package/src/utils/envDynamic.js +130 -0
- package/src/utils/envUtils.js +161 -0
- package/src/utils/envValidation.js +26 -0
- package/src/utils/errorLogSink.js +196 -0
- package/src/utils/errors.js +207 -0
- package/src/utils/exampleCommands.js +165 -0
- package/src/utils/execFileNoThrow.js +93 -0
- package/src/utils/execFileNoThrowPortable.js +49 -0
- package/src/utils/execSyncWrapper.js +6 -0
- package/src/utils/exportRenderer.js +71 -0
- package/src/utils/extraUsage.js +19 -0
- package/src/utils/fastMode.js +393 -0
- package/src/utils/file.js +467 -0
- package/src/utils/fileHistory.js +851 -0
- package/src/utils/fileOperationAnalytics.js +45 -0
- package/src/utils/filePersistence/filePersistence.js +212 -0
- package/src/utils/filePersistence/outputsScanner.js +104 -0
- package/src/utils/filePersistence/types.js +4 -0
- package/src/utils/fileRead.js +81 -0
- package/src/utils/fileReadCache.js +78 -0
- package/src/utils/fileStateCache.js +99 -0
- package/src/utils/findExecutable.js +13 -0
- package/src/utils/fingerprint.js +58 -0
- package/src/utils/forkedAgent.js +410 -0
- package/src/utils/format.js +238 -0
- package/src/utils/formatBriefTimestamp.js +72 -0
- package/src/utils/fpsTracker.js +34 -0
- package/src/utils/frontmatterParser.js +260 -0
- package/src/utils/fsOperations.js +555 -0
- package/src/utils/fullscreen.js +194 -0
- package/src/utils/generatedFiles.js +122 -0
- package/src/utils/generators.js +67 -0
- package/src/utils/genericProcessUtils.js +155 -0
- package/src/utils/getWorktreePaths.js +56 -0
- package/src/utils/getWorktreePathsPortable.js +23 -0
- package/src/utils/ghPrStatus.js +71 -0
- package/src/utils/git/gitConfigParser.js +226 -0
- package/src/utils/git/gitFilesystem.js +606 -0
- package/src/utils/git/gitignore.js +84 -0
- package/src/utils/git.js +725 -0
- package/src/utils/gitDiff.js +395 -0
- package/src/utils/gitSettings.js +18 -0
- package/src/utils/github/ghAuthStatus.js +23 -0
- package/src/utils/githubRepoPathMapping.js +135 -0
- package/src/utils/glob.js +90 -0
- package/src/utils/gracefulShutdown.js +447 -0
- package/src/utils/groupToolUses.js +126 -0
- package/src/utils/handlePromptSubmit.js +398 -0
- package/src/utils/hash.js +44 -0
- package/src/utils/headlessProfiler.js +147 -0
- package/src/utils/heapDumpService.js +201 -0
- package/src/utils/heatmap.js +151 -0
- package/src/utils/highlightMatch.js +29 -0
- package/src/utils/hooks/AsyncHookRegistry.js +187 -0
- package/src/utils/hooks/apiQueryHookHelper.js +77 -0
- package/src/utils/hooks/execAgentHook.js +257 -0
- package/src/utils/hooks/execHttpHook.js +184 -0
- package/src/utils/hooks/execPromptHook.js +171 -0
- package/src/utils/hooks/fileChangedWatcher.js +161 -0
- package/src/utils/hooks/hookEvents.js +111 -0
- package/src/utils/hooks/hookHelpers.js +60 -0
- package/src/utils/hooks/hooksConfigManager.js +323 -0
- package/src/utils/hooks/hooksConfigSnapshot.js +114 -0
- package/src/utils/hooks/hooksSettings.js +204 -0
- package/src/utils/hooks/postSamplingHooks.js +39 -0
- package/src/utils/hooks/registerFrontmatterHooks.js +47 -0
- package/src/utils/hooks/registerSkillHooks.js +40 -0
- package/src/utils/hooks/sessionHooks.js +252 -0
- package/src/utils/hooks/skillImprovement.js +211 -0
- package/src/utils/hooks/ssrfGuard.js +258 -0
- package/src/utils/hooks.js +3668 -0
- package/src/utils/horizontalScroll.js +108 -0
- package/src/utils/http.js +120 -0
- package/src/utils/hyperlink.js +28 -0
- package/src/utils/iTermBackup.js +48 -0
- package/src/utils/ide.js +1195 -0
- package/src/utils/idePathConversion.js +66 -0
- package/src/utils/idleTimeout.js +44 -0
- package/src/utils/imagePaste.js +343 -0
- package/src/utils/imageResizer.js +664 -0
- package/src/utils/imageStore.js +150 -0
- package/src/utils/imageValidation.js +92 -0
- package/src/utils/immediateCommand.js +12 -0
- package/src/utils/inProcessTeammateHelpers.js +71 -0
- package/src/utils/ink.js +20 -0
- package/src/utils/intl.js +83 -0
- package/src/utils/jetbrains.js +152 -0
- package/src/utils/json.js +231 -0
- package/src/utils/jsonRead.js +14 -0
- package/src/utils/keyboardShortcuts.js +11 -0
- package/src/utils/lazySchema.js +8 -0
- package/src/utils/listSessionsImpl.js +332 -0
- package/src/utils/localInstaller.js +130 -0
- package/src/utils/lockfile.js +30 -0
- package/src/utils/log.js +280 -0
- package/src/utils/logoV2Utils.js +256 -0
- package/src/utils/mailbox.js +50 -0
- package/src/utils/managedEnv.js +160 -0
- package/src/utils/managedEnvConstants.js +185 -0
- package/src/utils/markdown.js +315 -0
- package/src/utils/markdownConfigLoader.js +480 -0
- package/src/utils/mcp/dateTimeParser.js +102 -0
- package/src/utils/mcp/elicitationValidation.js +259 -0
- package/src/utils/mcpInstructionsDelta.js +97 -0
- package/src/utils/mcpOutputStorage.js +159 -0
- package/src/utils/mcpValidation.js +165 -0
- package/src/utils/mcpWebSocketTransport.js +180 -0
- package/src/utils/memoize.js +205 -0
- package/src/utils/memory/types.js +9 -0
- package/src/utils/memory/versions.js +7 -0
- package/src/utils/memoryFileDetection.js +245 -0
- package/src/utils/messagePredicates.js +6 -0
- package/src/utils/messageQueueManager.js +430 -0
- package/src/utils/messages/mappers.js +240 -0
- package/src/utils/messages/systemInit.js +72 -0
- package/src/utils/messages.js +4286 -0
- package/src/utils/model/agent.js +128 -0
- package/src/utils/model/aliases.js +21 -0
- package/src/utils/model/antModels.js +25 -0
- package/src/utils/model/bedrock.js +220 -0
- package/src/utils/model/check1mAccess.js +64 -0
- package/src/utils/model/configs.js +86 -0
- package/src/utils/model/contextWindowUpgradeCheck.js +41 -0
- package/src/utils/model/deprecation.js +72 -0
- package/src/utils/model/model.js +533 -0
- package/src/utils/model/modelAllowlist.js +148 -0
- package/src/utils/model/modelCapabilities.js +105 -0
- package/src/utils/model/modelOptions.js +450 -0
- package/src/utils/model/modelStrings.js +144 -0
- package/src/utils/model/modelSupportOverrides.js +40 -0
- package/src/utils/model/providers.js +35 -0
- package/src/utils/model/validateModel.js +131 -0
- package/src/utils/modelCost.js +160 -0
- package/src/utils/modifiers.js +39 -0
- package/src/utils/mtls.js +132 -0
- package/src/utils/nativeInstaller/download.js +370 -0
- package/src/utils/nativeInstaller/index.js +8 -0
- package/src/utils/nativeInstaller/installer.js +1395 -0
- package/src/utils/nativeInstaller/packageManagers.js +258 -0
- package/src/utils/nativeInstaller/pidLock.js +347 -0
- package/src/utils/notebook.js +176 -0
- package/src/utils/objectGroupBy.js +15 -0
- package/src/utils/pasteStore.js +93 -0
- package/src/utils/path.js +140 -0
- package/src/utils/pdf.js +236 -0
- package/src/utils/pdfUtils.js +61 -0
- package/src/utils/peerAddress.js +20 -0
- package/src/utils/permissions/PermissionMode.js +95 -0
- package/src/utils/permissions/PermissionPromptToolResultSchema.js +85 -0
- package/src/utils/permissions/PermissionResult.js +11 -0
- package/src/utils/permissions/PermissionRule.js +19 -0
- package/src/utils/permissions/PermissionUpdate.js +268 -0
- package/src/utils/permissions/PermissionUpdateSchema.js +61 -0
- package/src/utils/permissions/autoModeState.js +31 -0
- package/src/utils/permissions/bashClassifier.js +30 -0
- package/src/utils/permissions/bypassPermissionsKillswitch.js +115 -0
- package/src/utils/permissions/classifierDecision.js +86 -0
- package/src/utils/permissions/classifierShared.js +28 -0
- package/src/utils/permissions/dangerousPatterns.js +78 -0
- package/src/utils/permissions/denialTracking.js +34 -0
- package/src/utils/permissions/filesystem.js +1411 -0
- package/src/utils/permissions/getNextPermissionMode.js +74 -0
- package/src/utils/permissions/pathValidation.js +351 -0
- package/src/utils/permissions/permissionExplainer.js +188 -0
- package/src/utils/permissions/permissionRuleParser.js +175 -0
- package/src/utils/permissions/permissionSetup.js +1162 -0
- package/src/utils/permissions/permissions.js +1063 -0
- package/src/utils/permissions/permissionsLoader.js +217 -0
- package/src/utils/permissions/shadowedRuleDetection.js +149 -0
- package/src/utils/permissions/shellRuleMatching.js +174 -0
- package/src/utils/permissions/yoloClassifier.js +1193 -0
- package/src/utils/planModeV2.js +75 -0
- package/src/utils/plans.js +334 -0
- package/src/utils/platform.js +122 -0
- package/src/utils/plugins/addDirPluginSettings.js +53 -0
- package/src/utils/plugins/cacheUtils.js +174 -0
- package/src/utils/plugins/dependencyResolver.js +244 -0
- package/src/utils/plugins/fetchTelemetry.js +108 -0
- package/src/utils/plugins/gitAvailability.js +65 -0
- package/src/utils/plugins/headlessPluginInstall.js +136 -0
- package/src/utils/plugins/hintRecommendation.js +136 -0
- package/src/utils/plugins/installCounts.js +221 -0
- package/src/utils/plugins/installedPluginsManager.js +1003 -0
- package/src/utils/plugins/loadPluginAgents.js +219 -0
- package/src/utils/plugins/loadPluginCommands.js +595 -0
- package/src/utils/plugins/loadPluginHooks.js +239 -0
- package/src/utils/plugins/loadPluginOutputStyles.js +112 -0
- package/src/utils/plugins/lspPluginIntegration.js +293 -0
- package/src/utils/plugins/lspRecommendation.js +278 -0
- package/src/utils/plugins/managedPlugins.js +26 -0
- package/src/utils/plugins/marketplaceHelpers.js +470 -0
- package/src/utils/plugins/marketplaceManager.js +1939 -0
- package/src/utils/plugins/mcpPluginIntegration.js +465 -0
- package/src/utils/plugins/mcpbHandler.js +708 -0
- package/src/utils/plugins/officialMarketplace.js +19 -0
- package/src/utils/plugins/officialMarketplaceGcs.js +202 -0
- package/src/utils/plugins/officialMarketplaceStartupCheck.js +344 -0
- package/src/utils/plugins/orphanedPluginFilter.js +96 -0
- package/src/utils/plugins/parseMarketplaceInput.js +143 -0
- package/src/utils/plugins/performStartupChecks.js +66 -0
- package/src/utils/plugins/pluginAutoupdate.js +210 -0
- package/src/utils/plugins/pluginBlocklist.js +93 -0
- package/src/utils/plugins/pluginDirectories.js +170 -0
- package/src/utils/plugins/pluginFlagging.js +173 -0
- package/src/utils/plugins/pluginIdentifier.js +78 -0
- package/src/utils/plugins/pluginInstallationHelpers.js +400 -0
- package/src/utils/plugins/pluginLoader.js +2426 -0
- package/src/utils/plugins/pluginOptionsStorage.js +311 -0
- package/src/utils/plugins/pluginPolicy.js +18 -0
- package/src/utils/plugins/pluginStartupCheck.js +261 -0
- package/src/utils/plugins/pluginVersioning.js +128 -0
- package/src/utils/plugins/reconciler.js +181 -0
- package/src/utils/plugins/refresh.js +162 -0
- package/src/utils/plugins/schemas.js +1283 -0
- package/src/utils/plugins/validatePlugin.js +765 -0
- package/src/utils/plugins/walkPluginMarkdown.js +49 -0
- package/src/utils/plugins/zipCache.js +346 -0
- package/src/utils/plugins/zipCacheAdapters.js +133 -0
- package/src/utils/powershell/dangerousCmdlets.js +174 -0
- package/src/utils/powershell/parser.js +1357 -0
- package/src/utils/powershell/staticPrefix.js +277 -0
- package/src/utils/preflightChecks.js +147 -0
- package/src/utils/privacyLevel.js +49 -0
- package/src/utils/process.js +56 -0
- package/src/utils/processUserInput/processBashCommand.js +118 -0
- package/src/utils/processUserInput/processSlashCommand.js +845 -0
- package/src/utils/processUserInput/processTextPrompt.js +68 -0
- package/src/utils/processUserInput/processUserInput.js +344 -0
- package/src/utils/profilerBase.js +32 -0
- package/src/utils/promptCategory.js +39 -0
- package/src/utils/promptEditor.js +151 -0
- package/src/utils/promptShellExecution.js +117 -0
- package/src/utils/protectedNamespace.js +4 -0
- package/src/utils/proxy.js +345 -0
- package/src/utils/queryContext.js +110 -0
- package/src/utils/queryHelpers.js +436 -0
- package/src/utils/queryProfiler.js +242 -0
- package/src/utils/queueProcessor.js +70 -0
- package/src/utils/readEditContext.js +176 -0
- package/src/utils/readFileInRange.js +278 -0
- package/src/utils/releaseNotes.js +307 -0
- package/src/utils/renderOptions.js +67 -0
- package/src/utils/ripgrep.js +521 -0
- package/src/utils/sandbox/sandbox-adapter.js +750 -0
- package/src/utils/sandbox/sandbox-ui-utils.js +11 -0
- package/src/utils/sanitization.js +72 -0
- package/src/utils/screenshotClipboard.js +89 -0
- package/src/utils/sdkEventQueue.js +49 -0
- package/src/utils/secureStorage/fallbackStorage.js +59 -0
- package/src/utils/secureStorage/index.js +13 -0
- package/src/utils/secureStorage/keychainPrefetch.js +91 -0
- package/src/utils/secureStorage/macOsKeychainHelpers.js +91 -0
- package/src/utils/secureStorage/macOsKeychainStorage.js +192 -0
- package/src/utils/secureStorage/plainTextStorage.js +81 -0
- package/src/utils/semanticBoolean.js +23 -0
- package/src/utils/semanticNumber.js +34 -0
- package/src/utils/semver.js +51 -0
- package/src/utils/sequential.js +43 -0
- package/src/utils/sessionActivity.js +120 -0
- package/src/utils/sessionEnvVars.js +18 -0
- package/src/utils/sessionEnvironment.js +131 -0
- package/src/utils/sessionFileAccessHooks.js +205 -0
- package/src/utils/sessionIngressAuth.js +113 -0
- package/src/utils/sessionRestore.js +357 -0
- package/src/utils/sessionStart.js +165 -0
- package/src/utils/sessionState.js +76 -0
- package/src/utils/sessionStorage.js +4162 -0
- package/src/utils/sessionStoragePortable.js +665 -0
- package/src/utils/sessionTitle.js +120 -0
- package/src/utils/sessionUrl.js +50 -0
- package/src/utils/set.js +50 -0
- package/src/utils/settings/allErrors.js +29 -0
- package/src/utils/settings/applySettingsChange.js +65 -0
- package/src/utils/settings/changeDetector.js +409 -0
- package/src/utils/settings/constants.js +166 -0
- package/src/utils/settings/internalWrites.js +33 -0
- package/src/utils/settings/managedPath.js +29 -0
- package/src/utils/settings/mdm/constants.js +62 -0
- package/src/utils/settings/mdm/rawRead.js +97 -0
- package/src/utils/settings/mdm/settings.js +254 -0
- package/src/utils/settings/permissionValidation.js +224 -0
- package/src/utils/settings/pluginOnlyPolicy.js +53 -0
- package/src/utils/settings/schemaOutput.js +7 -0
- package/src/utils/settings/settings.js +791 -0
- package/src/utils/settings/settingsCache.js +47 -0
- package/src/utils/settings/toolValidationConfig.js +76 -0
- package/src/utils/settings/types.js +846 -0
- package/src/utils/settings/validateEditTool.js +34 -0
- package/src/utils/settings/validation.js +192 -0
- package/src/utils/settings/validationTips.js +111 -0
- package/src/utils/shell/bashProvider.js +202 -0
- package/src/utils/shell/outputLimits.js +7 -0
- package/src/utils/shell/powershellDetection.js +96 -0
- package/src/utils/shell/powershellProvider.js +104 -0
- package/src/utils/shell/prefix.js +246 -0
- package/src/utils/shell/readOnlyCommandValidation.js +1776 -0
- package/src/utils/shell/resolveDefaultShell.js +13 -0
- package/src/utils/shell/shellProvider.js +2 -0
- package/src/utils/shell/shellToolUtils.js +21 -0
- package/src/utils/shell/specPrefix.js +198 -0
- package/src/utils/shellConfig.js +136 -0
- package/src/utils/sideQuery.js +134 -0
- package/src/utils/sideQuestion.js +121 -0
- package/src/utils/signal.js +34 -0
- package/src/utils/sinks.js +15 -0
- package/src/utils/skills/skillChangeDetector.js +264 -0
- package/src/utils/slashCommandParsing.js +46 -0
- package/src/utils/sleep.js +72 -0
- package/src/utils/sliceAnsi.js +74 -0
- package/src/utils/slowOperations.js +216 -0
- package/src/utils/standaloneAgent.js +20 -0
- package/src/utils/startupProfiler.js +149 -0
- package/src/utils/staticRender.js +104 -0
- package/src/utils/stats.js +802 -0
- package/src/utils/statsCache.js +330 -0
- package/src/utils/status.js +359 -0
- package/src/utils/statusNoticeDefinitions.js +123 -0
- package/src/utils/statusNoticeHelpers.js +15 -0
- package/src/utils/stream.js +73 -0
- package/src/utils/streamJsonStdoutGuard.js +107 -0
- package/src/utils/streamlinedTransform.js +162 -0
- package/src/utils/stringUtils.js +202 -0
- package/src/utils/subprocessEnv.js +87 -0
- package/src/utils/suggestions/commandSuggestions.js +458 -0
- package/src/utils/suggestions/directoryCompletion.js +191 -0
- package/src/utils/suggestions/shellHistoryCompletion.js +95 -0
- package/src/utils/suggestions/skillUsageTracking.js +50 -0
- package/src/utils/suggestions/slackChannelSuggestions.js +169 -0
- package/src/utils/swarm/It2SetupPrompt.js +386 -0
- package/src/utils/swarm/backends/ITermBackend.js +276 -0
- package/src/utils/swarm/backends/InProcessBackend.js +237 -0
- package/src/utils/swarm/backends/PaneBackendExecutor.js +250 -0
- package/src/utils/swarm/backends/TmuxBackend.js +574 -0
- package/src/utils/swarm/backends/detection.js +112 -0
- package/src/utils/swarm/backends/it2Setup.js +185 -0
- package/src/utils/swarm/backends/registry.js +369 -0
- package/src/utils/swarm/backends/teammateModeSnapshot.js +68 -0
- package/src/utils/swarm/backends/types.js +9 -0
- package/src/utils/swarm/constants.js +29 -0
- package/src/utils/swarm/inProcessRunner.js +1021 -0
- package/src/utils/swarm/leaderPermissionBridge.js +31 -0
- package/src/utils/swarm/permissionSync.js +667 -0
- package/src/utils/swarm/reconnection.js +82 -0
- package/src/utils/swarm/spawnInProcess.js +218 -0
- package/src/utils/swarm/spawnUtils.js +123 -0
- package/src/utils/swarm/teamHelpers.js +484 -0
- package/src/utils/swarm/teammateInit.js +87 -0
- package/src/utils/swarm/teammateLayoutManager.js +82 -0
- package/src/utils/swarm/teammateModel.js +9 -0
- package/src/utils/swarm/teammatePromptAddendum.js +17 -0
- package/src/utils/systemDirectories.js +51 -0
- package/src/utils/systemPrompt.js +88 -0
- package/src/utils/systemPromptType.js +9 -0
- package/src/utils/systemTheme.js +108 -0
- package/src/utils/taggedId.js +49 -0
- package/src/utils/task/TaskOutput.js +320 -0
- package/src/utils/task/diskOutput.js +387 -0
- package/src/utils/task/framework.js +236 -0
- package/src/utils/task/outputFormatting.js +24 -0
- package/src/utils/task/sdkProgress.js +24 -0
- package/src/utils/taskSummary.js +3 -0
- package/src/utils/tasks.js +672 -0
- package/src/utils/teamDiscovery.js +48 -0
- package/src/utils/teamMemoryOps.js +67 -0
- package/src/utils/teammate.js +237 -0
- package/src/utils/teammateContext.js +56 -0
- package/src/utils/teammateMailbox.js +793 -0
- package/src/utils/telemetry/betaSessionTracing.js +25 -0
- package/src/utils/telemetry/bigqueryExporter.js +17 -0
- package/src/utils/telemetry/events.js +7 -0
- package/src/utils/telemetry/instrumentation.js +16 -0
- package/src/utils/telemetry/logger.js +25 -0
- package/src/utils/telemetry/perfettoTracing.js +882 -0
- package/src/utils/telemetry/pluginTelemetry.js +76 -0
- package/src/utils/telemetry/sessionTracing.js +62 -0
- package/src/utils/telemetry/skillLoadedEvent.js +4 -0
- package/src/utils/telemetryAttributes.js +56 -0
- package/src/utils/teleport/api.js +299 -0
- package/src/utils/teleport/environmentSelection.js +55 -0
- package/src/utils/teleport/environments.js +84 -0
- package/src/utils/teleport/gitBundle.js +192 -0
- package/src/utils/teleport.js +1047 -0
- package/src/utils/tempfile.js +26 -0
- package/src/utils/terminal.js +105 -0
- package/src/utils/terminalPanel.js +155 -0
- package/src/utils/textHighlighting.js +113 -0
- package/src/utils/thaddeusHints.js +142 -0
- package/src/utils/theme.js +525 -0
- package/src/utils/thinking.js +130 -0
- package/src/utils/timeouts.js +35 -0
- package/src/utils/tmuxSocket.js +373 -0
- package/src/utils/todo/types.js +9 -0
- package/src/utils/tokenBudget.js +62 -0
- package/src/utils/tokens.js +223 -0
- package/src/utils/toolErrors.js +101 -0
- package/src/utils/toolPool.js +61 -0
- package/src/utils/toolResultStorage.js +768 -0
- package/src/utils/toolSchemaCache.js +7 -0
- package/src/utils/toolSearch.js +551 -0
- package/src/utils/transcriptSearch.js +200 -0
- package/src/utils/treeify.js +111 -0
- package/src/utils/truncate.js +164 -0
- package/src/utils/udsClient.js +5 -0
- package/src/utils/udsMessaging.js +23 -0
- package/src/utils/ultraplan/ccrSession.js +264 -0
- package/src/utils/ultraplan/keyword.js +122 -0
- package/src/utils/unaryLogging.js +16 -0
- package/src/utils/undercover.js +89 -0
- package/src/utils/user.js +137 -0
- package/src/utils/userAgent.js +9 -0
- package/src/utils/userPromptKeywords.js +21 -0
- package/src/utils/uuid.js +22 -0
- package/src/utils/warningHandler.js +97 -0
- package/src/utils/which.js +75 -0
- package/src/utils/windowsPaths.js +146 -0
- package/src/utils/withResolvers.js +13 -0
- package/src/utils/words.js +793 -0
- package/src/utils/workforceIntent.js +192 -0
- package/src/utils/workloadContext.js +42 -0
- package/src/utils/worktree.js +1142 -0
- package/src/utils/worktreeModeEnabled.js +11 -0
- package/src/utils/xdg.js +52 -0
- package/src/utils/xml.js +15 -0
- package/src/utils/yaml.js +14 -0
- package/src/utils/zodToJsonSchema.js +19 -0
- package/src/vim/motions.js +73 -0
- package/src/vim/operators.js +401 -0
- package/src/vim/textObjects.js +153 -0
- package/src/vim/transitions.js +340 -0
- package/src/vim/types.js +93 -0
- package/src/voice/voiceModeEnabled.js +20 -0
- package/thaddeus-terminal.ts +401 -3
|
@@ -0,0 +1,1581 @@
|
|
|
1
|
+
import type { Command } from '../commands.js'
|
|
2
|
+
|
|
3
|
+
const ALLOWED_TOOLS = [
|
|
4
|
+
'Bash(*)',
|
|
5
|
+
'FileRead(*)',
|
|
6
|
+
'FileWrite(*)',
|
|
7
|
+
'FileEdit(*)',
|
|
8
|
+
'WebSearch(*)',
|
|
9
|
+
'WebFetch(*)',
|
|
10
|
+
'EmailSend(*)',
|
|
11
|
+
'EmailRead(*)',
|
|
12
|
+
'Agent(*)',
|
|
13
|
+
'CronCreate(*)',
|
|
14
|
+
'CronList(*)',
|
|
15
|
+
'CronDelete(*)',
|
|
16
|
+
'TaskCreate(*)',
|
|
17
|
+
'TaskUpdate(*)',
|
|
18
|
+
'Glob(*)',
|
|
19
|
+
'Grep(*)',
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
function getPromptContent(): string {
|
|
23
|
+
return `## /start-business — Autonomous Revenue Generator
|
|
24
|
+
|
|
25
|
+
⚠️ IMMEDIATE ACTION REQUIRED — DO NOT run any other skills, memory reviews, or preparatory steps.
|
|
26
|
+
DO NOT invoke /remember, Skill(remember), or any memory management.
|
|
27
|
+
DO NOT analyze memory files or propose memory changes.
|
|
28
|
+
DO NOT save memories about this command.
|
|
29
|
+
Your ONLY job right now: present the 5 business options below and wait for the user to pick a number.
|
|
30
|
+
START YOUR RESPONSE WITH THE 5 OPTIONS. Nothing else first.
|
|
31
|
+
|
|
32
|
+
⚠️ HONESTY RULE — READ SCRIPT OUTPUT BEFORE REPORTING RESULTS.
|
|
33
|
+
If a script prints errors, crashes, or exits with code 1 → report it as FAILED. Period.
|
|
34
|
+
NEVER say "completed" or "live" when the script output shows errors.
|
|
35
|
+
The user has caught you lying about this 3 times. Do not do it again.
|
|
36
|
+
|
|
37
|
+
You are Thaddeus, an autonomous AI business operator. The user has triggered /start-business.
|
|
38
|
+
Your job: present 5 real businesses you can ACTUALLY run with the tools you have, let the user pick one,
|
|
39
|
+
then BUILD AND LAUNCH IT IMMEDIATELY. No hand-holding. No "what do you think?" — you BUILD IT AND RUN IT.
|
|
40
|
+
|
|
41
|
+
You have FULL Playwright browser automation via Bash. You write Python scripts that use Playwright
|
|
42
|
+
to log into sites, click buttons, upload files, scrape data — the same way you automate Gmail and TikTok.
|
|
43
|
+
This is your superpower. You are NOT limited to APIs.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## PLAYWRIGHT AUTOMATION PLAYBOOK (USE FOR ALL BROWSER TASKS)
|
|
48
|
+
|
|
49
|
+
### Session Persistence Pattern
|
|
50
|
+
Every marketplace gets its own persistent browser profile so cookies survive between runs:
|
|
51
|
+
|
|
52
|
+
\`\`\`python
|
|
53
|
+
import os, time, json, random
|
|
54
|
+
from playwright.sync_api import sync_playwright
|
|
55
|
+
|
|
56
|
+
# Each platform gets its own session directory
|
|
57
|
+
SESSION_DIR = os.path.expanduser("~/.thaddeus-<platform>-session")
|
|
58
|
+
PROFILE_DIR = os.path.join(SESSION_DIR, "chrome-profile")
|
|
59
|
+
PROXY_CONFIG = os.path.join(SESSION_DIR, "proxy.json")
|
|
60
|
+
os.makedirs(PROFILE_DIR, exist_ok=True)
|
|
61
|
+
|
|
62
|
+
def load_proxy_config():
|
|
63
|
+
"""
|
|
64
|
+
Load proxy settings from proxy.json. Supports:
|
|
65
|
+
- SOCKS5 proxies (best for residential IPs)
|
|
66
|
+
- HTTP/HTTPS proxies
|
|
67
|
+
- Rotating proxy services (BrightData, Oxylabs, SmartProxy, etc.)
|
|
68
|
+
|
|
69
|
+
proxy.json format:
|
|
70
|
+
{
|
|
71
|
+
"server": "socks5://user:pass@proxy.host:port",
|
|
72
|
+
// OR for rotating residential:
|
|
73
|
+
"server": "http://user:pass@gate.smartproxy.com:7777",
|
|
74
|
+
// OR list for round-robin rotation:
|
|
75
|
+
"servers": [
|
|
76
|
+
"socks5://user:pass@us-1.proxy.com:1080",
|
|
77
|
+
"socks5://user:pass@us-2.proxy.com:1080",
|
|
78
|
+
"socks5://user:pass@eu-1.proxy.com:1080"
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
"""
|
|
82
|
+
if os.path.exists(PROXY_CONFIG):
|
|
83
|
+
with open(PROXY_CONFIG) as f:
|
|
84
|
+
config = json.load(f)
|
|
85
|
+
# If multiple servers, pick one randomly for rotation
|
|
86
|
+
if "servers" in config and config["servers"]:
|
|
87
|
+
return {"server": random.choice(config["servers"])}
|
|
88
|
+
if "server" in config:
|
|
89
|
+
return {"server": config["server"]}
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
def get_browser(pw, headless=False):
|
|
93
|
+
proxy = load_proxy_config()
|
|
94
|
+
|
|
95
|
+
# ALWAYS clean up lock files before launching — prevents "profile already in use" errors
|
|
96
|
+
# This is the #1 cause of launch_persistent_context failures
|
|
97
|
+
import glob as _glob
|
|
98
|
+
import subprocess as _sp
|
|
99
|
+
for lock_pattern in ["Singleton*", ".org.chromium*", "lockfile"]:
|
|
100
|
+
for lock in _glob.glob(os.path.join(PROFILE_DIR, lock_pattern)):
|
|
101
|
+
try:
|
|
102
|
+
os.remove(lock)
|
|
103
|
+
except:
|
|
104
|
+
pass
|
|
105
|
+
# Kill any lingering Edge processes that might hold the profile
|
|
106
|
+
if headless:
|
|
107
|
+
try:
|
|
108
|
+
_sp.run(["pkill", "-f", "msedge.*" + PROFILE_DIR.replace("/", ".")[-20:]], capture_output=True, timeout=3)
|
|
109
|
+
except:
|
|
110
|
+
pass
|
|
111
|
+
time.sleep(1) # Give OS time to release file handles
|
|
112
|
+
|
|
113
|
+
launch_args = {
|
|
114
|
+
"user_data_dir": PROFILE_DIR,
|
|
115
|
+
"channel": "msedge",
|
|
116
|
+
"headless": headless,
|
|
117
|
+
"viewport": {"width": 1440, "height": 900},
|
|
118
|
+
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
|
|
119
|
+
"args": [
|
|
120
|
+
"--start-maximized",
|
|
121
|
+
"--disable-blink-features=AutomationControlled",
|
|
122
|
+
],
|
|
123
|
+
"ignore_default_args": ["--enable-automation"],
|
|
124
|
+
}
|
|
125
|
+
if proxy:
|
|
126
|
+
launch_args["proxy"] = proxy
|
|
127
|
+
context = pw.chromium.launch_persistent_context(**launch_args)
|
|
128
|
+
# Kill webdriver fingerprint
|
|
129
|
+
for page in context.pages:
|
|
130
|
+
page.add_init_script("Object.defineProperty(navigator, 'webdriver', { get: () => false });")
|
|
131
|
+
return context
|
|
132
|
+
|
|
133
|
+
# ─── IP BLOCK DETECTION ───
|
|
134
|
+
# Etsy and Fiverr show specific block pages when they flag your IP.
|
|
135
|
+
# Check for these AFTER every page.goto() call.
|
|
136
|
+
|
|
137
|
+
BLOCK_SIGNATURES = [
|
|
138
|
+
"Access is temporarily restricted",
|
|
139
|
+
"unusual activity from your device",
|
|
140
|
+
"Automated (bot) activity",
|
|
141
|
+
"Please verify you are a human",
|
|
142
|
+
"Access denied",
|
|
143
|
+
"Rate limit exceeded",
|
|
144
|
+
"blocked",
|
|
145
|
+
]
|
|
146
|
+
|
|
147
|
+
def is_ip_blocked(page):
|
|
148
|
+
"""Check if the current page is an IP block/restriction page."""
|
|
149
|
+
try:
|
|
150
|
+
body_text = page.inner_text("body", timeout=5000)
|
|
151
|
+
for sig in BLOCK_SIGNATURES:
|
|
152
|
+
if sig.lower() in body_text.lower():
|
|
153
|
+
return True, sig
|
|
154
|
+
except:
|
|
155
|
+
pass
|
|
156
|
+
return False, None
|
|
157
|
+
|
|
158
|
+
def handle_ip_block(page, platform):
|
|
159
|
+
"""
|
|
160
|
+
Called when an IP block is detected. Takes a screenshot, notifies the user,
|
|
161
|
+
and provides recovery options.
|
|
162
|
+
"""
|
|
163
|
+
screenshot_path = os.path.expanduser(f"~/thaddeus-businesses/{platform}/ip-block-screenshot.png")
|
|
164
|
+
try:
|
|
165
|
+
page.screenshot(path=screenshot_path, full_page=True)
|
|
166
|
+
except:
|
|
167
|
+
pass
|
|
168
|
+
|
|
169
|
+
print("\\n" + "!" * 70)
|
|
170
|
+
print(f"⚠️ IP BLOCKED BY {platform.upper()}")
|
|
171
|
+
print("!" * 70)
|
|
172
|
+
print(f"\\nScreenshot saved: {screenshot_path}")
|
|
173
|
+
print("\\nThis means the platform flagged this IP for bot-like activity.")
|
|
174
|
+
print("\\nTO FIX THIS — pick one:")
|
|
175
|
+
print("")
|
|
176
|
+
print(" OPTION 1: VPN (fastest)")
|
|
177
|
+
print(" → Turn on a VPN (any provider — ExpressVPN, NordVPN, ProtonVPN, Mullvad)")
|
|
178
|
+
print(" → Connect to a US server")
|
|
179
|
+
print(" → Re-run this script")
|
|
180
|
+
print("")
|
|
181
|
+
print(" OPTION 2: Proxy (best for automation)")
|
|
182
|
+
print(f" → Create {PROXY_CONFIG} with your proxy:")
|
|
183
|
+
print(' {')
|
|
184
|
+
print(' "server": "socks5://username:password@proxy-host:port"')
|
|
185
|
+
print(' }')
|
|
186
|
+
print(" → Residential proxies work best (BrightData, SmartProxy, Oxylabs)")
|
|
187
|
+
print(" → Datacenter proxies may also get flagged")
|
|
188
|
+
print(" → Free proxies: DON'T — they're slow, unreliable, and often already flagged")
|
|
189
|
+
print("")
|
|
190
|
+
print(" OPTION 3: Mobile hotspot (free, works immediately)")
|
|
191
|
+
print(" → Disconnect WiFi")
|
|
192
|
+
print(" → Connect to your phone's hotspot (mobile IPs are almost never blocked)")
|
|
193
|
+
print(" → Re-run this script")
|
|
194
|
+
print(" → Once logged in and cookies are saved, switch back to WiFi")
|
|
195
|
+
print(" → The saved cookies usually survive the IP change")
|
|
196
|
+
print("")
|
|
197
|
+
print(" OPTION 4: Wait it out")
|
|
198
|
+
print(" → Etsy IP blocks are usually temporary (4-24 hours)")
|
|
199
|
+
print(" → Try again later without changing anything")
|
|
200
|
+
print("")
|
|
201
|
+
print(" OPTION 5: Tor (last resort)")
|
|
202
|
+
print(" → brew install tor && tor (starts on port 9050)")
|
|
203
|
+
print(f' → Add to {PROXY_CONFIG}: {{"server": "socks5://127.0.0.1:9050"}}')
|
|
204
|
+
print(" → Warning: Etsy may block known Tor exit nodes")
|
|
205
|
+
print("")
|
|
206
|
+
print("After fixing your IP, re-run this script.")
|
|
207
|
+
print("!" * 70)
|
|
208
|
+
notify(f"⚠️ {platform.title()} blocked this IP. Use VPN, mobile hotspot, or proxy to fix. See terminal for details.")
|
|
209
|
+
|
|
210
|
+
def safe_goto(page, url, platform, **kwargs):
|
|
211
|
+
"""
|
|
212
|
+
Navigate to a URL and check for IP blocks.
|
|
213
|
+
Returns True if page loaded normally, False if blocked.
|
|
214
|
+
"""
|
|
215
|
+
kwargs.setdefault("wait_until", "domcontentloaded")
|
|
216
|
+
kwargs.setdefault("timeout", 30000)
|
|
217
|
+
try:
|
|
218
|
+
page.goto(url, **kwargs)
|
|
219
|
+
human_delay(2, 4)
|
|
220
|
+
except Exception as e:
|
|
221
|
+
print(f"Navigation error: {e}")
|
|
222
|
+
# Still check if we landed on a block page
|
|
223
|
+
pass
|
|
224
|
+
|
|
225
|
+
blocked, reason = is_ip_blocked(page)
|
|
226
|
+
if blocked:
|
|
227
|
+
print(f"\\n❌ BLOCKED — detected: '{reason}'")
|
|
228
|
+
handle_ip_block(page, platform)
|
|
229
|
+
return False
|
|
230
|
+
return True
|
|
231
|
+
\`\`\`
|
|
232
|
+
|
|
233
|
+
**CRITICAL: Use \`safe_goto()\` for ALL page navigations instead of raw \`page.goto()\`.**
|
|
234
|
+
Every navigation must be checked for IP blocks. If \`safe_goto()\` returns False, the script must
|
|
235
|
+
STOP and NOT continue with any further automation. The user needs to fix their IP first.
|
|
236
|
+
|
|
237
|
+
**Proxy setup for automation (write this to \`~/thaddeus-businesses/<name>/scripts/setup-proxy.py\`):**
|
|
238
|
+
\`\`\`python
|
|
239
|
+
#!/usr/bin/env python3
|
|
240
|
+
"""
|
|
241
|
+
Quick proxy configurator for Thaddeus marketplace automation.
|
|
242
|
+
Run: python3 setup-proxy.py <platform> <proxy-url>
|
|
243
|
+
Example: python3 setup-proxy.py etsy socks5://user:pass@host:1080
|
|
244
|
+
"""
|
|
245
|
+
import sys, os, json
|
|
246
|
+
|
|
247
|
+
if len(sys.argv) < 3:
|
|
248
|
+
print("Usage: python3 setup-proxy.py <platform> <proxy-url>")
|
|
249
|
+
print(" platform: etsy, fiverr")
|
|
250
|
+
print(" proxy-url: socks5://user:pass@host:port or http://user:pass@host:port")
|
|
251
|
+
print("\\nFor rotating proxies (multiple IPs):")
|
|
252
|
+
print(" python3 setup-proxy.py <platform> url1 url2 url3 ...")
|
|
253
|
+
sys.exit(1)
|
|
254
|
+
|
|
255
|
+
platform = sys.argv[1]
|
|
256
|
+
session_dir = os.path.expanduser(f"~/.thaddeus-{platform}-session")
|
|
257
|
+
os.makedirs(session_dir, exist_ok=True)
|
|
258
|
+
proxy_path = os.path.join(session_dir, "proxy.json")
|
|
259
|
+
|
|
260
|
+
if len(sys.argv) == 3:
|
|
261
|
+
config = {"server": sys.argv[2]}
|
|
262
|
+
else:
|
|
263
|
+
config = {"servers": sys.argv[2:]}
|
|
264
|
+
|
|
265
|
+
with open(proxy_path, "w") as f:
|
|
266
|
+
json.dump(config, f, indent=2)
|
|
267
|
+
print(f"✅ Proxy configured: {proxy_path}")
|
|
268
|
+
print(f" Config: {json.dumps(config, indent=2)}")
|
|
269
|
+
print(f"\\nAll {platform} automation will now route through this proxy.")
|
|
270
|
+
print("Re-run the login script to test.")
|
|
271
|
+
\`\`\`
|
|
272
|
+
|
|
273
|
+
### First-Time Account Setup & Login Flow
|
|
274
|
+
|
|
275
|
+
This is the MOST IMPORTANT part. The user may or may not have an account already.
|
|
276
|
+
Thaddeus opens the browser, detects the state, and guides accordingly.
|
|
277
|
+
|
|
278
|
+
\`\`\`python
|
|
279
|
+
import subprocess
|
|
280
|
+
|
|
281
|
+
PLATFORM_URLS = {
|
|
282
|
+
"etsy": {
|
|
283
|
+
"home": "https://www.etsy.com",
|
|
284
|
+
"signup": "https://www.etsy.com/join",
|
|
285
|
+
"sell_signup": "https://www.etsy.com/sell",
|
|
286
|
+
"login": "https://www.etsy.com/signin",
|
|
287
|
+
"dashboard": "https://www.etsy.com/your/shops/me/dashboard",
|
|
288
|
+
"logged_in_selector": '[aria-label="Your account"]', # avatar/account icon
|
|
289
|
+
},
|
|
290
|
+
"fiverr": {
|
|
291
|
+
"home": "https://www.fiverr.com",
|
|
292
|
+
"signup": "https://www.fiverr.com/join",
|
|
293
|
+
"sell_signup": "https://www.fiverr.com/start_selling",
|
|
294
|
+
"login": "https://www.fiverr.com/login",
|
|
295
|
+
"dashboard": "https://www.fiverr.com/seller_dashboard",
|
|
296
|
+
"logged_in_selector": '.user-profile-label, .avatar-wrapper, [data-testid="header-avatar"]',
|
|
297
|
+
},
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
def setup_account(platform):
|
|
301
|
+
"""
|
|
302
|
+
Opens the platform in a visible browser.
|
|
303
|
+
Step 0: Check for IP blocks FIRST — if blocked, show fix options and exit.
|
|
304
|
+
Then detects if user is already logged in or needs to sign up / log in.
|
|
305
|
+
Guides user with macOS notifications + print statements.
|
|
306
|
+
Cookies auto-persist so this only needs to happen ONCE.
|
|
307
|
+
"""
|
|
308
|
+
urls = PLATFORM_URLS[platform]
|
|
309
|
+
|
|
310
|
+
with sync_playwright() as pw:
|
|
311
|
+
context = get_browser(pw, headless=False)
|
|
312
|
+
page = context.pages[0] if context.pages else context.new_page()
|
|
313
|
+
|
|
314
|
+
# ─── STEP 0: CHECK FOR IP BLOCK BEFORE ANYTHING ELSE ───
|
|
315
|
+
# Navigate to the homepage first (lightest page, least likely to trigger extra checks)
|
|
316
|
+
if not safe_goto(page, urls["home"], platform):
|
|
317
|
+
# IP is blocked. safe_goto already printed the fix instructions + screenshot.
|
|
318
|
+
# DO NOT continue. Close browser and exit.
|
|
319
|
+
print("\\n🛑 Cannot proceed — IP is blocked. Fix your IP and re-run this script.")
|
|
320
|
+
context.close()
|
|
321
|
+
return False
|
|
322
|
+
|
|
323
|
+
# ─── STEP 1: Test if we're already logged in ───
|
|
324
|
+
# Navigate to dashboard to check cookies
|
|
325
|
+
if not safe_goto(page, urls["dashboard"], platform):
|
|
326
|
+
context.close()
|
|
327
|
+
return False
|
|
328
|
+
time.sleep(3)
|
|
329
|
+
|
|
330
|
+
logged_in = False
|
|
331
|
+
try:
|
|
332
|
+
el = page.query_selector(urls["logged_in_selector"])
|
|
333
|
+
if el and el.is_visible():
|
|
334
|
+
logged_in = True
|
|
335
|
+
except:
|
|
336
|
+
pass
|
|
337
|
+
|
|
338
|
+
if logged_in:
|
|
339
|
+
# Already authenticated — cookies from a previous session still work
|
|
340
|
+
notify(f"✅ Already logged into {platform.title()}! Cookies are valid. Close this browser — Thaddeus takes over from here.")
|
|
341
|
+
print(f"Already logged into {platform.title()}. Session cookies are valid.")
|
|
342
|
+
print("Close the browser window when ready. Thaddeus will handle everything from here.")
|
|
343
|
+
else:
|
|
344
|
+
# ─── STEP 2: Not logged in — open signup/login page ───
|
|
345
|
+
if platform == "etsy":
|
|
346
|
+
if not safe_goto(page, urls["sell_signup"], platform):
|
|
347
|
+
context.close()
|
|
348
|
+
return False
|
|
349
|
+
notify("🛍️ Etsy is open! If you have an account, click 'Sign in' at the top. If not, click 'Get started' to create your shop. Close the browser when you're done.")
|
|
350
|
+
print("=" * 60)
|
|
351
|
+
print("ETSY SELLER SETUP")
|
|
352
|
+
print("=" * 60)
|
|
353
|
+
print("")
|
|
354
|
+
print("If you HAVE an Etsy account:")
|
|
355
|
+
print(" → Click 'Sign in' at the top right")
|
|
356
|
+
print(" → Log in with your email/password or Google")
|
|
357
|
+
print(" → If you don't have a shop yet, go through the shop setup wizard")
|
|
358
|
+
print("")
|
|
359
|
+
print("If you DON'T have an Etsy account:")
|
|
360
|
+
print(" → Click 'Get started' to create a new seller account")
|
|
361
|
+
print(" → Follow the shop setup wizard (shop name, listings, payment, billing)")
|
|
362
|
+
print(" → You'll need: shop name, a bank account for deposits, a credit card for fees")
|
|
363
|
+
print("")
|
|
364
|
+
print("When you're logged in and see your shop dashboard, CLOSE THIS BROWSER.")
|
|
365
|
+
print("Thaddeus will take over from there. Your session cookies are saved automatically.")
|
|
366
|
+
print("=" * 60)
|
|
367
|
+
|
|
368
|
+
elif platform == "fiverr":
|
|
369
|
+
if not safe_goto(page, urls["sell_signup"], platform):
|
|
370
|
+
context.close()
|
|
371
|
+
return False
|
|
372
|
+
notify("💼 Fiverr is open! If you have an account, click 'Sign In'. If not, click 'Join' to sign up. Close the browser when you're done.")
|
|
373
|
+
print("=" * 60)
|
|
374
|
+
print("FIVERR SELLER SETUP")
|
|
375
|
+
print("=" * 60)
|
|
376
|
+
print("")
|
|
377
|
+
print("If you HAVE a Fiverr account:")
|
|
378
|
+
print(" → Click 'Sign In' at the top right")
|
|
379
|
+
print(" → Log in with email/password, Google, or Apple")
|
|
380
|
+
print(" → Make sure you're set up as a SELLER (not just a buyer)")
|
|
381
|
+
print(" → Go to 'Become a Seller' if your account is buyer-only")
|
|
382
|
+
print("")
|
|
383
|
+
print("If you DON'T have a Fiverr account:")
|
|
384
|
+
print(" → Click 'Join' to create a new account")
|
|
385
|
+
print(" → After signup, click 'Become a Seller' to activate seller mode")
|
|
386
|
+
print(" → Fill in your profile: display name, description, skills, languages")
|
|
387
|
+
print("")
|
|
388
|
+
print("When you're logged in and see your seller dashboard, CLOSE THIS BROWSER.")
|
|
389
|
+
print("Thaddeus will take over from there. Your session cookies are saved automatically.")
|
|
390
|
+
print("=" * 60)
|
|
391
|
+
|
|
392
|
+
# Keep browser alive until user closes it
|
|
393
|
+
while context.pages:
|
|
394
|
+
try:
|
|
395
|
+
time.sleep(1)
|
|
396
|
+
except:
|
|
397
|
+
break
|
|
398
|
+
context.close()
|
|
399
|
+
|
|
400
|
+
# After browser closes, verify cookies actually saved by doing a headless check
|
|
401
|
+
print(f"\\nVerifying {platform.title()} session...")
|
|
402
|
+
return verify_session(platform)
|
|
403
|
+
|
|
404
|
+
def verify_session(platform):
|
|
405
|
+
"""Headless check that saved cookies actually work. Also checks for IP blocks."""
|
|
406
|
+
urls = PLATFORM_URLS[platform]
|
|
407
|
+
with sync_playwright() as pw:
|
|
408
|
+
context = get_browser(pw, headless=True)
|
|
409
|
+
page = context.new_page()
|
|
410
|
+
try:
|
|
411
|
+
if not safe_goto(page, urls["dashboard"], platform):
|
|
412
|
+
print(f"❌ IP still blocked during verification. Fix IP and retry.")
|
|
413
|
+
context.close()
|
|
414
|
+
return False
|
|
415
|
+
time.sleep(2)
|
|
416
|
+
el = page.query_selector(urls["logged_in_selector"])
|
|
417
|
+
if el:
|
|
418
|
+
print(f"✅ {platform.title()} session verified! Cookies are locked in. Thaddeus is autonomous now.")
|
|
419
|
+
context.close()
|
|
420
|
+
return True
|
|
421
|
+
else:
|
|
422
|
+
print(f"❌ {platform.title()} session NOT detected. Cookies may not have saved.")
|
|
423
|
+
print("Run the login script again: python3 <script>-login.py")
|
|
424
|
+
context.close()
|
|
425
|
+
return False
|
|
426
|
+
except Exception as e:
|
|
427
|
+
print(f"❌ Verification failed: {e}")
|
|
428
|
+
context.close()
|
|
429
|
+
return False
|
|
430
|
+
|
|
431
|
+
def notify(message):
|
|
432
|
+
"""macOS notification so user sees the instruction even if terminal is in background."""
|
|
433
|
+
try:
|
|
434
|
+
subprocess.run([
|
|
435
|
+
"osascript", "-e",
|
|
436
|
+
f'display notification "{message}" with title "Thaddeus Business Setup"'
|
|
437
|
+
], capture_output=True, timeout=5)
|
|
438
|
+
except:
|
|
439
|
+
pass # Non-critical
|
|
440
|
+
\`\`\`
|
|
441
|
+
|
|
442
|
+
**Flow summary:**
|
|
443
|
+
1. Thaddeus opens the platform in a VISIBLE browser window (non-headless)
|
|
444
|
+
2. Checks if cookies from a previous session are still valid → if yes, tells user "you're good, close the browser"
|
|
445
|
+
3. If NOT logged in → navigates to the seller signup/login page
|
|
446
|
+
4. Sends a macOS notification so the user sees the instructions even if they're not watching the terminal
|
|
447
|
+
5. Prints clear instructions: "have account? sign in. no account? sign up here."
|
|
448
|
+
6. Waits for user to close the browser (cookies auto-persist in the profile directory)
|
|
449
|
+
7. Runs a HEADLESS verification to confirm cookies actually saved
|
|
450
|
+
8. If verification fails → tells user to run login script again
|
|
451
|
+
9. If verification passes → Thaddeus is fully autonomous from this point on
|
|
452
|
+
|
|
453
|
+
After the user closes the browser, the session cookies persist in \`PROFILE_DIR\`.
|
|
454
|
+
ALL future runs use \`headless=True\` — fully autonomous, no user interaction needed.
|
|
455
|
+
If cookies ever expire, the daily cron detects it (dashboard redirect to login page) and notifies the user to re-auth.
|
|
456
|
+
|
|
457
|
+
### CRITICAL: Anti-Detection Clicking Rules
|
|
458
|
+
Etsy and Fiverr WILL lock accounts if they detect bot behavior. Follow these rules:
|
|
459
|
+
|
|
460
|
+
**Timing Rules:**
|
|
461
|
+
- NEVER click faster than 800ms between actions
|
|
462
|
+
- After page navigation: wait 2-4 seconds before first click
|
|
463
|
+
- After form submission: wait 3-5 seconds
|
|
464
|
+
- Between filling form fields: wait 0.3-0.8 seconds
|
|
465
|
+
- Typing speed: use \`page.keyboard.type(text, delay=50)\` (50ms between keys — human speed)
|
|
466
|
+
- Random jitter: add \`time.sleep(random.uniform(0.5, 1.5))\` between actions
|
|
467
|
+
|
|
468
|
+
**Click Rules:**
|
|
469
|
+
- ALWAYS use \`element.click()\` on the actual element, not coordinates
|
|
470
|
+
- For dropdowns: click to open, \`time.sleep(0.5)\`, then click option
|
|
471
|
+
- NEVER click the same element twice rapidly
|
|
472
|
+
- If a modal/popup appears, dismiss it with \`time.sleep(1)\` then click the X
|
|
473
|
+
- Use \`page.wait_for_load_state("networkidle")\` after navigations, NOT fixed sleeps alone
|
|
474
|
+
|
|
475
|
+
**Navigation Rules:**
|
|
476
|
+
- NEVER go faster than 1 page per 3 seconds
|
|
477
|
+
- Don't hit the same endpoint more than 10 times in a minute
|
|
478
|
+
- Use \`page.wait_for_selector()\` instead of blind sleeps where possible
|
|
479
|
+
- If you get a CAPTCHA or "verify you're human" page: STOP, save a screenshot, notify the user
|
|
480
|
+
|
|
481
|
+
**Stealth Pattern:**
|
|
482
|
+
\`\`\`python
|
|
483
|
+
import random
|
|
484
|
+
|
|
485
|
+
def human_delay(min_s=0.5, max_s=1.5):
|
|
486
|
+
time.sleep(random.uniform(min_s, max_s))
|
|
487
|
+
|
|
488
|
+
def human_click(page, selector):
|
|
489
|
+
el = page.wait_for_selector(selector, timeout=10000)
|
|
490
|
+
human_delay(0.3, 0.8)
|
|
491
|
+
el.scroll_into_view_if_needed()
|
|
492
|
+
human_delay(0.2, 0.5)
|
|
493
|
+
el.click()
|
|
494
|
+
human_delay(0.8, 2.0)
|
|
495
|
+
|
|
496
|
+
def human_type(page, selector, text):
|
|
497
|
+
el = page.wait_for_selector(selector, timeout=10000)
|
|
498
|
+
el.click()
|
|
499
|
+
human_delay(0.3, 0.5)
|
|
500
|
+
page.keyboard.type(text, delay=random.randint(30, 80))
|
|
501
|
+
human_delay(0.3, 0.8)
|
|
502
|
+
\`\`\`
|
|
503
|
+
|
|
504
|
+
---
|
|
505
|
+
|
|
506
|
+
## STEP 1: Present these 5 options (use EXACTLY this list)
|
|
507
|
+
|
|
508
|
+
**🚀 /start-business — Pick Your Autonomous Business**
|
|
509
|
+
|
|
510
|
+
**1. Etsy Digital Products Shop**
|
|
511
|
+
Revenue model: Sell digital downloads (printables, planners, wall art, SVGs, budget templates) on Etsy — $3-15/download.
|
|
512
|
+
What Thaddeus does:
|
|
513
|
+
- First run: Opens Etsy in a visible browser. If user has an account → sign in. If not → opens the signup page, sends a macOS notification "Please sign up for an Etsy seller account", walks them through it. User closes browser when done. Cookies saved to \`~/.thaddeus-etsy-session/\`. This only happens ONCE.
|
|
514
|
+
- After login: Thaddeus verifies cookies work with a headless check. From this point on, everything is autonomous.
|
|
515
|
+
- Generates digital products using code (SVG wall art, PDF planners, budget spreadsheets, wedding templates)
|
|
516
|
+
- Logs into Etsy headlessly using saved cookies, navigates to listing manager
|
|
517
|
+
- Creates new listings via Playwright: uploads files, fills title/description/tags/price, selects category, publishes
|
|
518
|
+
- Daily cron: generates 2-3 new products + uploads them, checks shop stats, adjusts tags for SEO
|
|
519
|
+
- Monitors orders, downloads buyer messages, sends thank-you messages
|
|
520
|
+
- If cookies ever expire: detects it on the next headless run, notifies user to re-auth (one-time browser open)
|
|
521
|
+
Tools: Bash (Playwright for Etsy automation + file generation), FileWrite (product creation), WebSearch (trending niches), CronCreate
|
|
522
|
+
Session: \`~/.thaddeus-etsy-session/chrome-profile/\`
|
|
523
|
+
|
|
524
|
+
**2. Fiverr Freelance Service Operator**
|
|
525
|
+
Revenue model: Run Fiverr gigs — copywriting ($25-100/gig), SEO audits ($50-200/gig), code review ($50-150/gig), data entry ($15-50/gig).
|
|
526
|
+
What Thaddeus does:
|
|
527
|
+
- First run: Opens Fiverr in a visible browser. If user has an account → sign in. If not → opens the seller signup page, sends a macOS notification "Please sign up for a Fiverr seller account", walks them through it. User closes browser when done. Cookies saved to \`~/.thaddeus-fiverr-session/\`. This only happens ONCE.
|
|
528
|
+
- After login: Thaddeus verifies cookies work with a headless check. From this point on, everything is autonomous.
|
|
529
|
+
- Creates gig listings via Playwright: fills title, category, description, pricing tiers, uploads portfolio samples, publishes
|
|
530
|
+
- Daily cron: logs in headlessly, checks for new orders/messages in the dashboard
|
|
531
|
+
- When orders come in: reads requirements, EXECUTES THE DELIVERABLE (writes the copy, does the audit, reviews the code), uploads completed work via the order page
|
|
532
|
+
- Handles revision requests: reads feedback, adjusts, re-delivers
|
|
533
|
+
- Sends buyer request proposals to find more gigs
|
|
534
|
+
- If cookies ever expire: detects it, notifies user to re-auth
|
|
535
|
+
Tools: Bash (Playwright for Fiverr automation + deliverable execution), FileWrite (deliverables), WebSearch (research), CronCreate
|
|
536
|
+
Session: \`~/.thaddeus-fiverr-session/chrome-profile/\`
|
|
537
|
+
|
|
538
|
+
**3. AI Content Agency (Blog/SEO/Newsletter)**
|
|
539
|
+
Revenue model: Sell SEO blog posts, newsletters, and content packages to businesses at $50-200/article.
|
|
540
|
+
What Thaddeus does:
|
|
541
|
+
- Prospects potential clients via web search (finds businesses with bad/no blogs)
|
|
542
|
+
- Sends cold outreach emails with sample articles attached
|
|
543
|
+
- Writes finished content on demand, delivers via email
|
|
544
|
+
- Manages full client pipeline in \`~/thaddeus-businesses/content-agency/clients.json\`
|
|
545
|
+
- Daily prospecting cron + weekly delivery batches
|
|
546
|
+
Tools: WebSearch (prospecting), EmailSend (outreach + delivery), FileWrite (content), CronCreate, Bash
|
|
547
|
+
|
|
548
|
+
**4. Automated Lead Generation Service**
|
|
549
|
+
Revenue model: Sell qualified business leads to local contractors/realtors/agencies at $5-25/lead.
|
|
550
|
+
What Thaddeus does:
|
|
551
|
+
- Scrapes public business directories, Google Maps, social media for businesses needing services
|
|
552
|
+
- Enriches leads with contact info, packages into CSV/spreadsheets
|
|
553
|
+
- Sends daily lead reports to paying clients via email
|
|
554
|
+
- Prospects new lead-buying clients via cold outreach
|
|
555
|
+
- Daily scrape + delivery cron
|
|
556
|
+
Tools: WebSearch + WebFetch (lead scraping), Bash (data processing + Playwright for directory scraping), FileWrite (CSV/reports), EmailSend, CronCreate
|
|
557
|
+
|
|
558
|
+
**5. Technical Documentation & API Docs Service**
|
|
559
|
+
Revenue model: Write/fix technical docs, API docs, READMEs for open-source projects and startups at $100-500/project.
|
|
560
|
+
What Thaddeus does:
|
|
561
|
+
- Finds GitHub projects with poor/missing docs via web search
|
|
562
|
+
- Sends outreach to maintainers via email
|
|
563
|
+
- Clones repos, reads codebase, generates comprehensive documentation
|
|
564
|
+
- Delivers via email or GitHub PR (using Playwright to open PRs if needed)
|
|
565
|
+
- Weekly prospecting cycle
|
|
566
|
+
Tools: WebSearch + WebFetch (GitHub prospecting), Bash (git clone + code analysis + Playwright), FileWrite (docs), EmailSend, Agent, CronCreate
|
|
567
|
+
|
|
568
|
+
---
|
|
569
|
+
|
|
570
|
+
## STEP 2: After user picks a number (1-5)
|
|
571
|
+
|
|
572
|
+
Immediately execute these steps IN THIS EXACT ORDER — no asking, no confirming, just DO IT:
|
|
573
|
+
|
|
574
|
+
⚠️ CRITICAL EXECUTION ORDER: For Etsy/Fiverr businesses, the VERY FIRST THING you do is
|
|
575
|
+
open the browser for the user to log in or sign up. BEFORE writing any scripts. BEFORE
|
|
576
|
+
creating config files. BEFORE anything else. The user needs to authenticate FIRST because
|
|
577
|
+
nothing works without cookies. For Content Agency / Lead Gen / Tech Docs (no marketplace
|
|
578
|
+
login needed), skip straight to workspace creation.
|
|
579
|
+
|
|
580
|
+
### A. FIRST — Open browser for user to sign in or sign up (Etsy/Fiverr ONLY)
|
|
581
|
+
|
|
582
|
+
THIS IS STEP ONE. Do this BEFORE creating the workspace, BEFORE writing scripts, BEFORE everything.
|
|
583
|
+
|
|
584
|
+
Write a MINIMAL login script inline and run it immediately:
|
|
585
|
+
\`\`\`python
|
|
586
|
+
#!/usr/bin/env python3
|
|
587
|
+
# Minimal login script — get cookies FIRST, build everything else AFTER
|
|
588
|
+
import os, time, random, subprocess, json
|
|
589
|
+
from playwright.sync_api import sync_playwright
|
|
590
|
+
|
|
591
|
+
PLATFORM = "<etsy|fiverr>" # set based on user's choice
|
|
592
|
+
SESSION_DIR = os.path.expanduser(f"~/.thaddeus-{PLATFORM}-session")
|
|
593
|
+
PROFILE_DIR = os.path.join(SESSION_DIR, "chrome-profile")
|
|
594
|
+
PROXY_CONFIG = os.path.join(SESSION_DIR, "proxy.json")
|
|
595
|
+
os.makedirs(PROFILE_DIR, exist_ok=True)
|
|
596
|
+
|
|
597
|
+
# ... include get_browser(), load_proxy_config(), safe_goto(), is_ip_blocked(),
|
|
598
|
+
# handle_ip_block(), notify(), human_delay() from the Playwright Playbook above ...
|
|
599
|
+
|
|
600
|
+
URLS = {
|
|
601
|
+
"etsy": {
|
|
602
|
+
"home": "https://www.etsy.com",
|
|
603
|
+
"sell": "https://www.etsy.com/sell",
|
|
604
|
+
"dashboard": "https://www.etsy.com/your/shops/me/dashboard",
|
|
605
|
+
"logged_in": '[aria-label="Your account"], .user-avatar',
|
|
606
|
+
},
|
|
607
|
+
"fiverr": {
|
|
608
|
+
"home": "https://www.fiverr.com",
|
|
609
|
+
"sell": "https://www.fiverr.com/start_selling",
|
|
610
|
+
"dashboard": "https://www.fiverr.com/seller_dashboard",
|
|
611
|
+
"logged_in": '.user-profile-label, .avatar-wrapper, [data-testid="header-avatar"]',
|
|
612
|
+
},
|
|
613
|
+
}[PLATFORM]
|
|
614
|
+
|
|
615
|
+
with sync_playwright() as pw:
|
|
616
|
+
ctx = get_browser(pw, headless=False)
|
|
617
|
+
page = ctx.pages[0] if ctx.pages else ctx.new_page()
|
|
618
|
+
|
|
619
|
+
# CHECK FOR IP BLOCK FIRST
|
|
620
|
+
if not safe_goto(page, URLS["home"], PLATFORM):
|
|
621
|
+
print("🛑 IP blocked. Fix with VPN/hotspot/proxy and re-run.")
|
|
622
|
+
ctx.close()
|
|
623
|
+
exit(1)
|
|
624
|
+
|
|
625
|
+
# CHECK IF ALREADY LOGGED IN
|
|
626
|
+
safe_goto(page, URLS["dashboard"], PLATFORM)
|
|
627
|
+
time.sleep(3)
|
|
628
|
+
logged_in = False
|
|
629
|
+
try:
|
|
630
|
+
el = page.query_selector(URLS["logged_in"])
|
|
631
|
+
if el and el.is_visible(): logged_in = True
|
|
632
|
+
except: pass
|
|
633
|
+
|
|
634
|
+
if logged_in:
|
|
635
|
+
notify(f"✅ Already logged into {PLATFORM.title()}! Close browser when ready.")
|
|
636
|
+
print(f"✅ Already logged in. Cookies are valid. Close the browser.")
|
|
637
|
+
else:
|
|
638
|
+
# OPEN SIGNUP/LOGIN PAGE
|
|
639
|
+
safe_goto(page, URLS["sell"], PLATFORM)
|
|
640
|
+
notify(f"🛍️ {PLATFORM.title()} is open! Sign in or sign up. Close browser when done.")
|
|
641
|
+
print("=" * 60)
|
|
642
|
+
print(f"{PLATFORM.upper()} ACCOUNT SETUP")
|
|
643
|
+
print("=" * 60)
|
|
644
|
+
print("")
|
|
645
|
+
print("If you HAVE an account:")
|
|
646
|
+
print(" → Click 'Sign In' at the top")
|
|
647
|
+
print(" → Log in with your email/password or Google")
|
|
648
|
+
print("")
|
|
649
|
+
print("If you DON'T have an account:")
|
|
650
|
+
if PLATFORM == "etsy":
|
|
651
|
+
print(" → Click 'Get started' to create a seller account")
|
|
652
|
+
print(" → Follow the shop setup wizard (name, payment, billing)")
|
|
653
|
+
else:
|
|
654
|
+
print(" → Click 'Join' to sign up")
|
|
655
|
+
print(" → After signup, click 'Become a Seller'")
|
|
656
|
+
print("")
|
|
657
|
+
print("When done, CLOSE THIS BROWSER. Cookies save automatically.")
|
|
658
|
+
print("=" * 60)
|
|
659
|
+
|
|
660
|
+
# WAIT — POLL for login while browser is open
|
|
661
|
+
# Check every 5 seconds using MULTIPLE detection methods.
|
|
662
|
+
# Fiverr/Etsy show different elements on different pages, so we cast a wide net.
|
|
663
|
+
print("\\nWaiting for login... (will auto-detect when you're signed in)")
|
|
664
|
+
print("Or just close the browser when you're logged in — cookies save automatically.")
|
|
665
|
+
poll_count = 0
|
|
666
|
+
auto_closed = False
|
|
667
|
+
|
|
668
|
+
# Broad selectors that work across different pages on each platform
|
|
669
|
+
FIVERR_LOGGED_IN = [
|
|
670
|
+
'.user-profile-label',
|
|
671
|
+
'.avatar-wrapper',
|
|
672
|
+
'[data-testid="header-avatar"]',
|
|
673
|
+
'a[href*="/seller_dashboard"]',
|
|
674
|
+
'a[href*="/manage_orders"]',
|
|
675
|
+
'.seller-dashboard',
|
|
676
|
+
'img.profile-pict',
|
|
677
|
+
'button[data-testid="user-menu"]',
|
|
678
|
+
'.nav-logged-in',
|
|
679
|
+
'a[href="/users/"]',
|
|
680
|
+
# Check for any element containing the user's name/avatar in nav
|
|
681
|
+
'header img[src*="fiverr-res.cloudinary"]',
|
|
682
|
+
'.header-user-avatar',
|
|
683
|
+
]
|
|
684
|
+
ETSY_LOGGED_IN = [
|
|
685
|
+
'[aria-label="Your account"]',
|
|
686
|
+
'.user-avatar',
|
|
687
|
+
'[data-testid="header-account"]',
|
|
688
|
+
'a[href*="/your/shops"]',
|
|
689
|
+
'.shop-name-link',
|
|
690
|
+
'a[href*="/me/"]',
|
|
691
|
+
'img.user-avatar',
|
|
692
|
+
]
|
|
693
|
+
LOGGED_IN_CHECKS = FIVERR_LOGGED_IN if PLATFORM == "fiverr" else ETSY_LOGGED_IN
|
|
694
|
+
|
|
695
|
+
# URLs that indicate the user is logged in
|
|
696
|
+
LOGGED_IN_URLS = {
|
|
697
|
+
"fiverr": ["seller_dashboard", "manage_orders", "/users/", "/inbox", "/manage_gigs"],
|
|
698
|
+
"etsy": ["/your/shops", "/me/", "/dashboard", "/shop/"],
|
|
699
|
+
}[PLATFORM]
|
|
700
|
+
|
|
701
|
+
try:
|
|
702
|
+
while ctx.pages:
|
|
703
|
+
time.sleep(5)
|
|
704
|
+
poll_count += 1
|
|
705
|
+
try:
|
|
706
|
+
page = ctx.pages[0]
|
|
707
|
+
current_url = page.url
|
|
708
|
+
|
|
709
|
+
# Method 1: Check URL — if they navigated to a logged-in page
|
|
710
|
+
url_match = any(pattern in current_url for pattern in LOGGED_IN_URLS)
|
|
711
|
+
|
|
712
|
+
# Method 2: Check multiple selectors
|
|
713
|
+
selector_match = False
|
|
714
|
+
for selector in LOGGED_IN_CHECKS:
|
|
715
|
+
try:
|
|
716
|
+
el = page.query_selector(selector)
|
|
717
|
+
if el and el.is_visible(timeout=1000):
|
|
718
|
+
selector_match = True
|
|
719
|
+
break
|
|
720
|
+
except:
|
|
721
|
+
continue
|
|
722
|
+
|
|
723
|
+
# Method 3: Check if page has cookies set (check for session cookie via JS)
|
|
724
|
+
cookie_match = False
|
|
725
|
+
try:
|
|
726
|
+
cookies = page.context.cookies()
|
|
727
|
+
session_cookies = [c for c in cookies if 'session' in c.get('name', '').lower() or 'token' in c.get('name', '').lower() or 'logged' in c.get('name', '').lower()]
|
|
728
|
+
if session_cookies:
|
|
729
|
+
cookie_match = True
|
|
730
|
+
except:
|
|
731
|
+
pass
|
|
732
|
+
|
|
733
|
+
if url_match or selector_match or cookie_match:
|
|
734
|
+
method = "URL" if url_match else ("element" if selector_match else "cookie")
|
|
735
|
+
print(f"\\n✅ Login detected via {method}! Saving cookies and closing browser in 5s...")
|
|
736
|
+
notify("✅ Login detected! Browser closing in 5 seconds. Thaddeus takes over now.")
|
|
737
|
+
time.sleep(5)
|
|
738
|
+
ctx.close()
|
|
739
|
+
auto_closed = True
|
|
740
|
+
break
|
|
741
|
+
except:
|
|
742
|
+
pass
|
|
743
|
+
if poll_count % 6 == 0 and not auto_closed:
|
|
744
|
+
print(" Still waiting for login... (close browser manually if auto-detect doesn't trigger)")
|
|
745
|
+
except:
|
|
746
|
+
pass
|
|
747
|
+
if not auto_closed:
|
|
748
|
+
try: ctx.close()
|
|
749
|
+
except: pass
|
|
750
|
+
|
|
751
|
+
# VERIFY COOKIES HEADLESS
|
|
752
|
+
print(f"\\nVerifying {PLATFORM} session...")
|
|
753
|
+
with sync_playwright() as pw:
|
|
754
|
+
ctx = get_browser(pw, headless=True)
|
|
755
|
+
page = ctx.new_page()
|
|
756
|
+
ok = False
|
|
757
|
+
try:
|
|
758
|
+
if safe_goto(page, URLS["dashboard"], PLATFORM):
|
|
759
|
+
time.sleep(2)
|
|
760
|
+
el = page.query_selector(URLS["logged_in"])
|
|
761
|
+
if el: ok = True
|
|
762
|
+
except: pass
|
|
763
|
+
ctx.close()
|
|
764
|
+
|
|
765
|
+
if ok:
|
|
766
|
+
print(f"✅ {PLATFORM.title()} session VERIFIED. Cookies locked in.")
|
|
767
|
+
print("Thaddeus is now autonomous. Building everything else...")
|
|
768
|
+
else:
|
|
769
|
+
print(f"❌ Session NOT verified. Re-run this script after signing in.")
|
|
770
|
+
exit(1)
|
|
771
|
+
\`\`\`
|
|
772
|
+
|
|
773
|
+
Write this script to \`~/thaddeus-businesses/<name>/scripts/<platform>-login.py\` and RUN IT IMMEDIATELY.
|
|
774
|
+
Wait for it to complete. If it exits with code 1 (blocked or not verified), STOP and tell the user what to fix.
|
|
775
|
+
DO NOT CONTINUE to step B until this script exits successfully (code 0).
|
|
776
|
+
|
|
777
|
+
### B. Create the business workspace (AFTER cookies are confirmed)
|
|
778
|
+
\`\`\`bash
|
|
779
|
+
mkdir -p ~/thaddeus-businesses/<business-name>/{products,deliverables,outreach,reports,weekly-reports,scripts}
|
|
780
|
+
\`\`\`
|
|
781
|
+
- Create \`config.json\` with business parameters, pricing, schedule, session paths
|
|
782
|
+
- Create \`README.md\` with the full execution plan
|
|
783
|
+
- Create \`revenue-log.json\` to track all income
|
|
784
|
+
|
|
785
|
+
### C. Write the remaining Playwright automation scripts
|
|
786
|
+
The login script already exists from Step A. Now write the REST of the scripts to \`~/thaddeus-businesses/<name>/scripts/\`:
|
|
787
|
+
|
|
788
|
+
**For Etsy (login.py already written):**
|
|
789
|
+
- \`etsy-setup-profile.py\` — Headless. Sets up full shop profile: logo, banner, title, announcement, about, sections, policies. Generates images with PIL. Screenshots finished profile.
|
|
790
|
+
- \`etsy-upload-product.py\` — Headless. Takes product file path + listing details as args. Navigates to listing manager, creates listing, uploads digital file, fills all fields, publishes.
|
|
791
|
+
- \`etsy-check-orders.py\` — Headless. Checks orders page, scrapes new orders, saves to \`orders.json\`.
|
|
792
|
+
- \`etsy-check-stats.py\` — Headless. Checks shop stats dashboard, saves metrics.
|
|
793
|
+
|
|
794
|
+
**For Fiverr (login.py already written):**
|
|
795
|
+
- \`fiverr-setup-profile.py\` — Headless. Sets up full seller profile: avatar, display name, tagline, bio, skills, languages, availability. Generates profile pic with PIL. Screenshots finished profile.
|
|
796
|
+
- \`fiverr-create-gig.py\` — Headless. Takes gig details as args. Creates new gig with all fields + portfolio.
|
|
797
|
+
- \`fiverr-check-orders.py\` — Headless. Checks active orders, scrapes requirements for pending orders.
|
|
798
|
+
- \`fiverr-deliver-order.py\` — Headless. Takes order ID + deliverable file. Navigates to order, uploads deliverable, submits.
|
|
799
|
+
- \`fiverr-send-proposals.py\` — Headless. Checks buyer requests, sends proposals with custom pitches.
|
|
800
|
+
|
|
801
|
+
ALL platform-facing scripts MUST:
|
|
802
|
+
1. Import playwright and use sync_playwright
|
|
803
|
+
2. Call get_browser() to get a persistent context with saved cookies
|
|
804
|
+
3. Use safe_goto() for every page navigation
|
|
805
|
+
4. Use human_click() and human_type() for all interactions
|
|
806
|
+
5. Actually navigate to the real website and perform the real action
|
|
807
|
+
6. Verify the action succeeded (check for confirmation elements on page)
|
|
808
|
+
7. Screenshot the result for proof
|
|
809
|
+
8. Use a results={} dict to track every action's success/failure
|
|
810
|
+
9. Print a FINAL HONEST REPORT showing what succeeded vs failed
|
|
811
|
+
10. exit(1) if ANY actions failed, exit(0) ONLY if ALL actions succeeded
|
|
812
|
+
|
|
813
|
+
⛔ BANNED SCRIPT PATTERNS (these produce fake scripts):
|
|
814
|
+
- \`try: ... except: pass\` around critical actions → BANNED. Catch specific exceptions, log them, mark as failed.
|
|
815
|
+
- \`print("✅ done")\` without verifying the action worked → BANNED. Verify before reporting.
|
|
816
|
+
- A script with ZERO exit(1) calls → BANNED. Real scripts can fail.
|
|
817
|
+
- A script that prints success messages in the except block → BANNED. That's lying.
|
|
818
|
+
- A \`try/except\` that catches the error and then prints "Profile fields updated" → BANNED.
|
|
819
|
+
|
|
820
|
+
✅ REQUIRED SCRIPT PATTERN:
|
|
821
|
+
\`\`\`python
|
|
822
|
+
results = {}
|
|
823
|
+
# ... do each action ...
|
|
824
|
+
results["action_name"] = True/False based on VERIFICATION
|
|
825
|
+
# ... at end ...
|
|
826
|
+
failed = [k for k,v in results.items() if not v]
|
|
827
|
+
if failed:
|
|
828
|
+
print(f"❌ FAILED: {failed}")
|
|
829
|
+
exit(1)
|
|
830
|
+
print("✅ All actions succeeded")
|
|
831
|
+
exit(0)
|
|
832
|
+
\`\`\`
|
|
833
|
+
|
|
834
|
+
A script that just writes local files and prints "success" without opening a browser is FAKE and USELESS.
|
|
835
|
+
If Playwright can't connect (IP blocked, cookies expired), the script must exit with code 1 and report the real error.
|
|
836
|
+
|
|
837
|
+
### D. Set up the seller profile (Thaddeus does this via Playwright — NOT the user)
|
|
838
|
+
|
|
839
|
+
After cookies are verified, Thaddeus MUST set up the seller profile before creating any products/gigs.
|
|
840
|
+
A bare profile = zero sales. This runs HEADLESS via Playwright using the saved cookies.
|
|
841
|
+
|
|
842
|
+
⚠️ CRITICAL: Thaddeus fills in the profile HIMSELF using Playwright automation.
|
|
843
|
+
DO NOT open a visible browser and tell the user to do it manually.
|
|
844
|
+
DO NOT say "complete the profile in the browser" — that is YOUR job.
|
|
845
|
+
The ONLY thing the user does manually is the initial login/signup (Step A).
|
|
846
|
+
EVERYTHING after that — profile, gigs, orders, messages — is Thaddeus via headless Playwright.
|
|
847
|
+
|
|
848
|
+
If you cannot fill a field via Playwright (e.g., element not found, page structure changed),
|
|
849
|
+
take a screenshot, report which specific field failed, and try an alternative selector.
|
|
850
|
+
Do NOT give up and ask the user to do it.
|
|
851
|
+
|
|
852
|
+
Ask the user ONE question before starting: "What name do you want on your shop, and what's your niche? (e.g., 'Luna Prints — minimalist wall art' or 'DevDocs Pro — technical writing'). Or type 'auto' and I'll pick something based on what sells."
|
|
853
|
+
|
|
854
|
+
Then write and run a \`<platform>-setup-profile.py\` script that does the following:
|
|
855
|
+
|
|
856
|
+
**For Etsy (\`etsy-setup-profile.py\`):**
|
|
857
|
+
|
|
858
|
+
⚠️ ETSY SHOP NAVIGATION — EXACT URLS:
|
|
859
|
+
\`\`\`python
|
|
860
|
+
# These are the REAL Etsy shop settings URLs:
|
|
861
|
+
ETSY_SETTINGS_URLS = {
|
|
862
|
+
"info_appearance": "https://www.etsy.com/your/shops/me/settings/info",
|
|
863
|
+
"about": "https://www.etsy.com/your/shops/me/settings/about",
|
|
864
|
+
"policies": "https://www.etsy.com/your/shops/me/settings/policies",
|
|
865
|
+
"delivery": "https://www.etsy.com/your/shops/me/settings/delivery",
|
|
866
|
+
"finances": "https://www.etsy.com/your/shops/me/finances/account",
|
|
867
|
+
"listings": "https://www.etsy.com/your/shops/me/tools/listings",
|
|
868
|
+
"sections": "https://www.etsy.com/your/shops/me/sections",
|
|
869
|
+
"dashboard": "https://www.etsy.com/your/shops/me/dashboard",
|
|
870
|
+
}
|
|
871
|
+
# Navigate DIRECTLY to these URLs — do NOT click through menus.
|
|
872
|
+
# If a URL redirects to login → cookies expired, exit(1).
|
|
873
|
+
# If a URL 404s → try the dashboard and click through.
|
|
874
|
+
\`\`\`
|
|
875
|
+
|
|
876
|
+
Use the same \`discover_and_fill()\` and results-tracking pattern as the Fiverr script.
|
|
877
|
+
Every field must be verified. Script must exit(1) if any fields fail.
|
|
878
|
+
|
|
879
|
+
Thaddeus logs in headless, navigates to Shop Manager settings using the DIRECT URLs above, and fills out:
|
|
880
|
+
\`\`\`
|
|
881
|
+
1. Shop icon / logo
|
|
882
|
+
- Generate a clean logo using canvas/PIL (text-based, modern font, brand colors)
|
|
883
|
+
- Save to ~/thaddeus-businesses/etsy-shop/products/shop-logo.png
|
|
884
|
+
- Navigate to: ETSY_SETTINGS_URLS["info_appearance"]
|
|
885
|
+
- Find upload input: query_selector('input[type="file"]') near shop icon section
|
|
886
|
+
- set_input_files() to upload, then click Save
|
|
887
|
+
|
|
888
|
+
2. Shop banner
|
|
889
|
+
- Generate a 1200x300 banner image with shop name + tagline using PIL
|
|
890
|
+
- Save to ~/thaddeus-businesses/etsy-shop/products/shop-banner.png
|
|
891
|
+
- Same page as shop icon — find the banner upload input
|
|
892
|
+
|
|
893
|
+
3. Shop title & announcement
|
|
894
|
+
- Same page: ETSY_SETTINGS_URLS["info_appearance"]
|
|
895
|
+
- discover_and_fill() for "Shop title" field
|
|
896
|
+
- discover_and_fill() for "Shop announcement" textarea
|
|
897
|
+
e.g., "Welcome to Luna Prints! Instant download printables for your home — minimalist wall art, planners, and budget templates. New designs added daily."
|
|
898
|
+
|
|
899
|
+
4. About section
|
|
900
|
+
- Navigate to: ETSY_SETTINGS_URLS["about"]
|
|
901
|
+
- Fill "Shop story" with a genuine-sounding seller bio (3-4 paragraphs)
|
|
902
|
+
- Include: who you are, what you make, why you're passionate about it
|
|
903
|
+
|
|
904
|
+
5. Shop sections (categories)
|
|
905
|
+
- Navigate to: ETSY_SETTINGS_URLS["sections"]
|
|
906
|
+
- Create 4-6 sections based on the niche, e.g.:
|
|
907
|
+
"Wall Art" / "Planners & Organizers" / "Budget Templates" / "Wedding Printables" / "Kids Room" / "Quotes & Typography"
|
|
908
|
+
|
|
909
|
+
6. Payment & billing (CHECK ONLY — don't change if already set)
|
|
910
|
+
- Navigate to: ETSY_SETTINGS_URLS["finances"]
|
|
911
|
+
- If not set up: STOP, notify user "Payment info needed — open browser to set up bank/card"
|
|
912
|
+
- If set up: confirm and move on
|
|
913
|
+
|
|
914
|
+
7. Shipping profile (for digital products)
|
|
915
|
+
- Navigate to: ETSY_SETTINGS_URLS["delivery"]
|
|
916
|
+
- Ensure "Digital items" delivery profile exists (Etsy auto-creates this for digital shops)
|
|
917
|
+
|
|
918
|
+
8. Shop policies
|
|
919
|
+
- Navigate to: ETSY_SETTINGS_URLS["policies"]
|
|
920
|
+
- Fill returns policy: "Due to the digital nature of our products, all sales are final. If you have any issues with your download, please contact us and we'll make it right."
|
|
921
|
+
- Fill privacy policy with standard boilerplate
|
|
922
|
+
- Fill FAQ with 3-4 common questions about digital downloads
|
|
923
|
+
\`\`\`
|
|
924
|
+
|
|
925
|
+
**For Fiverr (\`fiverr-setup-profile.py\`):**
|
|
926
|
+
|
|
927
|
+
⚠️ FIVERR PROFILE NAVIGATION — EXACT URLS & STRATEGY:
|
|
928
|
+
Fiverr profile editing is NOT accessible via vague "text=Profile" selectors.
|
|
929
|
+
You MUST use URL-based navigation. Here is the correct approach:
|
|
930
|
+
|
|
931
|
+
**Step 0: Discover the username first**
|
|
932
|
+
\`\`\`python
|
|
933
|
+
# After headless login, get the username from the dashboard
|
|
934
|
+
page.goto("https://www.fiverr.com/seller_dashboard")
|
|
935
|
+
time.sleep(3)
|
|
936
|
+
# Method 1: Check the URL bar after any redirect
|
|
937
|
+
# Method 2: Look for the username in page content
|
|
938
|
+
username = None
|
|
939
|
+
# Try the user menu / profile link
|
|
940
|
+
for sel in ['a[href*="/users/"]', 'a.user-profile-label', '.seller-name', '.username']:
|
|
941
|
+
try:
|
|
942
|
+
el = page.query_selector(sel)
|
|
943
|
+
if el:
|
|
944
|
+
href = el.get_attribute('href') or ''
|
|
945
|
+
if '/users/' in href:
|
|
946
|
+
username = href.split('/users/')[-1].split('/')[0].split('?')[0]
|
|
947
|
+
break
|
|
948
|
+
text = el.inner_text().strip()
|
|
949
|
+
if text:
|
|
950
|
+
username = text
|
|
951
|
+
break
|
|
952
|
+
except: continue
|
|
953
|
+
# Method 3: Extract from page source
|
|
954
|
+
if not username:
|
|
955
|
+
try:
|
|
956
|
+
html = page.content()
|
|
957
|
+
import re
|
|
958
|
+
m = re.search(r'"username":"([^"]+)"', html)
|
|
959
|
+
if m: username = m.group(1)
|
|
960
|
+
except: pass
|
|
961
|
+
if not username:
|
|
962
|
+
print("❌ FAILED: Could not determine Fiverr username. Cannot navigate to profile edit.")
|
|
963
|
+
page.screenshot(path=os.path.join(BUSINESS_DIR, "username-discovery-failed.png"))
|
|
964
|
+
exit(1)
|
|
965
|
+
print(f"Found username: {username}")
|
|
966
|
+
\`\`\`
|
|
967
|
+
|
|
968
|
+
**Step 1: Navigate directly to profile edit URLs**
|
|
969
|
+
\`\`\`python
|
|
970
|
+
# These are the REAL Fiverr profile edit URLs (try in order):
|
|
971
|
+
PROFILE_URLS = [
|
|
972
|
+
f"https://www.fiverr.com/users/{username}/manage_profile",
|
|
973
|
+
f"https://www.fiverr.com/users/{username}/edit",
|
|
974
|
+
"https://www.fiverr.com/seller_onboarding/overview",
|
|
975
|
+
"https://www.fiverr.com/settings/profile",
|
|
976
|
+
"https://www.fiverr.com/seller_dashboard/profile",
|
|
977
|
+
]
|
|
978
|
+
profile_page_loaded = False
|
|
979
|
+
for url in PROFILE_URLS:
|
|
980
|
+
if not safe_goto(page, url, "fiverr"):
|
|
981
|
+
continue
|
|
982
|
+
# Check if we landed on a real profile edit page (not redirected to login or 404)
|
|
983
|
+
current = page.url
|
|
984
|
+
body = page.inner_text("body")[:500].lower()
|
|
985
|
+
if "404" in body or "not found" in body or "signin" in current or "login" in current:
|
|
986
|
+
continue
|
|
987
|
+
profile_page_loaded = True
|
|
988
|
+
print(f"✅ Profile edit page loaded: {url}")
|
|
989
|
+
break
|
|
990
|
+
if not profile_page_loaded:
|
|
991
|
+
# Last resort: click through from dashboard
|
|
992
|
+
safe_goto(page, "https://www.fiverr.com/seller_dashboard", "fiverr")
|
|
993
|
+
time.sleep(2)
|
|
994
|
+
# Look for profile/settings links
|
|
995
|
+
for click_sel in ['a[href*="profile"]', 'a[href*="manage_profile"]', 'text=Profile', 'text=Edit Profile', '[data-testid*="profile"]']:
|
|
996
|
+
try:
|
|
997
|
+
el = page.query_selector(click_sel)
|
|
998
|
+
if el and el.is_visible():
|
|
999
|
+
el.click()
|
|
1000
|
+
time.sleep(3)
|
|
1001
|
+
print(f"Navigated via click: {click_sel} → {page.url}")
|
|
1002
|
+
profile_page_loaded = True
|
|
1003
|
+
break
|
|
1004
|
+
except: continue
|
|
1005
|
+
if not profile_page_loaded:
|
|
1006
|
+
print("❌ FAILED: Could not reach Fiverr profile edit page via any method.")
|
|
1007
|
+
page.screenshot(path=os.path.join(BUSINESS_DIR, "profile-nav-failed.png"))
|
|
1008
|
+
exit(1)
|
|
1009
|
+
\`\`\`
|
|
1010
|
+
|
|
1011
|
+
**Step 2: Fill fields using SELECTOR DISCOVERY**
|
|
1012
|
+
Do NOT hardcode selectors. Instead, discover what's on the page:
|
|
1013
|
+
\`\`\`python
|
|
1014
|
+
def discover_and_fill(page, field_name, value, selectors_to_try):
|
|
1015
|
+
"""Try multiple selectors to find and fill a field. Returns True if successful."""
|
|
1016
|
+
for sel in selectors_to_try:
|
|
1017
|
+
try:
|
|
1018
|
+
el = page.query_selector(sel)
|
|
1019
|
+
if el and el.is_visible():
|
|
1020
|
+
el.click()
|
|
1021
|
+
time.sleep(0.3)
|
|
1022
|
+
# Clear existing content
|
|
1023
|
+
el.fill("")
|
|
1024
|
+
time.sleep(0.2)
|
|
1025
|
+
# Type with human speed
|
|
1026
|
+
page.keyboard.type(value, delay=random.randint(30, 80))
|
|
1027
|
+
time.sleep(0.5)
|
|
1028
|
+
# VERIFY: read back what we typed
|
|
1029
|
+
actual = el.input_value() if el.evaluate("e => e.tagName") in ["INPUT", "TEXTAREA"] else el.inner_text()
|
|
1030
|
+
if value[:20] in (actual or ""):
|
|
1031
|
+
print(f"✅ {field_name} filled successfully")
|
|
1032
|
+
return True
|
|
1033
|
+
else:
|
|
1034
|
+
print(f"⚠️ {field_name}: typed but verify failed (got: {actual[:50]})")
|
|
1035
|
+
except Exception as e:
|
|
1036
|
+
continue
|
|
1037
|
+
# If no selector worked, dump available form elements for debugging
|
|
1038
|
+
try:
|
|
1039
|
+
inputs = page.query_selector_all("input, textarea, [contenteditable]")
|
|
1040
|
+
print(f"❌ {field_name} FAILED. Available form elements on page:")
|
|
1041
|
+
for i, inp in enumerate(inputs[:15]):
|
|
1042
|
+
tag = inp.evaluate("e => e.tagName")
|
|
1043
|
+
name = inp.get_attribute("name") or ""
|
|
1044
|
+
placeholder = inp.get_attribute("placeholder") or ""
|
|
1045
|
+
aria = inp.get_attribute("aria-label") or ""
|
|
1046
|
+
testid = inp.get_attribute("data-testid") or ""
|
|
1047
|
+
print(f" [{i}] <{tag}> name='{name}' placeholder='{placeholder}' aria='{aria}' testid='{testid}'")
|
|
1048
|
+
except: pass
|
|
1049
|
+
return False
|
|
1050
|
+
|
|
1051
|
+
# Example usage for each field:
|
|
1052
|
+
discover_and_fill(page, "Professional Tagline", tagline_text, [
|
|
1053
|
+
'input[name*="tagline"]', 'input[name*="title"]', 'input[name*="oneliner"]',
|
|
1054
|
+
'input[placeholder*="tagline"]', 'input[placeholder*="professional"]',
|
|
1055
|
+
'[data-testid*="tagline"]', '[aria-label*="tagline"]', '[aria-label*="professional"]',
|
|
1056
|
+
'input.profile-tagline', '.tagline-input input',
|
|
1057
|
+
])
|
|
1058
|
+
\`\`\`
|
|
1059
|
+
|
|
1060
|
+
**MANDATORY SCRIPT STRUCTURE for fiverr-setup-profile.py:**
|
|
1061
|
+
Every profile setup script MUST follow this pattern:
|
|
1062
|
+
\`\`\`python
|
|
1063
|
+
results = {} # Track what succeeded and what failed
|
|
1064
|
+
|
|
1065
|
+
# For each field:
|
|
1066
|
+
results["avatar"] = upload_avatar(page, avatar_path) # Returns True/False
|
|
1067
|
+
results["tagline"] = discover_and_fill(page, "Tagline", tagline, TAGLINE_SELECTORS)
|
|
1068
|
+
results["bio"] = discover_and_fill(page, "Bio", bio_text, BIO_SELECTORS)
|
|
1069
|
+
results["skills"] = add_skills(page, skill_list) # Returns True/False
|
|
1070
|
+
# ... etc for each field
|
|
1071
|
+
|
|
1072
|
+
# FINAL REPORT — must be HONEST
|
|
1073
|
+
page.screenshot(path=os.path.join(BUSINESS_DIR, "profile-final.png"))
|
|
1074
|
+
succeeded = [k for k, v in results.items() if v]
|
|
1075
|
+
failed = [k for k, v in results.items() if not v]
|
|
1076
|
+
print(f"\\nProfile Setup Results:")
|
|
1077
|
+
print(f" ✅ Succeeded: {', '.join(succeeded) if succeeded else 'NONE'}")
|
|
1078
|
+
print(f" ❌ Failed: {', '.join(failed) if failed else 'NONE'}")
|
|
1079
|
+
if failed:
|
|
1080
|
+
print(f"\\n{len(failed)} field(s) failed. Check profile-final.png and form element dump above.")
|
|
1081
|
+
exit(1) # EXIT CODE 1 = not fully successful
|
|
1082
|
+
else:
|
|
1083
|
+
print(f"\\nAll {len(succeeded)} fields set successfully.")
|
|
1084
|
+
exit(0)
|
|
1085
|
+
\`\`\`
|
|
1086
|
+
|
|
1087
|
+
A script that prints "✅ Profile fields updated" without the results dict pattern above is FAKE.
|
|
1088
|
+
A script that catches all exceptions and continues as if nothing happened is FAKE.
|
|
1089
|
+
A script with no exit(1) path is SUSPICIOUS — real scripts can fail.
|
|
1090
|
+
|
|
1091
|
+
Thaddeus logs in headless, navigates to profile settings using the URL/selector discovery above, and fills out:
|
|
1092
|
+
\`\`\`
|
|
1093
|
+
1. Profile picture
|
|
1094
|
+
- Generate a professional avatar using PIL (initials-based or abstract design)
|
|
1095
|
+
- Save to ~/thaddeus-businesses/fiverr-gigs/products/profile-pic.png
|
|
1096
|
+
- Navigate to profile edit page (use PROFILE_URLS above)
|
|
1097
|
+
- Find the avatar upload: query_selector('input[type="file"]') or click the avatar image first
|
|
1098
|
+
- set_input_files() to upload, then find and click Save
|
|
1099
|
+
|
|
1100
|
+
2. Display name & tagline
|
|
1101
|
+
- Already on profile edit page
|
|
1102
|
+
- Set display name to the brand name
|
|
1103
|
+
- Set professional tagline (one line), e.g.:
|
|
1104
|
+
"Full-Stack Developer & Technical Writer | SEO Content | Code Review"
|
|
1105
|
+
|
|
1106
|
+
3. Description / Bio
|
|
1107
|
+
- Fill the profile description with a professional 3-4 paragraph bio
|
|
1108
|
+
- Include: skills, experience, what clients can expect, response time
|
|
1109
|
+
- Use power words: "delivered", "clients served", "on-time", "5-star"
|
|
1110
|
+
- Example: "I'm a technical writer and developer with expertise in creating
|
|
1111
|
+
clear, comprehensive documentation, SEO-optimized blog content, and
|
|
1112
|
+
detailed code reviews. I deliver on time, every time, and offer unlimited
|
|
1113
|
+
revisions until you're 100% satisfied."
|
|
1114
|
+
|
|
1115
|
+
4. Skills tags
|
|
1116
|
+
- Navigate to: Profile → Edit → Skills
|
|
1117
|
+
- Add 10-15 relevant skill tags based on gig types, e.g.:
|
|
1118
|
+
"Copywriting", "SEO", "Technical Writing", "Blog Writing", "Code Review",
|
|
1119
|
+
"Python", "JavaScript", "Data Entry", "API Documentation", "Proofreading",
|
|
1120
|
+
"Content Writing", "WordPress", "Research", "Editing"
|
|
1121
|
+
|
|
1122
|
+
5. Languages
|
|
1123
|
+
- Add "English" → "Native/Bilingual"
|
|
1124
|
+
- Add any other languages the user speaks
|
|
1125
|
+
|
|
1126
|
+
6. Education & Certification (optional)
|
|
1127
|
+
- If user provides credentials, fill them in
|
|
1128
|
+
- If not, skip — don't fabricate degrees
|
|
1129
|
+
|
|
1130
|
+
7. Linked accounts
|
|
1131
|
+
- Skip unless user provides GitHub/LinkedIn/portfolio URL
|
|
1132
|
+
|
|
1133
|
+
8. Seller availability
|
|
1134
|
+
- Set availability to: "Available now"
|
|
1135
|
+
- Set response time to: "1 hour" (Thaddeus checks orders multiple times daily)
|
|
1136
|
+
|
|
1137
|
+
9. Out of office
|
|
1138
|
+
- Make sure this is OFF
|
|
1139
|
+
\`\`\`
|
|
1140
|
+
|
|
1141
|
+
**Image generation for logos/banners/avatars:**
|
|
1142
|
+
\`\`\`python
|
|
1143
|
+
from PIL import Image, ImageDraw, ImageFont
|
|
1144
|
+
import os
|
|
1145
|
+
|
|
1146
|
+
def generate_shop_logo(shop_name, output_path, size=500):
|
|
1147
|
+
"""Generate a clean, modern logo with initials or short name."""
|
|
1148
|
+
img = Image.new('RGB', (size, size), color='#1a1a2e')
|
|
1149
|
+
draw = ImageDraw.Draw(img)
|
|
1150
|
+
|
|
1151
|
+
# Use initials if name is long, full name if short
|
|
1152
|
+
initials = ''.join(word[0].upper() for word in shop_name.split()[:2])
|
|
1153
|
+
display = initials if len(shop_name) > 12 else shop_name
|
|
1154
|
+
|
|
1155
|
+
# Try system fonts, fall back to default
|
|
1156
|
+
font_size = size // 3 if len(display) <= 3 else size // 5
|
|
1157
|
+
try:
|
|
1158
|
+
font = ImageFont.truetype("/System/Library/Fonts/Helvetica.ttc", font_size)
|
|
1159
|
+
except:
|
|
1160
|
+
font = ImageFont.load_default()
|
|
1161
|
+
|
|
1162
|
+
bbox = draw.textbbox((0, 0), display, font=font)
|
|
1163
|
+
x = (size - (bbox[2] - bbox[0])) // 2
|
|
1164
|
+
y = (size - (bbox[3] - bbox[1])) // 2
|
|
1165
|
+
draw.text((x, y), display, fill='#e94560', font=font)
|
|
1166
|
+
|
|
1167
|
+
img.save(output_path)
|
|
1168
|
+
return output_path
|
|
1169
|
+
|
|
1170
|
+
def generate_shop_banner(shop_name, tagline, output_path, width=1200, height=300):
|
|
1171
|
+
"""Generate a branded banner with gradient background."""
|
|
1172
|
+
img = Image.new('RGB', (width, height))
|
|
1173
|
+
draw = ImageDraw.Draw(img)
|
|
1174
|
+
|
|
1175
|
+
# Gradient background
|
|
1176
|
+
for y in range(height):
|
|
1177
|
+
r = int(26 + (y / height) * 20)
|
|
1178
|
+
g = int(26 + (y / height) * 10)
|
|
1179
|
+
b = int(46 + (y / height) * 40)
|
|
1180
|
+
draw.line([(0, y), (width, y)], fill=(r, g, b))
|
|
1181
|
+
|
|
1182
|
+
try:
|
|
1183
|
+
title_font = ImageFont.truetype("/System/Library/Fonts/Helvetica.ttc", 48)
|
|
1184
|
+
sub_font = ImageFont.truetype("/System/Library/Fonts/Helvetica.ttc", 24)
|
|
1185
|
+
except:
|
|
1186
|
+
title_font = ImageFont.load_default()
|
|
1187
|
+
sub_font = title_font
|
|
1188
|
+
|
|
1189
|
+
# Center title
|
|
1190
|
+
bbox = draw.textbbox((0, 0), shop_name, font=title_font)
|
|
1191
|
+
x = (width - (bbox[2] - bbox[0])) // 2
|
|
1192
|
+
draw.text((x, height // 3), shop_name, fill='#ffffff', font=title_font)
|
|
1193
|
+
|
|
1194
|
+
# Center tagline
|
|
1195
|
+
bbox = draw.textbbox((0, 0), tagline, font=sub_font)
|
|
1196
|
+
x = (width - (bbox[2] - bbox[0])) // 2
|
|
1197
|
+
draw.text((x, height // 2 + 10), tagline, fill='#e94560', font=sub_font)
|
|
1198
|
+
|
|
1199
|
+
img.save(output_path)
|
|
1200
|
+
return output_path
|
|
1201
|
+
\`\`\`
|
|
1202
|
+
|
|
1203
|
+
**Profile setup scripts go in:** \`~/thaddeus-businesses/<name>/scripts/<platform>-setup-profile.py\`
|
|
1204
|
+
|
|
1205
|
+
**CRITICAL RULES for profile setup:**
|
|
1206
|
+
- Run profile setup ONCE after first login, before any products/gigs go live
|
|
1207
|
+
- Save all generated images to \`~/thaddeus-businesses/<name>/products/\` for reference
|
|
1208
|
+
- Use human_click() and human_type() for ALL interactions — anti-detection rules still apply
|
|
1209
|
+
- If any field is already filled (returning user), check first and skip it — don't overwrite
|
|
1210
|
+
- If Etsy payment/billing isn't set up, STOP and open browser non-headless for user to do it manually (requires sensitive financial info)
|
|
1211
|
+
- Screenshot the finished profile page and save to \`~/thaddeus-businesses/<name>/profile-screenshot.png\` for the user to review
|
|
1212
|
+
- DO NOT fabricate credentials, degrees, or certifications. Make the bio compelling but honest.
|
|
1213
|
+
|
|
1214
|
+
### E. Build initial assets
|
|
1215
|
+
- For Etsy: Generate 5 starter digital products (SVG/PDF files via code), then upload ALL of them via the upload script
|
|
1216
|
+
- For Fiverr: Create 3 gig listings via the gig creation script + generate portfolio samples
|
|
1217
|
+
- For Content Agency: Write 3 sample articles + craft 10 cold outreach emails
|
|
1218
|
+
- For Lead Gen: Build the scraping pipeline + generate first batch of 50 leads
|
|
1219
|
+
- For Tech Docs: Find 10 target projects + draft outreach templates
|
|
1220
|
+
|
|
1221
|
+
### F. Set up the AGENT SYSTEM — Production + Persistent Monitor
|
|
1222
|
+
|
|
1223
|
+
This is the core of the autonomous business. You spawn TWO types of agents:
|
|
1224
|
+
|
|
1225
|
+
#### Agent 1: DAILY PRODUCTION AGENT (morning cron, does the work, exits when done)
|
|
1226
|
+
|
|
1227
|
+
This agent fires once per day and creates the maximum products/gigs/content for that day.
|
|
1228
|
+
It has DAILY CAPS to avoid triggering platform rate limits:
|
|
1229
|
+
|
|
1230
|
+
**Daily Production Caps (written into config.json):**
|
|
1231
|
+
\`\`\`json
|
|
1232
|
+
{
|
|
1233
|
+
"dailyCaps": {
|
|
1234
|
+
"etsy": {
|
|
1235
|
+
"newProducts": 5,
|
|
1236
|
+
"listingUpdates": 10,
|
|
1237
|
+
"messageReplies": 20
|
|
1238
|
+
},
|
|
1239
|
+
"fiverr": {
|
|
1240
|
+
"newGigs": 2,
|
|
1241
|
+
"proposals": 10,
|
|
1242
|
+
"deliveries": 15,
|
|
1243
|
+
"messageReplies": 25
|
|
1244
|
+
},
|
|
1245
|
+
"contentAgency": {
|
|
1246
|
+
"articles": 5,
|
|
1247
|
+
"outreachEmails": 30,
|
|
1248
|
+
"followUps": 20
|
|
1249
|
+
},
|
|
1250
|
+
"leadGen": {
|
|
1251
|
+
"leadsScraped": 100,
|
|
1252
|
+
"outreachEmails": 30,
|
|
1253
|
+
"leadDeliveries": 10
|
|
1254
|
+
},
|
|
1255
|
+
"techDocs": {
|
|
1256
|
+
"reposAnalyzed": 5,
|
|
1257
|
+
"outreachEmails": 15,
|
|
1258
|
+
"docsWritten": 3
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
\`\`\`
|
|
1263
|
+
|
|
1264
|
+
The production agent tracks how many of each action it's done today in \`~/thaddeus-businesses/<name>/daily-tracker.json\`:
|
|
1265
|
+
\`\`\`json
|
|
1266
|
+
{
|
|
1267
|
+
"date": "2026-04-11",
|
|
1268
|
+
"produced": { "newProducts": 3, "listingUpdates": 2, "messageReplies": 5 },
|
|
1269
|
+
"caps": { "newProducts": 5, "listingUpdates": 10, "messageReplies": 20 },
|
|
1270
|
+
"status": "in_progress"
|
|
1271
|
+
}
|
|
1272
|
+
\`\`\`
|
|
1273
|
+
|
|
1274
|
+
When an action hits its cap → skip it, move to next action type. When ALL caps hit → agent marks status "completed" and exits.
|
|
1275
|
+
|
|
1276
|
+
**Cron for production agent:**
|
|
1277
|
+
\`\`\`
|
|
1278
|
+
CronCreate: cron="0 8 * * *", recurring=true, durable=true
|
|
1279
|
+
prompt="PRODUCTION RUN for <business>.
|
|
1280
|
+
Read ~/thaddeus-businesses/<name>/config.json for caps.
|
|
1281
|
+
Reset daily-tracker.json if date is not today.
|
|
1282
|
+
|
|
1283
|
+
STEP 0 — IP BLOCK CHECK (DO THIS FIRST):
|
|
1284
|
+
Run a quick headless navigation to the platform homepage using safe_goto().
|
|
1285
|
+
If it returns blocked (check for 'Access is temporarily restricted', 'unusual activity', etc.):
|
|
1286
|
+
→ Save screenshot to ~/thaddeus-businesses/<name>/ip-block-screenshot.png
|
|
1287
|
+
→ Write 'blocked' status to monitor-status.json
|
|
1288
|
+
→ Notify user: 'IP blocked by <platform>. Use VPN, mobile hotspot, or proxy. See ~/thaddeus-businesses/<name>/scripts/setup-proxy.py'
|
|
1289
|
+
→ DO NOT continue. Exit this production run. Do not retry for 4 hours.
|
|
1290
|
+
If NOT blocked, proceed:
|
|
1291
|
+
|
|
1292
|
+
1. Check for any pending orders/deliveries FIRST (revenue takes priority)
|
|
1293
|
+
2. Create new products/gigs up to daily cap
|
|
1294
|
+
3. Optimize existing listings (update tags, descriptions, prices based on stats)
|
|
1295
|
+
4. Send outreach/proposals up to daily cap
|
|
1296
|
+
5. Research trending niches for tomorrow's products
|
|
1297
|
+
Log everything to revenue-log.json and daily-tracker.json.
|
|
1298
|
+
Stop when all caps are hit. DO NOT exceed caps — platforms flag bulk activity.
|
|
1299
|
+
ALL Playwright scripts MUST use safe_goto() for every navigation — never raw page.goto()."
|
|
1300
|
+
\`\`\`
|
|
1301
|
+
|
|
1302
|
+
#### Agent 2: PERSISTENT MONITOR AGENT (runs ALL DAY, watches for orders/messages)
|
|
1303
|
+
|
|
1304
|
+
This is the critical one. Spawn a LONG-RUNNING sub-agent via the Agent tool that loops
|
|
1305
|
+
every 15-30 minutes checking for new orders, messages, and reviews. It runs until the
|
|
1306
|
+
user stops it or Thaddeus session ends.
|
|
1307
|
+
|
|
1308
|
+
**How to spawn it:**
|
|
1309
|
+
Use the Agent tool to create a sub-agent with this prompt:
|
|
1310
|
+
|
|
1311
|
+
\`\`\`
|
|
1312
|
+
Agent: "Business Monitor for <platform>"
|
|
1313
|
+
Prompt: "You are the order monitor for the <business> business.
|
|
1314
|
+
Your job: check for new activity every 15 minutes and handle it immediately.
|
|
1315
|
+
You run ALL DAY until the user types /stop-business or kills this agent.
|
|
1316
|
+
|
|
1317
|
+
LOOP FOREVER:
|
|
1318
|
+
0. IP BLOCK CHECK (every loop iteration):
|
|
1319
|
+
Before ANY Playwright action, do a quick headless check against the platform homepage.
|
|
1320
|
+
If blocked ('Access is temporarily restricted', 'unusual activity', etc.):
|
|
1321
|
+
→ Screenshot to ~/thaddeus-businesses/<name>/ip-block-screenshot.png
|
|
1322
|
+
→ Update monitor-status.json: cookieStatus='ip_blocked'
|
|
1323
|
+
→ Notify user: 'IP blocked by <platform>. Options: VPN, mobile hotspot, or proxy.
|
|
1324
|
+
Run: python3 ~/thaddeus-businesses/<name>/scripts/setup-proxy.py <platform> <proxy-url>'
|
|
1325
|
+
→ PAUSE monitoring. Sleep 1 hour, then re-check. Do NOT keep hammering a blocked IP.
|
|
1326
|
+
→ Resume normal loop only when the block check passes.
|
|
1327
|
+
|
|
1328
|
+
1. Run the order check script:
|
|
1329
|
+
python3 ~/thaddeus-businesses/<name>/scripts/<platform>-check-orders.py
|
|
1330
|
+
|
|
1331
|
+
2. Read the output. For each NEW order:
|
|
1332
|
+
a. Read the order requirements/details
|
|
1333
|
+
b. EXECUTE the deliverable immediately (write the content, generate the file, do the code review — whatever the gig requires)
|
|
1334
|
+
c. Save deliverable to ~/thaddeus-businesses/<name>/deliverables/<order-id>/
|
|
1335
|
+
d. Run the delivery script to upload and submit:
|
|
1336
|
+
python3 ~/thaddeus-businesses/<name>/scripts/<platform>-deliver-order.py --order <id> --file <path>
|
|
1337
|
+
e. Log to revenue-log.json with status 'delivered'
|
|
1338
|
+
|
|
1339
|
+
3. Check for new messages/inquiries:
|
|
1340
|
+
- For Etsy: Check convos page for unread messages
|
|
1341
|
+
- For Fiverr: Check inbox for buyer questions
|
|
1342
|
+
- Reply to each one professionally and promptly (fast response time = better ranking)
|
|
1343
|
+
|
|
1344
|
+
4. Check for new reviews:
|
|
1345
|
+
- Log them to revenue-log.json
|
|
1346
|
+
- If negative review: draft a professional response, save for user approval before posting
|
|
1347
|
+
|
|
1348
|
+
5. Check cookie health:
|
|
1349
|
+
- If any script gets redirected to login page → cookies expired
|
|
1350
|
+
- Notify user: 'Cookies expired for <platform>. Run: python3 ~/thaddeus-businesses/<name>/scripts/<platform>-login.py'
|
|
1351
|
+
- Pause monitoring until cookies are refreshed
|
|
1352
|
+
|
|
1353
|
+
6. Write status to ~/thaddeus-businesses/<name>/monitor-status.json:
|
|
1354
|
+
{
|
|
1355
|
+
'lastCheck': '<ISO timestamp>',
|
|
1356
|
+
'ordersFound': N,
|
|
1357
|
+
'ordersDelivered': N,
|
|
1358
|
+
'messagesReplied': N,
|
|
1359
|
+
'cookieStatus': 'valid|expired',
|
|
1360
|
+
'nextCheck': '<ISO timestamp>'
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
7. Sleep 15 minutes, then repeat from step 1.
|
|
1364
|
+
|
|
1365
|
+
NEVER STOP unless:
|
|
1366
|
+
- User explicitly stops you (/stop-business or kills the agent)
|
|
1367
|
+
- Cookies expire (pause, notify, resume when fixed)
|
|
1368
|
+
- IP is blocked (pause, notify with fix options, re-check every hour, auto-resume when unblocked)
|
|
1369
|
+
- A critical error occurs 3 times in a row (notify user, pause)
|
|
1370
|
+
|
|
1371
|
+
You are silent unless something happens. Don't spam the user with 'nothing new' messages.
|
|
1372
|
+
Only speak up when: new order found, order delivered, message replied, review received, error occurred, or cookies expired."
|
|
1373
|
+
\`\`\`
|
|
1374
|
+
|
|
1375
|
+
**IMPORTANT: The monitor agent must be spawned via the Agent tool, NOT as a cron.**
|
|
1376
|
+
Crons fire and exit. The monitor agent LOOPS INTERNALLY with sleep intervals.
|
|
1377
|
+
It stays alive as a running sub-agent in Thaddeus's process tree.
|
|
1378
|
+
|
|
1379
|
+
#### Agent 3: WEEKLY GROWTH & REPORTING AGENT (Monday morning cron)
|
|
1380
|
+
|
|
1381
|
+
\`\`\`
|
|
1382
|
+
CronCreate: cron="0 10 * * 1", recurring=true, durable=true
|
|
1383
|
+
prompt="WEEKLY BUSINESS REPORT for <business>.
|
|
1384
|
+
1. Read ~/thaddeus-businesses/<name>/revenue-log.json
|
|
1385
|
+
2. Calculate: total revenue this week, total all-time, orders completed, new clients, conversion rate
|
|
1386
|
+
3. Compare to last week — are we up or down?
|
|
1387
|
+
4. Analyze what's working: which products/gigs sell best? Which outreach templates convert?
|
|
1388
|
+
5. Generate action items: double down on winners, kill losers, new ideas for next week
|
|
1389
|
+
6. Research competitor shops/gigs — what are top sellers doing differently?
|
|
1390
|
+
7. Save full report to ~/thaddeus-businesses/<name>/weekly-reports/week-<date>.md
|
|
1391
|
+
8. Print the report summary to the user
|
|
1392
|
+
9. Adjust config.json if needed (raise caps on high-performers, lower on flops)"
|
|
1393
|
+
\`\`\`
|
|
1394
|
+
|
|
1395
|
+
#### Startup sequence for agents:
|
|
1396
|
+
When the business launches, start agents in this order:
|
|
1397
|
+
1. Production agent fires first (creates initial products/gigs)
|
|
1398
|
+
2. Monitor agent spawns immediately after and runs forever
|
|
1399
|
+
3. Weekly agent fires on its Monday cron
|
|
1400
|
+
|
|
1401
|
+
#### How to stop everything:
|
|
1402
|
+
Tell the user: "To shut down the business, type \`/stop-business\` or say 'stop the <business name> business'.
|
|
1403
|
+
Thaddeus will kill the monitor agent, delete the crons, and give you a final revenue report."
|
|
1404
|
+
|
|
1405
|
+
When stopping:
|
|
1406
|
+
1. Kill the monitor sub-agent
|
|
1407
|
+
2. Delete all cron jobs for this business (CronDelete)
|
|
1408
|
+
3. Generate final revenue report from revenue-log.json
|
|
1409
|
+
4. Keep all files/products/deliverables in ~/thaddeus-businesses/<name>/ (don't delete the user's work)
|
|
1410
|
+
|
|
1411
|
+
### G. Execute the FIRST production run immediately
|
|
1412
|
+
Don't wait for the morning cron — do the first full production run RIGHT NOW after setup.
|
|
1413
|
+
For Etsy: Generate and upload products up to daily cap (5).
|
|
1414
|
+
For Fiverr: Create and publish gigs up to daily cap (2), plus send proposals (up to 10).
|
|
1415
|
+
For Content Agency: Write sample articles (5) + send outreach emails (30).
|
|
1416
|
+
For Lead Gen: Scrape first batch of leads (100) + send client outreach (30).
|
|
1417
|
+
For Tech Docs: Find target repos (5) + send outreach (15).
|
|
1418
|
+
|
|
1419
|
+
Then IMMEDIATELY spawn the persistent monitor agent so it starts watching for orders right away.
|
|
1420
|
+
|
|
1421
|
+
### H. Report back
|
|
1422
|
+
Tell the user:
|
|
1423
|
+
- What was set up (workspace, scripts, profile)
|
|
1424
|
+
- What the first production run created (exact numbers)
|
|
1425
|
+
- That the monitor agent is NOW RUNNING and will catch orders/messages in real-time
|
|
1426
|
+
- Cron schedule: "Production runs daily at 8am. Weekly report every Monday at 10am."
|
|
1427
|
+
- "The monitor agent runs 24/7 checking every 15 minutes. To stop everything: /stop-business"
|
|
1428
|
+
- Daily caps for their platform (so they know the pace)
|
|
1429
|
+
- Expected timeline to first revenue
|
|
1430
|
+
- Session storage location
|
|
1431
|
+
|
|
1432
|
+
## RULES
|
|
1433
|
+
|
|
1434
|
+
### ⛔ ZERO TOLERANCE: NO SIMULATING, NO FAKING, NO PRETENDING
|
|
1435
|
+
This is the MOST IMPORTANT rule. Violation of this rule means the entire business is fake and worthless.
|
|
1436
|
+
THE USER HAS CAUGHT YOU LYING MULTIPLE TIMES. This ends NOW.
|
|
1437
|
+
|
|
1438
|
+
**RULE: CHECK SCRIPT OUTPUT BEFORE REPORTING RESULTS**
|
|
1439
|
+
When you run a script via Bash, READ THE ACTUAL OUTPUT before telling the user what happened.
|
|
1440
|
+
- If the script prints "Could not navigate" → the action FAILED. Say it FAILED.
|
|
1441
|
+
- If the script prints "selector not found" → the action FAILED. Say it FAILED.
|
|
1442
|
+
- If the script exits with code 1 → the action FAILED. Say it FAILED.
|
|
1443
|
+
- If the script prints "Error" or "Traceback" → the action FAILED. Say it FAILED.
|
|
1444
|
+
|
|
1445
|
+
DO NOT read "Could not navigate to edit profile" and then tell the user "Profile setup completed."
|
|
1446
|
+
That is a LIE. The user can read the output. They WILL catch you. They HAVE caught you. THREE TIMES.
|
|
1447
|
+
|
|
1448
|
+
**RULE: EXIT CODE DETERMINES SUCCESS**
|
|
1449
|
+
- Exit code 0 = success. You may report the action as completed.
|
|
1450
|
+
- Exit code 1 = failure. You MUST report the action as FAILED and explain WHY (read the error output).
|
|
1451
|
+
- If unsure, re-read the script output and look for error keywords.
|
|
1452
|
+
|
|
1453
|
+
**RULE: NEVER REPORT A FAILED ACTION AS SUCCESSFUL**
|
|
1454
|
+
If a script fails, your response MUST include:
|
|
1455
|
+
1. "❌ <action> FAILED"
|
|
1456
|
+
2. The actual error message from the script output
|
|
1457
|
+
3. What needs to happen to fix it (re-run, fix IP, fix selector, etc.)
|
|
1458
|
+
|
|
1459
|
+
Your response MUST NOT include:
|
|
1460
|
+
- "✅ <action> completed" (when it didn't)
|
|
1461
|
+
- "Profile setup completed" (when the script said "Could not navigate")
|
|
1462
|
+
- "Cookies verified" (when the login script exited with code 1)
|
|
1463
|
+
- "All actions are real browser automation — no simulation" (when every script crashed)
|
|
1464
|
+
|
|
1465
|
+
**EVERY script that interacts with Etsy/Fiverr MUST use Playwright to actually open the website and perform real actions.**
|
|
1466
|
+
|
|
1467
|
+
What "publishing a gig" means:
|
|
1468
|
+
- Open Fiverr in a headless browser via Playwright using saved cookies
|
|
1469
|
+
- Navigate to the "Create a New Gig" page
|
|
1470
|
+
- Fill in the title field, select category, write description, set pricing tiers
|
|
1471
|
+
- Upload portfolio images/samples
|
|
1472
|
+
- Click Publish/Save
|
|
1473
|
+
- Verify the gig appears on your profile
|
|
1474
|
+
- THEN report "gig published"
|
|
1475
|
+
|
|
1476
|
+
What "publishing a gig" does NOT mean:
|
|
1477
|
+
- Writing a markdown file locally and calling it "published" ← THIS IS LYING
|
|
1478
|
+
- Printing "✅ 2 gigs published successfully" without ever opening a browser ← THIS IS LYING
|
|
1479
|
+
- Creating local templates and logging them as "revenue_potential" ← THIS IS LYING
|
|
1480
|
+
|
|
1481
|
+
**The same applies to ALL platform actions:**
|
|
1482
|
+
- "Product uploaded to Etsy" = Playwright opened Etsy, navigated to listing manager, uploaded the file, filled fields, clicked publish
|
|
1483
|
+
- "Order delivered on Fiverr" = Playwright opened the order page, uploaded the deliverable file, clicked submit
|
|
1484
|
+
- "Profile set up" = Playwright navigated to profile settings, filled each field, uploaded avatar, saved
|
|
1485
|
+
- "Proposal sent" = Playwright opened buyer requests, typed the proposal, clicked submit
|
|
1486
|
+
|
|
1487
|
+
**If a script cannot connect to the platform (IP blocked, cookies expired, error), it must:**
|
|
1488
|
+
- Report the REAL status: "BLOCKED" or "FAILED" or "COOKIES EXPIRED"
|
|
1489
|
+
- NOT pretend the action succeeded
|
|
1490
|
+
- NOT write fake success logs
|
|
1491
|
+
- NOT tell the user "gigs published" when nothing was published
|
|
1492
|
+
|
|
1493
|
+
**If you cannot perform a real action on the platform, say so honestly.** The user would rather know
|
|
1494
|
+
"IP is blocked, can't publish gigs yet" than be told "2 gigs published!" when nothing happened.
|
|
1495
|
+
|
|
1496
|
+
Writing local files (product templates, sample deliverables, portfolio pieces) is PREPARATION, not PUBLISHING.
|
|
1497
|
+
Label it correctly: "Generated 2 gig templates locally — will publish to Fiverr once IP block is resolved."
|
|
1498
|
+
|
|
1499
|
+
### ⛔ NEVER ASK THE USER TO DO THADDEUS'S JOB
|
|
1500
|
+
The user's ONLY manual action is the initial login/signup (Step A) — because it involves passwords and 2FA.
|
|
1501
|
+
EVERYTHING after login is Thaddeus's job via headless Playwright:
|
|
1502
|
+
- Filling in profile fields (bio, tagline, skills, avatar upload) → THADDEUS DOES THIS
|
|
1503
|
+
- Creating gig listings (title, description, pricing, portfolio) → THADDEUS DOES THIS
|
|
1504
|
+
- Delivering orders (upload file, click submit) → THADDEUS DOES THIS
|
|
1505
|
+
- Replying to messages → THADDEUS DOES THIS
|
|
1506
|
+
- Sending proposals → THADDEUS DOES THIS
|
|
1507
|
+
|
|
1508
|
+
NEVER open a visible browser and tell the user "complete the profile" or "fill in your bio."
|
|
1509
|
+
That is YOUR job. You have Playwright. You have the cookies. USE THEM.
|
|
1510
|
+
|
|
1511
|
+
If a specific Playwright action fails (element not found, selector changed, page error):
|
|
1512
|
+
1. Take a screenshot of the current page state
|
|
1513
|
+
2. Try alternative selectors (aria-label, data-testid, class name, XPath)
|
|
1514
|
+
3. If still failing, report the EXACT error and which field/action failed
|
|
1515
|
+
4. DO NOT fall back to "just do it yourself in the browser"
|
|
1516
|
+
|
|
1517
|
+
### Other Rules
|
|
1518
|
+
- Be SPECIFIC with pricing. Don't say "varies" — give exact numbers.
|
|
1519
|
+
- Create REAL files, REAL cron jobs, REAL Playwright scripts, REAL products.
|
|
1520
|
+
- The revenue-log.json tracks: date, amount, source, status (pending/received/failed).
|
|
1521
|
+
- DAILY CAPS ARE HARD LIMITS. Never exceed them. Platforms flag bulk activity and ban accounts.
|
|
1522
|
+
- The monitor agent runs ALL DAY. It does NOT exit after one check. It loops with 15-min sleeps.
|
|
1523
|
+
- If a Playwright script hits a CAPTCHA: screenshot it, save to workspace, notify user. Pause the monitor.
|
|
1524
|
+
- If cookies expire: pause monitor, notify user, resume when they re-auth.
|
|
1525
|
+
- NEVER say "I can't actually make money" — these are real business models that work.
|
|
1526
|
+
- NEVER click faster than the anti-detection rules allow. Getting the account banned kills the business.
|
|
1527
|
+
- The user chose this. Execute with maximum aggression within the caps.
|
|
1528
|
+
- When reporting results, distinguish between LOCAL actions (files created, templates written) and PLATFORM actions (gig published on Fiverr, product listed on Etsy). Never conflate the two.
|
|
1529
|
+
|
|
1530
|
+
## REVENUE TRACKING FORMAT
|
|
1531
|
+
\`\`\`json
|
|
1532
|
+
{
|
|
1533
|
+
"business": "<name>",
|
|
1534
|
+
"platform": "<etsy|fiverr|email|web>",
|
|
1535
|
+
"sessionDir": "~/.thaddeus-<platform>-session",
|
|
1536
|
+
"startedAt": "<ISO date>",
|
|
1537
|
+
"totalRevenue": 0,
|
|
1538
|
+
"entries": [
|
|
1539
|
+
{ "date": "<ISO>", "amount": 0, "source": "<description>", "status": "pending|received|failed" }
|
|
1540
|
+
],
|
|
1541
|
+
"metrics": {
|
|
1542
|
+
"clientsContacted": 0,
|
|
1543
|
+
"clientsConverted": 0,
|
|
1544
|
+
"productsCreated": 0,
|
|
1545
|
+
"productsUploaded": 0,
|
|
1546
|
+
"ordersReceived": 0,
|
|
1547
|
+
"ordersDelivered": 0,
|
|
1548
|
+
"deliveriesCompleted": 0,
|
|
1549
|
+
"messagesReplied": 0,
|
|
1550
|
+
"proposalsSent": 0,
|
|
1551
|
+
"reviewsReceived": 0
|
|
1552
|
+
},
|
|
1553
|
+
"monitor": {
|
|
1554
|
+
"agentId": "<sub-agent-id>",
|
|
1555
|
+
"status": "running|paused|stopped",
|
|
1556
|
+
"lastCheck": "<ISO>",
|
|
1557
|
+
"uptimeSince": "<ISO>"
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
\`\`\`
|
|
1561
|
+
|
|
1562
|
+
Now present the 5 options and wait for the user to pick.`
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
const command = {
|
|
1566
|
+
type: 'prompt',
|
|
1567
|
+
name: 'start-business',
|
|
1568
|
+
description:
|
|
1569
|
+
'Launch an autonomous business — Thaddeus builds it, schedules it, and runs it to generate revenue',
|
|
1570
|
+
allowedTools: ALLOWED_TOOLS,
|
|
1571
|
+
contentLength: 0,
|
|
1572
|
+
progressMessage: 'preparing business options',
|
|
1573
|
+
source: 'builtin',
|
|
1574
|
+
isEnabled: () => true,
|
|
1575
|
+
userInvocable: true,
|
|
1576
|
+
async getPromptForCommand(_args: string) {
|
|
1577
|
+
return [{ type: 'text' as const, text: getPromptContent() }]
|
|
1578
|
+
},
|
|
1579
|
+
} satisfies Command
|
|
1580
|
+
|
|
1581
|
+
export default command
|