Skip to content

Commit da44d52

Browse files
authored
feat: ask_user — structured questions from the agent with web card, channel buttons, and text answers (#109922)
* feat(gateway): add transient question runtime (question.* methods + broadcasts) * feat(agents): add blocking ask_user question tool with chat prompt delivery and text-reply claim * feat(ui): interactive in-thread question cards for ask_user * feat(channels): native tap-to-answer buttons for ask_user on Telegram, Discord, and Slack * feat(ui): unify codex and gateway question cards with interactive gateway answering * refactor(agents): collapse ask_user pending state to one registry; docs for ask_user * fix(agents): include ask_user in normal gateway runs; add question-flow control-ui e2e * test(ui): avoid credential-shaped fixture in question card test * refactor(ui): reorder stream-group context keys * fix(gateway,ui): validate question answers at resolve; reject secret/duplicate-label questions; UI retry and reconnect hardening * fix(gateway,agents): canonicalize accepted option answers; bound ask_user option labels to 64 chars * chore(ci): prune unused question exports, allowlist mobile question events, fix discord lint * chore(ci): regenerate protocol/i18n/docs/tool-display artifacts for question surface * fix(protocol): flatten QuestionRecord for native codegen; drop TS-only alias from schema registry * chore(android): regenerate ask-user localization resources * docs: regenerate docs map after rebase * fix(ci): avoid stale read-only dependency disks * test: remove stale reef lint suppression ratchet * fix(ci): keep source locale drift advisory in release gates * fix(ci): scope locale advisory handling to parity check
1 parent bab9a5e commit da44d52

143 files changed

Lines changed: 7807 additions & 327 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/setup-node-env/action.yml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,31 @@ runs:
345345
;;
346346
esac
347347
348+
sticky_marker="$STICKY_ROOT/.openclaw-deps-fingerprint"
349+
sticky_fingerprint=""
350+
sticky_snapshot_matches="false"
351+
if [ "$STICKY_DISK" = "true" ] && [ -f "$sticky_marker" ]; then
352+
sticky_fingerprint="$(<"$sticky_marker")"
353+
fi
354+
if [ "$STICKY_DISK" = "true" ] && [ -n "$sticky_fingerprint" ] &&
355+
[ "$sticky_fingerprint" = "${OPENCLAW_STICKY_DEPS_FINGERPRINT:?}" ]; then
356+
sticky_snapshot_matches="true"
357+
fi
358+
if [ "$STICKY_DISK" = "true" ] && [ "$STICKY_WRITER" != "true" ] &&
359+
[ "$sticky_snapshot_matches" != "true" ]; then
360+
# Read-only PR clones cannot refresh a stale snapshot. Installing into
361+
# that clone can saturate its ext4 device until short jobs time out.
362+
# Detach only the workspace bind; the action still discards its clone.
363+
sudo umount "$GITHUB_WORKSPACE/node_modules"
364+
rm -rf "$GITHUB_WORKSPACE/node_modules"
365+
mkdir -p "$GITHUB_WORKSPACE/node_modules"
366+
ephemeral_store="${RUNNER_TEMP:?}/openclaw-pnpm-store"
367+
mkdir -p "$ephemeral_store"
368+
export PNPM_CONFIG_STORE_DIR="$ephemeral_store"
369+
echo "PNPM_CONFIG_STORE_DIR=$ephemeral_store" >> "$GITHUB_ENV"
370+
echo "Sticky dependency snapshot is stale; using runner-local storage for this read-only run"
371+
fi
372+
348373
install_args=(
349374
install
350375
--prefer-offline
@@ -374,13 +399,7 @@ runs:
374399
ln -sfn . "$PNPM_CONFIG_MODULES_DIR/node_modules"
375400
export NODE_PATH="$PNPM_CONFIG_MODULES_DIR${NODE_PATH:+:$NODE_PATH}"
376401
fi
377-
sticky_marker="$STICKY_ROOT/.openclaw-deps-fingerprint"
378-
sticky_fingerprint=""
379-
if [ "$STICKY_DISK" = "true" ] && [ -f "$sticky_marker" ]; then
380-
sticky_fingerprint="$(<"$sticky_marker")"
381-
fi
382-
if [ "$STICKY_DISK" = "true" ] && [ -n "$sticky_fingerprint" ] &&
383-
[ "$sticky_fingerprint" = "${OPENCLAW_STICKY_DEPS_FINGERPRINT:?}" ]; then
402+
if [ "$sticky_snapshot_matches" = "true" ]; then
384403
bash "$GITHUB_ACTION_PATH/sticky-importers.sh" restore "$STICKY_ROOT" "$GITHUB_WORKSPACE"
385404
echo "Sticky dependency snapshot matches the install fingerprint; skipping pnpm install"
386405
else

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,9 +1301,6 @@ jobs:
13011301
name: control-ui-i18n
13021302
needs: [preflight]
13031303
if: needs.preflight.outputs.run_control_ui_i18n == 'true'
1304-
# Source PR drift stays advisory because the post-merge bot owns repair.
1305-
# Generated locale PRs and release CI must pass the strict catalog gate.
1306-
continue-on-error: ${{ github.event_name != 'workflow_dispatch' && needs.preflight.outputs.strict_control_ui_i18n != 'true' }}
13071304
runs-on: ${{ github.event_name == 'workflow_dispatch' && 'ubuntu-24.04' || (github.repository == 'openclaw/openclaw' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'openclaw/openclaw') && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-24.04') }}
13081305
timeout-minutes: 10
13091306
steps:
@@ -1320,6 +1317,9 @@ jobs:
13201317
use-actions-cache: ${{ github.event_name != 'workflow_dispatch' && github.repository == 'openclaw/openclaw' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'openclaw/openclaw') && 'false' || 'true' }}
13211318

13221319
- name: Check Control UI locale parity
1320+
# Source-only drift stays advisory because the post-merge bot owns
1321+
# repair. Generated locale changes and full release CI remain strict.
1322+
continue-on-error: ${{ needs.preflight.outputs.strict_control_ui_i18n != 'true' }}
13231323
run: pnpm ui:i18n:check
13241324

13251325
checks-fast-core:

apps/android/app/src/main/java/ai/openclaw/app/gateway/GatewayProtocol.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@ enum class GatewayMethod(
129129
ExecApprovalRequest("exec.approval.request"),
130130
ExecApprovalWaitDecision("exec.approval.waitDecision"),
131131
ExecApprovalResolve("exec.approval.resolve"),
132+
QuestionRequest("question.request"),
133+
QuestionWaitAnswer("question.waitAnswer"),
134+
QuestionResolve("question.resolve"),
135+
QuestionGet("question.get"),
136+
QuestionList("question.list"),
132137
PluginApprovalList("plugin.approval.list"),
133138
PluginApprovalRequest("plugin.approval.request"),
134139
PluginApprovalWaitDecision("plugin.approval.waitDecision"),
@@ -423,6 +428,8 @@ enum class GatewayEvent(
423428
VoicewakeRoutingChanged("voicewake.routing.changed"),
424429
ExecApprovalRequested("exec.approval.requested"),
425430
ExecApprovalResolved("exec.approval.resolved"),
431+
QuestionRequested("question.requested"),
432+
QuestionResolved("question.resolved"),
426433
PluginApprovalRequested("plugin.approval.requested"),
427434
PluginApprovalResolved("plugin.approval.resolved"),
428435
OpenclawApprovalRequested("openclaw.approval.requested"),

apps/android/app/src/main/java/ai/openclaw/app/i18n/NativeStringResources.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ internal val nativeStringResourceIds: Map<String, Int> =
177177
"Arguments" to R.string.native_7f816072c1c6a23b,
178178
"Ask OpenClaw anything" to R.string.native_8998824610d49175,
179179
"Ask OpenClaw to use Android capabilities." to R.string.native_e2d1ec2328a8146f,
180+
"Ask User" to R.string.native_9309a242422af6f3,
180181
"Assistant speech muted" to R.string.native_a8bbbd7231a6c191,
181182
"Assistant working" to R.string.native_e02b4aac2b335f6f,
182183
"Attach" to R.string.native_d406ade2958cb5b6,

apps/android/app/src/main/res/values-ar/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,7 @@
853853
<string name="native_92b8699dada676f9" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"كل %1$s يوم"</string>
854854
<string name="native_92c1cdfdf4cb9cf6" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"مفعّل"</string>
855855
<string name="native_92d01b120cacf65f" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"متصل وجاهز"</string>
856+
<string name="native_9309a242422af6f3" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"Ask User"</string>
856857
<string name="native_938ee8367299dc55" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"خطأ في الدردشة"</string>
857858
<string name="native_93bf9fb90d28b037" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"%1$s من %2$s"</string>
858859
<string name="native_93c59f1918d177c6" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"خطّط للعمل"</string>

apps/android/app/src/main/res/values-de/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,7 @@
853853
<string name="native_92b8699dada676f9" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"Alle %1$s Tage"</string>
854854
<string name="native_92c1cdfdf4cb9cf6" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"Aktiviert"</string>
855855
<string name="native_92d01b120cacf65f" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"Online und bereit"</string>
856+
<string name="native_9309a242422af6f3" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"Ask User"</string>
856857
<string name="native_938ee8367299dc55" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"Chatfehler"</string>
857858
<string name="native_93bf9fb90d28b037" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"%1$s von %2$s"</string>
858859
<string name="native_93c59f1918d177c6" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"Arbeit planen"</string>

apps/android/app/src/main/res/values-es/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,7 @@
853853
<string name="native_92b8699dada676f9" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"Cada %1$s d"</string>
854854
<string name="native_92c1cdfdf4cb9cf6" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"Activado"</string>
855855
<string name="native_92d01b120cacf65f" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"En línea y listo"</string>
856+
<string name="native_9309a242422af6f3" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"Ask User"</string>
856857
<string name="native_938ee8367299dc55" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"Error de chat"</string>
857858
<string name="native_93bf9fb90d28b037" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"%1$s de %2$s"</string>
858859
<string name="native_93c59f1918d177c6" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"Planifica el trabajo"</string>

apps/android/app/src/main/res/values-fa/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,7 @@
853853
<string name="native_92b8699dada676f9" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"هر %1$s روز"</string>
854854
<string name="native_92c1cdfdf4cb9cf6" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"فعال"</string>
855855
<string name="native_92d01b120cacf65f" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"آنلاین و آماده"</string>
856+
<string name="native_9309a242422af6f3" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"Ask User"</string>
856857
<string name="native_938ee8367299dc55" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"خطای چت"</string>
857858
<string name="native_93bf9fb90d28b037" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"%1$s از %2$s"</string>
858859
<string name="native_93c59f1918d177c6" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"برنامه‌ریزی کار"</string>

apps/android/app/src/main/res/values-fr/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,7 @@
853853
<string name="native_92b8699dada676f9" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"Tous les %1$s j"</string>
854854
<string name="native_92c1cdfdf4cb9cf6" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"Activé"</string>
855855
<string name="native_92d01b120cacf65f" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"En ligne et prêt"</string>
856+
<string name="native_9309a242422af6f3" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"Ask User"</string>
856857
<string name="native_938ee8367299dc55" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"Erreur de chat"</string>
857858
<string name="native_93bf9fb90d28b037" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"%1$s sur %2$s"</string>
858859
<string name="native_93c59f1918d177c6" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"Planifier le travail"</string>

apps/android/app/src/main/res/values-hi/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,7 @@
853853
<string name="native_92b8699dada676f9" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"हर %1$s दिन"</string>
854854
<string name="native_92c1cdfdf4cb9cf6" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"सक्षम"</string>
855855
<string name="native_92d01b120cacf65f" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"ऑनलाइन और तैयार"</string>
856+
<string name="native_9309a242422af6f3" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"Ask User"</string>
856857
<string name="native_938ee8367299dc55" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"चैट त्रुटि"</string>
857858
<string name="native_93bf9fb90d28b037" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"%1$s में से %2$s"</string>
858859
<string name="native_93c59f1918d177c6" formatted="false" tools:ignore="Typos,TypographyDashes,TypographyEllipsis">"काम की योजना बनाएँ"</string>

0 commit comments

Comments
 (0)