tpmjs/packages/types/src
Ajax Davis 7d9321d9c6 feat: allow public access to agents and collections with caller credentials
Users can now access other users' PUBLIC agents and collections by providing
their own credentials in the request:

For agents:
- Provide `providerApiKey` for LLM access
- Provide `env` object with tool environment variables
- Owner's stored credentials are never shared

For collections (MCP):
- Provide `env` in params for tool environment variables
- Owner's stored credentials are never shared

Returns clear errors listing missing required env vars if not provided.

Files changed:
- packages/types/src/agent.ts: Add providerApiKey to SendMessageSchema
- apps/web/src/lib/agents/env-helpers.ts: New helper functions for env vars
- apps/web/src/lib/agents/build-tools.ts: Accept callerEnvVars parameter
- apps/web/src/app/api/agents/[id]/conversation/[conversationId]/route.ts:
  Allow public agent access with caller credentials
- apps/web/src/lib/mcp/handlers.ts: Accept callerEnvVars, validate requirements
- apps/web/src/app/api/mcp/[username]/[slug]/[transport]/route.ts:
  Allow public collection access, pass isOwner flag
- apps/web/src/app/docs/platform-guide/page.tsx: Update access model docs
2026-01-16 14:59:00 +10:00
..
agent.ts feat: allow public access to agents and collections with caller credentials 2026-01-16 14:59:00 +10:00
collection.ts feat(collections): add AI-generated use cases 2026-01-16 02:33:57 +10:00
executor.ts feat: add hot-swappable executor support for collections and agents 2026-01-09 00:19:22 +10:00
registry.ts feat: add complete monorepo structure and all packages 2025-11-25 21:59:40 +10:00
tool.ts feat: upgrade to AI SDK v6 beta and Zod v4 to fix tool schema errors 2025-11-30 19:14:01 +10:00
tpmjs.ts refactor: replace exportName with name throughout codebase 2026-01-14 14:18:36 +10:00
user.ts feat: add usernames, pretty URLs, cloning, and sharing docs 2026-01-08 20:47:08 +10:00