Skip to content

Commit 6fef79a

Browse files
snowzlmbotsteipete
andauthored
feat(android): add Skill Workshop settings panel (#101911)
* feat(android): add Skill Workshop settings * fix(android): scope Skill Workshop state by agent * fix(android): confirm Skill Workshop proposal actions * fix(android): strengthen Skill Workshop action proof gates * fix(android): satisfy Skill Workshop action ktlint * fix(android): serialize Skill Workshop lifecycle actions * chore(android): refresh native i18n inventory --------- Co-authored-by: snowzlmbot <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
1 parent c9ec548 commit 6fef79a

10 files changed

Lines changed: 2152 additions & 216 deletions

File tree

apps/.i18n/native-source.json

Lines changed: 496 additions & 216 deletions
Large diffs are not rendered by default.

apps/android/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ OpenClaw Android is the officially released Google Play app. It connects to an O
1818
- [x] Authenticated background presence beacons
1919
- [x] Voice tab full functionality
2020
- [x] Screen tab full functionality
21+
- [x] Skill Workshop settings can filter proposals, inspect proposal content, and apply/reject/quarantine drafts through Gateway RPCs
2122

2223
## Open in Android Studio
2324

apps/android/app/src/main/java/ai/openclaw/app/MainViewModel.kt

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ class MainViewModel(
158158
val gatewayConnectionProblem: StateFlow<GatewayConnectionProblem?> = runtimeState(initial = null) { it.gatewayConnectionProblem }
159159
val gatewayConnectionDisplay: StateFlow<GatewayConnectionDisplay> =
160160
runtimeState(initial = GatewayConnectionDisplay(false, "Offline", null)) { it.gatewayConnectionDisplay }
161+
val operatorAdminScopeAvailable: StateFlow<Boolean> = runtimeState(initial = false) { it.operatorAdminScopeAvailable }
161162
val serverName: StateFlow<String?> = runtimeState(initial = null) { it.serverName }
162163
val remoteAddress: StateFlow<String?> = runtimeState(initial = null) { it.remoteAddress }
163164
val gatewayVersion: StateFlow<String?> = runtimeState(initial = null) { it.gatewayVersion }
@@ -184,6 +185,13 @@ class MainViewModel(
184185
val skillsSummary: StateFlow<GatewaySkillsSummary> = runtimeState(initial = GatewaySkillsSummary(skills = emptyList())) { it.skillsSummary }
185186
val skillsRefreshing: StateFlow<Boolean> = runtimeState(initial = false) { it.skillsRefreshing }
186187
val skillsErrorText: StateFlow<String?> = runtimeState(initial = null) { it.skillsErrorText }
188+
val skillWorkshopSummary: StateFlow<GatewaySkillWorkshopSummary> =
189+
runtimeState(initial = GatewaySkillWorkshopSummary(proposals = emptyList())) { it.skillWorkshopSummary }
190+
val skillWorkshopRefreshing: StateFlow<Boolean> = runtimeState(initial = false) { it.skillWorkshopRefreshing }
191+
val skillWorkshopErrorText: StateFlow<String?> = runtimeState(initial = null) { it.skillWorkshopErrorText }
192+
val skillWorkshopNoticeText: StateFlow<String?> = runtimeState(initial = null) { it.skillWorkshopNoticeText }
193+
val skillWorkshopInspectingProposalId: StateFlow<String?> = runtimeState(initial = null) { it.skillWorkshopInspectingProposalId }
194+
val skillWorkshopMutatingProposalId: StateFlow<String?> = runtimeState(initial = null) { it.skillWorkshopMutatingProposalId }
187195
val nodesDevicesSummary: StateFlow<GatewayNodesDevicesSummary> =
188196
runtimeState(initial = GatewayNodesDevicesSummary(nodes = emptyList(), pendingDevices = emptyList(), pairedDevices = emptyList())) { it.nodesDevicesSummary }
189197
val nodesDevicesRefreshing: StateFlow<Boolean> = runtimeState(initial = false) { it.nodesDevicesRefreshing }
@@ -711,6 +719,46 @@ class MainViewModel(
711719
ensureRuntime().refreshSkills()
712720
}
713721

722+
fun refreshSkillWorkshopProposals(agentId: String? = null) {
723+
ensureRuntime().refreshSkillWorkshopProposals(agentId = agentId)
724+
}
725+
726+
fun resetSkillWorkshopAgentScope(agentId: String? = null) {
727+
ensureRuntime().resetSkillWorkshopAgentScope(agentId = agentId)
728+
}
729+
730+
fun inspectSkillWorkshopProposal(
731+
proposalId: String,
732+
agentId: String? = null,
733+
) {
734+
ensureRuntime().inspectSkillWorkshopProposal(proposalId = proposalId, agentId = agentId)
735+
}
736+
737+
fun applySkillWorkshopProposal(
738+
proposalId: String,
739+
agentId: String? = null,
740+
) {
741+
ensureRuntime().applySkillWorkshopProposal(proposalId = proposalId, agentId = agentId)
742+
}
743+
744+
fun rejectSkillWorkshopProposal(
745+
proposalId: String,
746+
agentId: String? = null,
747+
) {
748+
ensureRuntime().rejectSkillWorkshopProposal(proposalId = proposalId, agentId = agentId)
749+
}
750+
751+
fun quarantineSkillWorkshopProposal(
752+
proposalId: String,
753+
agentId: String? = null,
754+
) {
755+
ensureRuntime().quarantineSkillWorkshopProposal(proposalId = proposalId, agentId = agentId)
756+
}
757+
758+
fun clearSkillWorkshopMessage() {
759+
ensureRuntime().clearSkillWorkshopMessage()
760+
}
761+
714762
fun refreshNodesDevices() {
715763
ensureRuntime().refreshNodesDevices()
716764
}

0 commit comments

Comments
 (0)