Conversation
…ead AST code
- Workbench schema endpoint now generates TypeScript interface syntax
from JSON Schema (via runtime toJSONSchema) instead of requiring
Zod source strings from the AST-extracted metadata. Falls back to
metadata strings only when no runtime schema is available.
- Add jsonSchemaToTypeScript() utility in workbench.ts that converts
JSON Schema → clean TypeScript type notation for display:
{ name: string; age: number; tags?: string[] }
- Delete findCreateAppEndPosition() from ast.ts — dead code, exported
but never imported anywhere.
- 20 new tests covering all JSON Schema → TypeScript conversions:
primitives, objects, optionals, descriptions, arrays, unions,
intersections, enums, literals, nullables, records, nested objects.
…hemaToTypeScript Address CodeRabbit review feedback: - Escape quotes, backslashes, and newlines in const/enum string values - Quote property keys that aren't valid JS identifiers (hyphens, spaces, leading digits) - 3 new test cases covering both fixes
Remove 402 lines of dead code from the AST pipeline: - Delete analyzeWorkbench() + parseConfigObject() — only imported by the dead workbench.ts file, never used in production - Delete checkFunctionUsage() — exported but never imported anywhere - Delete checkRouteConflicts() — exported but never imported anywhere - Delete WorkbenchAnalysis interface — only used by dead code - Remove WorkbenchConfig import from ast.ts (no longer needed) - Delete packages/cli/src/cmd/build/workbench.ts entirely — the whole file was dead code (getWorkbench, generateWorkbenchMainTsx, etc. are superseded by vite/workbench-generator.ts) - Remove analyzeWorkbench tests from ast.test.ts (testing dead code) ast.ts: 3,526 → 3,124 lines (402 lines removed, cumulative with previous findCreateAppEndPosition deletion)
The lifecycle generator now uses TypeScript's own type checker to
extract the setup() return type instead of walking AST literals and
guessing types from values. This handles:
- Inline setup in createApp({ setup: () => ... })
- Exported setup functions (function decl or const arrow)
- Shorthand property: createApp({ setup })
- Variable references: setup: () => someVar
- Async functions (Promise unwrapping)
- Any pattern TypeScript itself can resolve
Also extract getDevmodeDeploymentId into ids.ts (pure hash, not AST).
ast.ts consumers remaining: only parseRoute (route-discovery.ts)
…iscovery + app-router-detector
createRouter() no longer wraps Hono methods — it's now just `new Hono()`
with Agentuity's Env type. This preserves Hono's full Schema type inference
chain, enabling `typeof router` to encode all route types.
The routeId lookup (for OTel spans) and returnResponse auto-conversion that
createRouter previously did will move to entry-file middleware in a follow-up.
agent-discovery.ts: rewritten to import() agent files at build time instead
of AST-parsing with acorn-loose. The agent instance already knows its own
metadata, schemas, and evals. Schemas are now extracted as JSON Schema
strings via toJSONSchema() instead of Zod source strings via astring.
app-router-detector.ts: rewritten to use TypeScript's compiler API instead
of acorn-loose. Detects createApp({ router }) patterns for explicit routing.
Both rewrites eliminate acorn-loose/astring usage from their respective files.
Only ast.ts itself still imports acorn-loose (for parseRoute, used by
route-discovery.ts).
Tests: 18 agent-discovery tests, 8 app-router-detector tests, 8 lifecycle
tests, dev-registry-generation tests all pass. Runtime: 665 tests pass.
- Delete ast.ts (3,120 lines) — entire acorn-loose + astring AST pipeline - Delete route-migration.ts (793 lines) — file-based routing migration - Delete api-mount-path.ts (87 lines) — file-based path computation - Remove acorn-loose + astring from package.json - Remove file-based routing fallback from entry-generator.ts - Remove migration prompts from dev/index.ts and vite-bundler.ts - Remove src/api/ directory watcher from file-watcher.ts - Remove migrateRoutes CLI option - Delete 15 test files testing deleted AST/file-based routing code - Rewrite route-discovery + dev-registry tests for new architecture Net: -13,073 lines deleted, +199 lines added
- Import toForwardSlash from normalize-path.ts instead of duplicating
- Replace existsSync with Bun.file().exists() in lifecycle-generator,
app-router-detector, and agent-discovery
- Import toJSONSchema from @agentuity/schema public entry point (resolved
from user's node_modules) instead of reaching into src/ internals
- Remove createAgent substring gate — check exported value shape instead,
supporting re-exported agents
- Default createRouter S generic to BlankSchema ({}) to match Hono 4.7.13
- Migrate integration-suite, e2e-web, svelte-web, auth-package-app,
webrtc-test, nextjs-app, tanstack-start, vite-rsc-app to explicit
createApp({ router }) pattern
- Create combined router.ts files for apps with multiple route files
- Expose agent.evals on AgentRunner (was missing, breaking eval discovery)
- Deduplicate agents by name (re-exported agents from index.ts)
- Update route-metadata-nested tests for explicit routing
…estart loop
- Runtime: createApp() returns fetch/port/hostname for bun --hot to
hot-swap the server's request handler without process restart
- Runtime: skip Bun.serve() in dev mode (bun --hot manages server
via default export)
- Runtime: add idempotent OTel re-registration guard for hot reloads
- Runtime: pass cors/compression config directly to middleware instead
of lazy global lookup via getAppConfig()
- Runtime: remove getAppState/getAppConfig/setAppConfig globals
(config passed directly, app state was always {})
- Runtime: add typed _globals.ts for Symbol.for() state and globals.d.ts
for string-keyed globalThis properties, eliminating unsafe casts
- Runtime: use Symbol.for() pattern in _process-protection.ts
- Runtime: guard one-time log messages (server started, local services)
to prevent reprinting on hot reloads
- Runtime: downgrade internal port messages to debug level
- CLI: use bun --hot --no-clear-screen for backend subprocess
- CLI: remove file-watcher.ts usage, restart loop, stopBunServer,
cleanupForRestart — bun --hot handles all backend HMR
- CLI: run 'Preparing dev server' once at startup instead of on
every file change (~490 lines removed from dev/index.ts)
In production mode, startServer() already calls Bun.serve() on the configured port. Bun v1.2+ also auto-serves when the default export has fetch + port properties (added in c98ce19 for --hot support), causing a second bind attempt and EADDRINUSE. Strip fetch/port/hostname from the returned AppResult in production so only the explicit Bun.serve() is active. Dev mode keeps them for bun --hot auto-serve.
Resolve conflicts: - modify/delete: keep v2's deletions of generated files (app.ts, routes.ts), ast.ts, and route-migration.ts — superseded by v2's import-based architecture - agent-discovery.ts: keep v2's import-based version, port duplicate eval name detection from main (cab51e2) - dev/index.ts: keep v2's bun --hot version — main's file-watcher restart loop fixes (5b7f9b8) don't apply since v2 removed the restart loop Auto-merged from main: - Gateway URL fallback update (agentuity.ai → catalyst.agentuity.cloud) - Windows path fix for AI SDK patches (buildPatchFilter) - Task status aliases, sandbox events, OIDC commands, monitoring - Coder TUI updates, API reference docs, various CLI fixes
Bun --hot creates the server from the default export's properties.
Without the websocket handler, WebSocket upgrades fail with:
'To enable websocket support, set the "websocket" object in Bun.serve({})'
Add websocket from hono/bun to the AppResult (and strip it in
production alongside fetch/port/hostname).
json5 was not declared as a dependency in cli/package.json, causing a type error. Use the existing parseJSONC utility (from utils/jsonc) which handles tsconfig.json comments and trailing commas.
## @agentuity/migrate package (new) A CLI tool to migrate v1 projects to v2: - `npx @agentuity/migrate` — guided migration with codemods - Deletes `src/generated/` directory - Removes `bootstrapRuntimeEnv()` call from app.ts - Transforms routes from createRouter() mutable style to new Hono<Env>() chained - Generates src/api/index.ts and src/agent/index.ts barrels - Adds migration comments for setup/shutdown lifecycle - Guides on agentuity.config.ts deprecation - Detects frontend using removed APIs (createClient, useAPI, RPCRouteRegistry) - Runs bun install and typecheck post-migration ## agentuity.config.ts deprecation - New app-config-extractor.ts extracts analytics/workbench from createApp() - config-loader.ts emits deprecation warning when loading agentuity.config.ts - getWorkbenchConfig() now prefers runtime config from createApp() - dev/index.ts and vite-builder.ts use loadRuntimeConfig() Config consolidation in v2: - Runtime config (analytics, workbench, cors, etc.) → createApp() only - Vite config (plugins, define, render, bundle) → vite.config.ts - agentuity.config.ts → deprecated, delete entirely ## Documentation - Updated migration-guide.mdx with v1→v2 tab - Includes automated migration instructions and manual steps - Covers all breaking changes and troubleshooting
This commit consolidates several v2 improvements: ### bun-dev-server error diagnostics - Add app.ts validation to detect v1 pattern (destructuring without export default) - Capture Bun stderr/stdout and show in error messages - Add port cleanup with ensurePortAvailable() to kill orphan processes - Warn before starting if app.ts has common issues - Export validation functions for testing ### Process manager for dev mode - New ProcessManager class to track all spawned processes/servers - Ordered cleanup (LIFO for processes) - Force kill fallback after timeout - Integrated into dev/index.ts for cleanup on failure/shutdown ### Remove agentuity.config.ts support - Deleted loadAgentuityConfig from config-loader.ts - getWorkbenchConfig now only takes (dev, runtimeConfig) - no config file fallback - Users must use vite.config.ts for Vite config - Users must use createApp() for runtime config (workbench, analytics) ### Remove auto-adding React plugin - Vite no longer auto-adds @vitejs/plugin-react - Users must configure frontend framework in vite.config.ts ### Deprecate @agentuity/react - Added deprecation notice to README.md and package.json - @agentuity/auth no longer depends on @agentuity/react - AuthProvider now accepts callback props instead of relying on AgentuityProvider ### Migrate tool updates - Detect missing vite.config.ts when frontend exists - Detect deprecated @agentuity/react API usage - Detect agentuity.config.ts and suggest migration Tests: Updated workbench tests, removed define-config test (obsolete), added process-manager tests
Tests verify: - publicDir is set correctly in dev mode config - Public files are served at root paths in dev - Public files maintain directory structure - Various file types are handled correctly - Edge cases (empty folder, hidden files, subdirectories) - Integration with vite-builder functions
Add tests for dev server orchestration covering: - dev-lock.test.ts: Lockfile management, orphan process cleanup, edge cases for corrupted/missing lockfiles - ws-proxy.test.ts: Front-door TCP proxy routing decisions, error handling, URL parsing, query strings - dev-server-integration.test.ts: Full lifecycle testing, crash recovery, hot reload validation, error resilience All 60 tests pass covering: - Startup/shutdown with port cleanup - Hot reload behavior (Bun --hot, Vite HMR) - Crash recovery (SIGTERM/SIGKILL escalation) - WS proxy routing (HTTP→Vite, WS upgrade→Bun) - Error resilience (TypeScript errors, v1 patterns)
Merge main (1.0.54) into v2 branch. Resolution strategy: - Deleted files (v2): Kept v2's removal of src/generated/*, ast.ts, route-migration.ts - Dev server files: Kept v2's no-bundle architecture with bun --hot - Package versions: Took main's higher versions - New features from main: Accepted (oauth, sandbox jobs, service packages) - API docs: Took main's updated documentation Key changes merged from main: - New standalone service packages (@agentuity/db, @agentuity/email, etc.) - OAuth service support - Sandbox job commands - Updated CLI commands for all cloud services - API reference documentation updates
Since React is no longer auto-added by the CLI, each project with a frontend needs its own vite.config.ts with the appropriate plugins. Added vite.config.ts for: - apps/docs (React + Tailwind + MDX + TanStack Router) - apps/testing/e2e-web (React) - apps/testing/cloud-deployment (React) - apps/testing/integration-suite (React) - apps/testing/auth-package-app (React) - apps/testing/oauth (React) - apps/testing/webrtc-test (React) - apps/testing/svelte-web (Svelte - pending investigation for CLI build) Updated vite-builder.ts to properly merge user vite.config.ts: - User plugins now come FIRST (important for framework plugins like Svelte) - User config values are preserved unless overridden by Agentuity-specific needs - Removed mergeConfig in favor of explicit spread to avoid array merge issues Note: Svelte builds work with vite v8.0.1 building client environment for production... �[2K transforming...✓ 1 modules transformed. but fail when built through the CLI. This requires further investigation into how the Svelte plugin interacts with the CLI's build process.
…lity ## Problem Svelte 5 builds failed when invoked through CLI's programmatic viteBuild() call, but worked correctly with `bunx vite build`. The error showed the Svelte compile plugin receiving already-compiled JavaScript instead of Svelte source code. ## Root Cause Bun's module loading system has issues with Vite's plugin pipeline when importing Vite and calling build() programmatically. Certain plugins like @sveltejs/vite-plugin-svelte receive already-compiled code, possibly due to module state caching or transformation order issues. ## Solution For client builds, spawn `bun x vite build` as a subprocess instead of importing Vite and calling build() programmatically. This gives Vite complete control over its module loading and plugin execution, avoiding Bun's module system entirely. Workbench builds continue using programmatic viteBuild() since those use our own React plugin without external framework plugins. ## Additional Changes - Updated vite.config.ts for all test projects to include root and input path (required when spawning vite as subprocess) - Updated svelte-web agentuity.config.ts to v2 format (removed plugins) - Removed temporary svelte.config.js that was added during debugging ## Testing All test projects now build successfully: - apps/testing/e2e-web (React) - apps/testing/svelte-web (Svelte 5) - apps/testing/cloud-deployment (React) - apps/testing/integration-suite (React) - apps/testing/auth-package-app (React) - apps/testing/oauth (React) - apps/testing/webrtc-test (React)
The migrate package was missing from the root tsconfig.json references, causing it to not be built during CI builds.
The evals package depends on @agentuity/runtime and @agentuity/schema but was missing the TypeScript project references, causing build failures.
Since the CLI now spawns vite as a subprocess for client builds, projects need a vite.config.ts file with the proper input path. Added: - templates/_base/vite.config.ts with React plugin and input path - vite and @vitejs/plugin-react to devDependencies in package.json
When vite.config.ts sets root='.' and input='src/web/index.html', vite outputs the HTML at client/src/web/index.html instead of client/index.html. The runtime now checks both locations. This fixes cloud deployment tests that were failing because the analytics beacon injection couldn't find the HTML file.
The previous logic incorrectly fell back to process.cwd()/.agentuity/client when running from the .agentuity/ directory, resulting in a wrong path like .agentuity/.agentuity/client. Now simply uses import.meta.dir/client (where app.js runs from) and checks for index.html at both: - client/index.html (flat output) - client/src/web/index.html (nested vite output)
Extract OpenTelemetry setup from runtime into its own package. This will be composed with @agentuity/services in framework-specific implementations.
Extract service initialization from runtime into its own package. Provides kv, stream, vector, queue, email, task, schedule services. This will be composed with @agentuity/otel in framework-specific implementations.
Composes @agentuity/otel and @agentuity/services into a single
agentuity() middleware for Hono.
Usage:
import { Hono } from 'hono';
import { agentuity } from '@agentuity/hono';
const app = new Hono();
app.use('*', agentuity());
- createApp now uses agentuity() middleware from @agentuity/hono - Logger interface consolidated in @agentuity/core (removed duplicate) - Services still created via runtime's createServices() for now (thread/session providers not yet migrated)
Provides local storage implementations for development: - Runtime detection (bun, node, deno, workers) - Bun SQLite implementations for kv, stream, vector, queue, email, task - Exports interfaces so users can implement their own Users can provide custom implementations via service overrides.
- Add session event providers (local, http, json, composite) - Add evalrun event providers (local, http, json, composite) - Add local services support via @agentuity/local (optional peer dep) - Auto-select cloud vs local services based on SDK key - Export event providers and services interfaces
- createApp() now warns users to migrate to agentuity() middleware - Updated @agentuity/hono to use @agentuity/services with local support
|
The latest Agentuity deployment details.
|
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
📦 Canary Packages Publishedversion: PackagesInstallAdd to your {
"dependencies": {
"@agentuity/sandbox": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-sandbox-1.0.54-480694f.tgz",
"@agentuity/postgres": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-postgres-1.0.54-480694f.tgz",
"@agentuity/email": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-email-1.0.54-480694f.tgz",
"@agentuity/runtime": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-runtime-1.0.54-480694f.tgz",
"@agentuity/keyvalue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-keyvalue-1.0.54-480694f.tgz",
"@agentuity/task": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-task-1.0.54-480694f.tgz",
"@agentuity/schedule": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-schedule-1.0.54-480694f.tgz",
"@agentuity/opencode": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-opencode-1.0.54-480694f.tgz",
"@agentuity/auth": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-auth-1.0.54-480694f.tgz",
"@agentuity/cli": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-cli-1.0.54-480694f.tgz",
"@agentuity/vector": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-vector-1.0.54-480694f.tgz",
"@agentuity/core": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-core-1.0.54-480694f.tgz",
"@agentuity/workbench": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-workbench-1.0.54-480694f.tgz",
"@agentuity/server": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-server-1.0.54-480694f.tgz",
"@agentuity/frontend": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-frontend-1.0.54-480694f.tgz",
"@agentuity/migrate": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-migrate-1.0.54-480694f.tgz",
"@agentuity/queue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-queue-1.0.54-480694f.tgz",
"@agentuity/drizzle": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-drizzle-1.0.54-480694f.tgz",
"@agentuity/local": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-local-1.0.54-480694f.tgz",
"@agentuity/hono": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-hono-1.0.54-480694f.tgz",
"@agentuity/otel": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-otel-1.0.54-480694f.tgz",
"@agentuity/services": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-services-1.0.54-480694f.tgz",
"@agentuity/react": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-react-1.0.54-480694f.tgz",
"@agentuity/claude-code": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-claude-code-1.0.54-480694f.tgz",
"@agentuity/schema": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-schema-1.0.54-480694f.tgz",
"@agentuity/db": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-db-1.0.54-480694f.tgz",
"@agentuity/webhook": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-webhook-1.0.54-480694f.tgz",
"@agentuity/coder": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-coder-1.0.54-480694f.tgz",
"@agentuity/evals": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-evals-1.0.54-480694f.tgz"
}
}Or install directly: bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-sandbox-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-postgres-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-email-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-runtime-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-keyvalue-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-task-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-schedule-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-opencode-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-auth-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-cli-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-vector-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-core-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-workbench-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-server-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-frontend-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-migrate-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-queue-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-drizzle-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-local-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-hono-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-otel-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-services-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-react-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-claude-code-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-schema-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-db-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-webhook-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-coder-1.0.54-480694f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-480694f/agentuity-evals-1.0.54-480694f.tgz |
…kage ## TypeScript 6.0 + tsgo Migration - Update TypeScript from ^5.9.0 to ^6.0.2 - Add @typescript/native-preview for tsgo (native Go compiler) - Update build scripts to use instead of - Fix type errors caught by stricter tsgo: - websocket-manager.ts: narrow ArrayBufferView to exclude SharedArrayBuffer - react.tsx: add explicit return types for functions with unexported external types - workbench/tsconfig.json: remove deprecated baseUrl option ## New @agentuity/adapter Package Create minimal HTTP adapter package (~28KB) for service clients: - createServerFetchAdapter() - HTTP client adapter - buildClientHeaders() - auth header builder - ServiceAdapterConfig, BuildClientHeadersOptions types - redact() - sensitive data redaction utility - Logger type re-export ## Client Package Migration Update 7 service client packages to use @agentuity/adapter instead of @agentuity/server, reducing transitive bundle size from ~1.2MB to ~28KB: - @agentuity/keyvalue - @agentuity/queue - @agentuity/email - @agentuity/vector - @agentuity/webhook - @agentuity/schedule - @agentuity/task ## @agentuity/server Updates - Add @agentuity/adapter as dependency - Re-export adapter functions for backward compatibility - Update to TypeScript 6.0 and tsgo build ## @agentuity/db - Remove unnecessary @agentuity/server dependency (uses core directly) Resolves bundle size issue where users pulling a single client package would transitively get all service interfaces from @agentuity/core.
Major refactoring of service packages: 1. Rename @agentuity/otel → @agentuity/analytics - Vercel-style auto-initialization from AGENTUITY_* env vars - Lazy-loaded exports: tracer, logger, meter - Simplified API: import '@agentuity/analytics' auto-configures - sideEffects: true for auto-init on import 2. Delete @agentuity/services package - Was redundant with @agentuity/runtime's own service init - @agentuity/hono now initializes clients directly - Event providers remain in runtime/src/services/ 3. Create @agentuity/stream package - StreamClient wrapping StreamStorageService - Fills gap in dedicated client packages 4. Update @agentuity/runtime - Remove duplicate OTel implementation - Remove 14 @opentelemetry/* dependencies - Use @agentuity/analytics for telemetry - Keep otel/config.ts as backwards-compatible wrapper Package dependency changes: - @agentuity/hono: depends on analytics + dedicated clients - @agentuity/runtime: depends on analytics (removed OTel deps) This consolidates service clients into dedicated packages and simplifies the telemetry initialization pattern.
1. Rename @agentuity/analytics → @agentuity/telemetry - Server-side OTel (traces, metrics, logs) - Clear naming: 'telemetry' = infrastructure observability - Exports: tracer, logger, meter, register() 2. Simplify build scripts - Remove redundant sequential package builds - tsgo handles all package builds via project references - Build time: 30s → 3.6s for packages This distinguishes server telemetry from browser analytics: - @agentuity/telemetry → Server OTel (traces, metrics, logs) - @agentuity/frontend/analytics → Browser (page views, vitals)
- build: just packages (1.5s) - build:apps: test apps only - build:all: packages + apps This separates concerns: - Package builds are fast (tsgo) - App builds are optional (for testing) - CI can choose what to build
- New @agentuity/analytics package for browser analytics - Beacon imported directly: `import '@agentuity/analytics/beacon'` - No special serving by runtime - works with any bundler - @agentuity/frontend re-exports for backwards compatibility Package structure: - beacon.ts: Auto-initializing tracking (page views, vitals, scroll) - client.ts: Programmatic API (track, identify, flush) - config.ts: Config from window.__AGENTUITY_ANALYTICS__ - types.ts: Shared type definitions This enables standalone use in any frontend framework.
- Remove threadId from analytics payload
- Remove session.js route from runtime
- Remove session script injection from HTML
- Analytics is now fully standalone - no runtime coupling
Users who need thread context can add it themselves via:
identify(userId, { threadId: '...' })
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a new modular architecture for Agentuity, breaking the "batteries included"
@agentuity/runtimeinto composable packages. The goal is to let users choose their framework while Agentuity provides services as middleware.What Changed
New Packages
@agentuity/otel@agentuity/local@agentuity/services@agentuity/honoagentuity()middleware for HonoArchitecture
Usage
Completed Migrations
@agentuity/otelwithregisterOtel(), Logger@agentuity/core(removed duplicate)@agentuity/localwith Bun SQLite + runtime detectionagentuity()composes OTel + servicescreateApp()warns usersStrategic Questions (Open for Discussion)
These are fundamental architectural decisions that need community/team input:
1. Agent Orchestration: Build vs Integrate?
Current state:
@agentuity/runtimehas its owncreateAgent()with:ctx.invoke())Options:
@agentuity/agentsQuestions:
2. Conversation/Chat: Build vs Integrate?
Current state:
packages/runtime/src/session.ts(~2000 lines) with:Thread,SessionmanagementThreadProvider,SessionProviderinterfacesOptions:
@agentuity/chatKey consideration: Thread/Session has Hono-specific code (cookies, context). Extracting requires making Hono a peer dependency.
Questions:
3. Agent Evaluation System
Current state:
@agentuity/evalspackage with:EvalRunEventProvider(now in@agentuity/services)Options:
@agentuity/evalsQuestions:
4. Framework Adapters
Not started:
@agentuity/next- Next.js middleware@agentuity/express- Express middleware@agentuity/fastify- Fastify middlewareQuestions:
5. Local Services for Non-Bun Runtimes
Current:
@agentuity/localonly supports Bun (SQLite)Potential runtimes:
Questions:
Breaking Changes
This is a v3 breaking change with no backward compatibility guarantees:
createApp()is deprecated (will be removed)@agentuity/runtimeinternals will breakc.varin HonoDecision Timeline
@agentuity/agentsLooking for feedback on: