diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2c3088d..e744462 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,7 @@
## Unreleased
+- Remove the pages that configure the server or the account: Providers, Judge model, Vision model, Web search, Credentials, Logins, Password managers, Integrations, Coding, Message gateways, Event relay, and Users. The web app is the only client that configures them. Settings gains a Server settings row that opens the web app's settings in the browser, and the links that led to a removed page, such as Provider Settings on a failed reply, the bot editor's web search, integrations, and credentials notes, and Connect a password manager, open the matching web page. The `oauth/callback` deep link is gone with MCP sign-in. Bots' requests for credentials and logins are still answered in the chat.
- Add the data layer for outside calls: the contract copy brings call requests (`request_call`), `callee` on call events, and `callsOthers` on voice lines. The app reads call requests, approves or declines them, follows them every five seconds while they are pending or calling, and reads a call's transcript every two seconds while it goes on.
- Show call requests in the bot chat: a pending one reads "Wants to call for you" with the callee, number, goal and opening and has Decline and Approve; a declined one reads "Declined"; a placed one is a row with its state that opens the call, with its goal and a transcript that follows the call live. An outside call's end notice becomes the same row.
- Show voice gateway calls in bot chats, as on the web: a spoken message reads "Spoken on a call" under its bubble, and a call's start and end show as centred phone markers. A call the bot placed reads "{bot} called you" with the greeting it spoke, and the "Call ended" line that wakes the bot shows the bot's reaction instead of appearing as a typed message.
diff --git a/README.md b/README.md
index ae40435..a66df8d 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,9 @@ python3 scripts/contract.py check
## Connect to a server
-Open the navigation drawer › **Settings**, enter the server URL (`http://10.0.2.2:7337` on the Android Emulator for a host server on `127.0.0.1:7337`, or a LAN/HTTPS address on a physical device), your account email and password, and tap **Save Connection**. The app stores the account session encrypted in the Android Keystore; it does not store the password. Debug builds install as **Crumble Dev** (`ng.crumbli.android.dev`) beside the release app (`ng.crumbli.android`), so each keeps its own connection; the sign-in callback scheme is the application ID, for example `ng.crumbli.android:/oauth/callback`.
+Open the navigation drawer › **Settings**, enter the server URL (`http://10.0.2.2:7337` on the Android Emulator for a host server on `127.0.0.1:7337`, or a LAN/HTTPS address on a physical device), your account email and password, and tap **Save Connection**. The app stores the account session encrypted in the Android Keystore; it does not store the password. Debug builds install as **Crumble Dev** (`ng.crumbli.android.dev`) beside the release app (`ng.crumbli.android`), so each keeps its own connection.
+
+The app doesn't configure the server or the account. Providers, credentials, logins, password managers, integrations, coding, users, message gateways, and the event relay are set in the web app: **Settings** › **Server settings** opens it in the browser.
## Shared API contract
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 8b735f0..c4a1ee9 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -37,13 +37,6 @@
-
-
-
-
-
-
-
diff --git a/app/src/main/java/dev/crumble/android/MainActivity.kt b/app/src/main/java/dev/crumble/android/MainActivity.kt
index 0164ec9..38b4362 100644
--- a/app/src/main/java/dev/crumble/android/MainActivity.kt
+++ b/app/src/main/java/dev/crumble/android/MainActivity.kt
@@ -40,7 +40,7 @@ import kotlinx.coroutines.launch
private val LIGHT_BAR_SCRIM = Color.argb(0xe6, 0xff, 0xff, 0xff)
private val DARK_BAR_SCRIM = Color.argb(0x80, 0x1b, 0x1b, 0x1b)
-/** GitHub's pages keep their own sign-in, which must not carry over to the next account. */
+/** Web pages in the app, such as the bot desktop viewer, keep their own storage, which must not carry over to the next account. */
private fun forgetWebSessions() {
runCatching {
CookieManager.getInstance().removeAllCookies(null)
@@ -137,7 +137,6 @@ class MainActivity : ComponentActivity() {
override fun onResume() {
super.onResume()
model.appActive = true
- model.browserReturned()
model.notificationsAllowed = push.notificationsAllowed()
model.client?.let { push.configure(it) }
push.updatePresence(true, model.route)
@@ -177,10 +176,6 @@ class MainActivity : ComponentActivity() {
} else if (!agentId.isNullOrEmpty()) {
model.selectAgent(agentId)
}
- val data = intent.data
- if (data != null && data.scheme == AppModel.oauthCallbackScheme) {
- model.handleOAuthCallback(data.toString())
- }
}
private fun requestNotificationPermissionIfNeeded() {
diff --git a/app/src/main/java/dev/crumble/android/model/Admin.kt b/app/src/main/java/dev/crumble/android/model/Admin.kt
deleted file mode 100644
index 6ae6974..0000000
--- a/app/src/main/java/dev/crumble/android/model/Admin.kt
+++ /dev/null
@@ -1,49 +0,0 @@
-package dev.crumble.android.model
-
-import dev.crumble.android.generated.AdminUser
-import dev.crumble.android.generated.ListOutdatedWorkspacesResponseWorkspacesItem
-import java.net.URI
-import java.net.URLDecoder
-import java.nio.charset.StandardCharsets
-import java.time.Instant
-import java.time.ZoneId
-import java.time.format.DateTimeFormatter
-import java.time.format.FormatStyle
-
-enum class AccountMode { SignIn, SignUp }
-
-/** The new invite's link, shown once, or why minting it failed. Neither means it's still on its way. */
-data class InviteSheet(val url: String? = null, val error: String = "")
-
-data class OutdatedWorkspaceRow(val bot: String, val owner: String)
-
-fun canCreateAccount(name: String, email: String, password: String) =
- name.isNotBlank() && email.isNotBlank() && password.isNotEmpty()
-
-/** The token in a pasted invite link, or the text itself when it's the bare code. */
-fun inviteToken(text: String): String {
- val trimmed = text.trim()
- val query = runCatching { URI(trimmed).rawQuery }.getOrNull().orEmpty()
- val token = query.split("&").firstOrNull { it.startsWith("invite=") }?.removePrefix("invite=")
- return token?.let { URLDecoder.decode(it, StandardCharsets.UTF_8.name()) } ?: trimmed
-}
-
-fun userRowTitle(user: AdminUser): String =
- user.name.ifEmpty { user.email } + if (user.role == "admin") " (admin)" else ""
-
-fun dateOnly(iso: String, zone: ZoneId = ZoneId.systemDefault()): String {
- val instant = runCatching { Instant.parse(iso) }.getOrNull() ?: return iso
- return DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT).withZone(zone).format(instant)
-}
-
-/** Other accounts' bots aren't listed for an admin, so those rows fall back to the bot's ID. */
-fun outdatedWorkspaceRows(
- workspaces: List,
- bots: List,
- users: List,
-): List = workspaces.map { workspace ->
- OutdatedWorkspaceRow(
- bot = bots.firstOrNull { it.id == workspace.agentId }?.name ?: workspace.agentId,
- owner = users.firstOrNull { it.id == workspace.userId }?.let { it.name.ifEmpty { it.email } } ?: workspace.userId,
- )
-}
diff --git a/app/src/main/java/dev/crumble/android/model/AppModel.kt b/app/src/main/java/dev/crumble/android/model/AppModel.kt
index 98ebf28..f82e5cd 100644
--- a/app/src/main/java/dev/crumble/android/model/AppModel.kt
+++ b/app/src/main/java/dev/crumble/android/model/AppModel.kt
@@ -1,10 +1,11 @@
package dev.crumble.android.model
+import kotlinx.serialization.builtins.ListSerializer
+import kotlinx.serialization.json.JsonObject
import androidx.compose.runtime.Stable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
-import dev.crumble.android.BuildConfig
import dev.crumble.android.generated.BotAvatarDefinition
import dev.crumble.android.generated.LearnedChange
import dev.crumble.android.generated.MemorySource
@@ -12,31 +13,12 @@ import dev.crumble.android.generated.ScriptRun
import dev.crumble.android.generated.SkillPackage
import dev.crumble.android.generated.BotRequest
import dev.crumble.android.generated.CallRequest
-import dev.crumble.android.generated.Credential
import dev.crumble.android.generated.CredentialRequest
import dev.crumble.android.generated.Credentials
-import dev.crumble.android.generated.Login
import dev.crumble.android.generated.LoginRequest
import dev.crumble.android.generated.Logins
import dev.crumble.android.generated.PasswordManager
-import dev.crumble.android.generated.Provider
-import dev.crumble.android.generated.ProviderLoginSession
import dev.crumble.android.generated.Capabilities
-import dev.crumble.android.generated.GitHubAccount
-import dev.crumble.android.generated.GitHubApp
-import dev.crumble.android.generated.JudgeModel
-import dev.crumble.android.generated.JudgeModelJudgeModel
-import dev.crumble.android.generated.PluginSetting
-import dev.crumble.android.generated.PluginSettings
-import dev.crumble.android.generated.SecretStatus
-import dev.crumble.android.generated.AdminUser
-import dev.crumble.android.generated.Invite
-import dev.crumble.android.generated.ListOutdatedWorkspacesResponseWorkspacesItem
-import dev.crumble.android.generated.OptionalField
-import dev.crumble.android.generated.ServerSettings
-import dev.crumble.android.generated.UpdateServerSettingsRequest
-import dev.crumble.android.generated.VisionModel
-import dev.crumble.android.generated.VisionModelVisionModel
import dev.crumble.android.generated.CodingJob
import dev.crumble.android.generated.GroupChat
import dev.crumble.android.generated.HeldAction
@@ -48,7 +30,6 @@ import dev.crumble.android.network.UrlConnectionTransport
import dev.crumble.android.network.domain
import dev.crumble.android.network.edited
import dev.crumble.android.network.friendlyError
-import dev.crumble.android.network.oauthResult
import dev.crumble.android.storage.CredentialStore
import dev.crumble.android.storage.InMemoryCredentialStore
import dev.crumble.android.ui.BotState
@@ -70,10 +51,8 @@ import kotlinx.coroutines.currentCoroutineContext
import kotlinx.coroutines.delay
import kotlinx.coroutines.isActive
import kotlinx.coroutines.launch
-import kotlinx.serialization.builtins.ListSerializer
import kotlinx.serialization.json.JsonArray
import kotlinx.serialization.json.JsonElement
-import kotlinx.serialization.json.JsonObject
import kotlinx.serialization.json.JsonNull
import kotlinx.serialization.json.JsonPrimitive
import kotlinx.serialization.json.encodeToJsonElement
@@ -84,10 +63,7 @@ val WORKSPACE_PAGES: List get() = listOf(Route.Memory, Route.Tasks, Route
/** The website's settings sections, grouped the way Android's Settings groups its rows. */
val SETTINGS_GROUPS: List> get() = listOf(
listOf(Route.General),
- listOf(Route.Providers, Route.JudgeModel, Route.VisionModel, Route.WebSearch),
- listOf(Route.Credentials, Route.Logins, Route.PasswordManagers),
- listOf(Route.Integrations, Route.Coding, Route.MessageGateways, Route.EventRelay),
- listOf(Route.Skills, Route.Avatars, Route.Users),
+ listOf(Route.Skills, Route.Avatars),
)
val SETTINGS_PAGES: List get() = SETTINGS_GROUPS.flatten()
@@ -99,20 +75,7 @@ sealed class Route {
data object Skills : Route()
data object Tasks : Route()
data object Activity : Route()
- data object Integrations : Route()
data object Avatars : Route()
- data object Providers : Route()
- data object PasswordManagers : Route()
- data object Credentials : Route()
- data object Logins : Route()
- data object WebSearch : Route()
- data object JudgeModel : Route()
- data object VisionModel : Route()
- data object Coding : Route()
- data object Users : Route()
- data object MessageGateways : Route()
- data class MessageGateway(val id: String) : Route()
- data object EventRelay : Route()
data object Settings : Route()
data object General : Route()
data object Account : Route()
@@ -124,7 +87,6 @@ sealed class Route {
get() = when {
this in SETTINGS_PAGES -> Settings
this in WORKSPACE_PAGES || this == Settings -> Account
- this is MessageGateway -> MessageGateways
this == NewGroup -> NewChat
else -> null
}
@@ -137,20 +99,7 @@ sealed class Route {
Skills -> "Skills"
Tasks -> "Automations"
Activity -> "Activity"
- Integrations -> "Integrations"
Avatars -> "Avatars"
- Providers -> "Providers"
- PasswordManagers -> "Password managers"
- Credentials -> "Credentials"
- Logins -> "Logins"
- WebSearch -> "Web search"
- JudgeModel -> "Judge model"
- VisionModel -> "Vision model"
- Coding -> "Coding"
- Users -> "Users"
- MessageGateways -> "Message gateways"
- is MessageGateway -> "Message gateway"
- EventRelay -> "Event relay"
Settings -> "Settings"
General -> "General"
Account -> "Account"
@@ -242,21 +191,6 @@ data class TaskDraft(
var enabled: Boolean = true,
)
-data class MCPDraft(
- val id: UUID = UUID.randomUUID(),
- val serverID: String,
- /** The bot a new server belongs to, or null for a shared one; fixed once the server exists. */
- var agentID: String? = null,
- var name: String = "",
- var url: String = "",
- var token: SecretDraft = SecretDraft(),
- var enabled: Boolean = true,
- var clientID: String = "",
- var clientSecret: SecretDraft = SecretDraft(),
- /** A changed password manager reference is read before anything is saved, so the sheet waits for it. */
- var saving: Boolean = false,
-)
-
private fun defaultAppScope(): CoroutineScope {
val dispatcher = try {
// Test if Main dispatcher is available in this environment
@@ -272,7 +206,6 @@ private const val DECISION_POLL_MS = 5_000L
private const val CALL_TRANSCRIPT_POLL_MS = 2_000L
private const val CALL_TRANSCRIPT_PAGE_SIZE = 200
private const val BOT_STATUS_POLL_MS = 5_000L
-private const val PROVIDER_LOGIN_POLL_MS = 1_000L
private const val JOB_REFRESH_MS = 3_000L
private const val IDLE_JOB_REFRESH_MS = 15_000L
private const val DESKTOP_STATUS_MS = 10_000L
@@ -290,7 +223,6 @@ private const val BOT_RECORD = "agent:"
private const val GROUP_RECORD = "group:"
private const val MEMORY_RECORD = "memory:"
private const val SCHEDULE_RECORD = "schedule:"
-private const val MCP_RECORD = "mcp:"
private const val SKILL_RECORD = "skill:"
private const val BOT_SKILL_RECORD = "agent-skill:"
@@ -585,7 +517,6 @@ class AppModel(
var memoryDraft by mutableStateOf(null)
var taskDraft by mutableStateOf(null)
var eventSourceDraft by mutableStateOf(null)
- var mcpDraft by mutableStateOf(null)
var skillDraft by mutableStateOf(null)
var showingPalette by mutableStateOf(false)
var theme by mutableStateOf(ThemeChoice.of(credentials.read(THEME_KEY)) ?: ThemeChoice.System)
@@ -602,70 +533,44 @@ class AppModel(
var notificationsAllowed by mutableStateOf(true)
var botCredentials by mutableStateOf