Skip to content

As studio production compatibility change - #137

Open
nottydadie wants to merge 8 commits into
agentscope-ai:mainfrom
nottydadie:as-studio-production-compatibility-change
Open

As studio production compatibility change#137
nottydadie wants to merge 8 commits into
agentscope-ai:mainfrom
nottydadie:as-studio-production-compatibility-change

Conversation

@nottydadie

@nottydadie nottydadie commented Aug 14, 2026

Copy link
Copy Markdown

Description

Summary

Adapts AgentScope Studio into a scalable message-delivery relay between Python AgentScope processes and concurrent mobile clients.

Key Changes
Per-run routing: User input is sent only to the owning run-${runId} room, preventing cross-tenant fan-out.
MySQL support: Configurable MySQL datasource and connection pool; SQLite remains the default.
Redis scaling: Added Socket.IO Redis adapter for cross-instance room broadcasting.
Socket hardening: 25 MB default buffer limit, configurable transports and CORS.
Logging: Removed full message payload logging from pushMessage.
Backward compatible: No env vars → existing SQLite + in-memory Socket.IO behaviour.

For MySQL + Redis, configure DB_TYPE=mysql, DB_*, and REDIS_URL. Use DB_SYNCHRONIZE=true only for initial empty-DB bootstrap.

npm install is required before building.

Friday copilot path is unchanged.

Checklist

Please check the following items before code is ready to be reviewed.

  • Code has been formatted with npm run format command in the root directory
  • Docstrings/comments are in appropriate style (TSDoc/JSDoc for TypeScript/JavaScript, Google style for Python)
  • Related documentation has been updated (e.g. links, examples, etc.)
  • Code is ready for review

sushil and others added 8 commits July 19, 2026 09:50
- Add optional callback support for client socket events.
- Implement error handling and success callbacks for user input forwarding.
- Adjust InputRequest model to simplify `runId` usage without explicit relation loading.
- Refine client-side socket emit logic with timeout and error handling.
… scaling

- Introduce `docker-compose.yml`, `Dockerfile`, and `.env.docker.example` for containerized setup.
- Enable external MySQL and Redis integration for horizontal scaling.
- Refactor socket and database initialization for production use.
- Update `.dockerignore` to exclude sensitive local environment files.
- Implement `repliesToMarkdown` utility to render replies as a Markdown transcript.
- Add `downloadTextFile` utility for triggering browser file downloads.
- Update TracingComponent with export button using Markdown-based export.
- Sort replies by creation date on the server for consistent ordering.
- Add translation strings for "export trace" in English and Chinese.
- Extend `getRunData` to support excluding span data via `includeSpans` parameter.
- Update `joinRunRoom` to allow clients to toggle trace data preference.
- Adjust socket events and emit logic to respect trace data inclusion setting.
- Modify grouped spans and model invocation data broadcasts to trace-specific rooms.
- Update `Trace` entity to use `bigint` for `startTimeUnixNano` and `endTimeUnixNano` with transformers.
- Adjust DAO methods for `bigint` handling and exact timestamp queries on `better-sqlite3`.
- Modify migration to alter `startTimeUnixNano` and `endTimeUnixNano` columns to `bigint`.
- Update `Dockerfile` to use the public `node:22.18.0` image instead of internal registry.
- Simplify npm lockfile comment and adjust `RUN` command for data directory setup.
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.

❌ sushil
❌ sushilld


sushil seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants