`host_upload_path` returns `APP_NOT_GRANTED` when debugging the official file upload demo with `anna-app dev`

Background

I am trying to debug the official Anna file upload example locally with anna-app dev:

examples/anna-app-file-upload-demo

My local development environment:

anna-app --version
0.1.30

I am logged in to the staging environment, and the current token includes the aps:dev scope:

anna-app whoami

* https://staging.anna.partners (current)
    pat:        eyJh...85CA
    user_id:    (unknown)
    scopes:     aps:dev
    expires_in: ~51d

I start the local dev dashboard from the example directory with:

anna-app dev --slug ppt-debug

The CLI output indicates that the dashboard and bridge start successfully:

anna-app dev
  manifest          anna-executa-examples/examples/anna-app-file-upload-demo/manifest.json
  bundle            anna-executa-examples/examples/anna-app-file-upload-demo/bundle/index.html
  runtime           uvx anna-app-runtime-local@0.2.0a9
  browser sdk       npm @anna-ai/app-runtime
  spawning python bridge...
  bridge ready
  executas          tool-test-file-upload-12345678
  bundled handles   file-upload-via-executa -> tool-test-file-upload-12345678
  llm bridge        real -> app_slug=ppt-debug
  storage backend   legacy (in-memory runtime_state)
  dashboard         http://localhost:5180/
  press Ctrl+C to stop
[bridge] [executa:tool-test-file-upload-12345678] host-upload-via-executa plugin started

However, when I test the “Upload a local file by path” flow in the page, host_upload_path fails. As a result, the official example cannot be fully run locally.

Reproduction Steps

  1. Enter the official example directory:
cd examples/anna-app-file-upload-demo
  1. Check the anna-app version:
anna-app --version

Current version:

0.1.30
  1. Confirm that the current login is using the staging environment and that the token includes aps:dev:
anna-app whoami
  1. Start the local dev dashboard:
anna-app dev --slug ppt-debug
  1. Open the local page:
http://localhost:5180/
  1. In the page, use “Upload a local file by path” and enter a local file path, for example:
/tmp/tiny-upload.txt
  1. Click “Upload path”.

Actual Result

The page status area shows that host_upload_path failed:

[host_upload_path] tool_failed: [-32603] HTTP 403: {"detail":{"code":-32001,"errorCode":"APP_NOT_GRANTED","message":"upload_grant not enabled"}}

The RPC log on the right side also shows the corresponding request and failed response:

req tools.invoke {
  "tool_id": "tool-test-file-upload-12345678",
  "method": "host_upload_path",
  "args": {
    "path": "/tmp/tiny-upload.txt",
    "filename": "tiny-upload.txt",
    "mime_type": "text/plain",
    "purpose": "user_artifact"
  }
}

res err tool_failed [-32603] HTTP 403: {
  "detail": {
    "code": -32001,
    "errorCode": "APP_NOT_GRANTED",
    "message": "upload_grant not enabled"
  }
}

Based on the error message, the current app / dev session does not seem to have the upload_grant required for file upload. I could not find a way to enable or grant this permission in the local anna-app dev workflow.

Expected Result

As an official example, examples/anna-app-file-upload-demo should be able to run end-to-end locally through anna-app dev. At minimum, one of the following should be true:

  1. host_upload_path uploads the local file successfully and returns a usable upload result.
  2. If this capability requires an additional grant, anna-app dev should automatically configure that grant for the local dev app.
  3. If the grant must be explicitly configured by the developer, the CLI, manifest schema, example README, or error message should clearly explain how to configure it.

Additional Finding: the official example manifest appears to be missing ui.host_api.upload

During debugging, I noticed that the official example manifest:

examples/anna-app-file-upload-demo/manifest.json

appears to be missing the ui.host_api.upload declaration. The original manifest does not declare:

"upload": ["inline", "negotiate", "confirm"]

Without this configuration, the example hits another permission-related error first. After adding it, the inline / negotiate / confirm flow appears to move further, but host_upload_path still fails with:

APP_NOT_GRANTED: upload_grant not enabled

So there may be two separate issues here:

  1. The official example’s manifest.json is missing the ui.host_api.upload declaration.
  2. Even after adding ui.host_api.upload, local debugging through anna-app dev still does not enable upload_grant, so host_upload_path cannot be used.

Additional Context: this issue was already mentioned in the forum

This APP_NOT_GRANTED / upload_grant not enabled issue does not appear to be new. A similar host upload permission issue was previously mentioned in the official Anna forum:

Based on my current test results, the issue still exists with anna-app v0.1.30 and the staging environment. In other words, even when starting anna-app dev with the official example and adding the missing ui.host_api.upload manifest configuration, host_upload_path still fails because upload_grant is not enabled.

If this is a known issue, could the Anna team please update its current status? If there is an expected configuration or workaround, it would be helpful to add it to the official example or documentation.

Impact

This issue prevents developers from using the official example to validate the Anna App / Executa file upload flow, especially for the following scenarios:

  • Debugging an app that calls an Executa to generate or upload files.
  • Verifying how host_upload_path handles local file paths.
  • Verifying the transition from inline upload to negotiate / confirm for larger files.
  • Verifying whether upload purposes such as purpose=user_artifact work correctly.

From the page and CLI logs, the bridge, dashboard, and Executa plugin all appear to start successfully. However, the actual upload capability is rejected by the platform with HTTP 403. It is difficult for a developer to determine whether the problem is caused by the manifest, the CLI dev session, staging platform grant configuration, or a missing configuration in the official example.

Questions for the Anna Team

  1. How should upload_grant, which is required by host_upload_path, be enabled when debugging locally with anna-app dev?
  2. Is ui.host_api.upload = ["inline", "negotiate", "confirm"] required for this example?
  3. Should the official examples/anna-app-file-upload-demo/manifest.json include ui.host_api.upload?
  4. Does APP_NOT_GRANTED: upload_grant not enabled mean that the staging platform did not grant this capability to the current dev app, or that the local CLI dev runtime did not request the grant correctly?
  5. The current token scope includes aps:dev, but user_id is shown as (unknown). Could this affect whether the local dev app receives upload_grant?
  6. If host_upload_path is not currently supported in local debugging through anna-app dev, could this limitation and the recommended alternative debugging workflow be documented in the official example or docs?

Evidence

I can provide the local page screenshot and full logs. The screenshot shows:

  • The local dashboard is running at http://localhost:5180/.
  • The page calls host_upload_path to upload /tmp/tiny-upload.txt.
  • The returned error is HTTP 403 / APP_NOT_GRANTED / upload_grant not enabled.
  • The RPC log on the right side shows the tools.invoke request and failed response.

Could the Anna team please confirm whether this is an example configuration issue, a CLI dev runtime issue, or a staging platform grant configuration issue, and provide the recommended setup for debugging file upload capabilities locally?