You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FR]: Testing agent should run dynamic (activity-scoped) app functions in their activity #105
Dynamic app functions (@AppFunctionSignature(scope = AppFunctionMetadata.SCOPE_ACTIVITY), registered from an Activity with AppFunctionManager.registerAppFunction / handleAppFunction) can only be executed with ExecuteAppFunctionRequest.activityId set to an activity that registers them. Otherwise the platform returns ERROR_FUNCTION_NOT_FOUND.
The testing agent never sets an activity ID (ExecuteAppFunctionUseCase builds the request from the package name, function ID and parameters only), so:
In Agent Demo and Live sessions, a registered dynamic function is offered to the model (isEnabled is true while it is registered), but every call fails with FUNCTION_NOT_FOUND.
Describe the solution
Debug tab: run a dynamic function in an activity that registers it (AppFunctionState.activityIds, API 37+), with a choice when several activities register it.
Agent: for the overlay / split-screen CUJ described in Feat/dynamic function and runtime gating #94 ("put a poem into the current chat thread"), target the foreground activity, e.g. via VoiceInteractionSession.getAppFunctionActivityId. Until then, consider leaving dynamic functions out of the tools sent to the model, since calls to them can't succeed.
Additional context
Found during "Function state & tests" (#104). Related to #94 and #98.
Activity