refactor: sunset @agentuity/runtime — remove v2 build pipeline and agent system#1367
Merged
refactor: sunset @agentuity/runtime — remove v2 build pipeline and agent system#1367
Conversation
Mark @agentuity/runtime as deprecated in package.json with migration guidance pointing to @agentuity/hono middleware. Mark @agentuity/evals as private (unpublished) — the eval system is tightly coupled to the v2 agent concept and will be rewritten from scratch with a framework-agnostic design. Code kept for reference. Decouple @agentuity/postgres from runtime: - Replace dynamic import of registerShutdownHook with standard process event listeners (beforeExit, SIGTERM, SIGINT) - Remove @agentuity/runtime from peer and dev dependencies Update CLI auth examples to show Hono patterns instead of createRouter/createAgent from the deprecated runtime. Update @agentuity/server bootstrap docs to remove runtime reference.
Move eval types (EvalContext, EvalHandlerResult, EvalHandlerResultSchema, CreateEvalConfig) from @agentuity/runtime into a local eval-types.ts within the evals package. EvalContext is simplified to just the logger interface that eval handlers actually use. - Create packages/evals/src/eval-types.ts with standalone definitions - Update all evals imports to use local types - Remove @agentuity/runtime from evals dependencies and tsconfig refs - Add zod as direct dependency (was transitive through runtime) - Export new types from evals index The evals package (already private/suspended) now has zero dependency on @agentuity/runtime. All 13 evals tests pass.
Dev command now injects OPENAI_BASE_URL, ANTHROPIC_BASE_URL, and GROQ_BASE_URL into the child process environment when AGENTUITY_SDK_KEY is set. This routes LLM SDK calls through the Agentuity AI Gateway automatically during development, matching the build-time patching behavior for production builds. The gateway injection: - Only activates when AGENTUITY_SDK_KEY is present in the environment - Respects user-provided API keys (won't override if different from SDK key) - Uses AGENTUITY_AIGATEWAY_URL or falls back to catalyst.agentuity.cloud - Supports OpenAI, Anthropic, and Groq providers Also fixes stale tests: - hmr-port-config: add required backendPort param, fix strictPort expectation (true, not false — port is pre-verified) - region: expect 4 subcommands (list was added) - Delete dead process-manager.test.ts (imports deleted source)
Remove all @agentuity/runtime source code and tests. Replace with a single index.ts that exports createApp(), createRouter(), and createAgent() as functions that throw deprecation errors pointing users to @agentuity/hono middleware. Removed: - 73 source files (19,832 lines) — agent system, router, services, WebRTC signaling, workbench, OTel, session/thread management, dev patches, logger, handlers, bootstrap - 58 test files — all runtime unit and integration tests - All runtime dependencies (hono, zod, otel, auth, analytics, frontend, schema, server, telemetry) - AGENTS.md, CONTEXT-FLOW.md, scripts/, tsconfig.test.json Also removed: - CLI agent-discovery.test.ts (508 lines) — tested v2-specific discoverAgents() which dynamically imports createAgent() What remains: - package.json with deprecated flag (still published for npm warning) - src/index.ts with 3 throwing stubs + migration docs - tsconfig.json for build 131 files changed, 51 insertions, 36,492 deletions.
…adapter Remove all v2 Agentuity-native build infrastructure. With the buildpack pipeline, frameworks use their own build tools — the vite-based build pipeline is no longer needed. Removed source (12,766 lines): - cmd/build/vite/ (22 files) — agent discovery, route discovery, metadata generator, server bundler, vite builder, workbench generator, beacon plugin, HMR config, static renderer, etc. - cmd/build/vite-bundler.ts — bridge to vite pipeline - cmd/build/adapters/agentuity.ts — agentuity native adapter - cmd/build/detect/agentuity.ts — agentuity framework detector - cmd/build/app-config-extractor.ts — createApp() config reader - cmd/build/app-router-detector.ts — app.ts router detection - cmd/build/format-schema.ts — schema formatting - agents-docs.ts — agent-specific AGENTS.md generation - cmd/ai/prompt/agent.md + agent.ts — agent prompt template Removed tests (42 files): - All vite/ test directory - agent-discovery, registry-generator, entry-generator, lifecycle-generator - app-router-detector, eval-metadata, route-metadata, metadata-version - db-rewrite, ai-gateway-bundle, ai-sdk-env-injection, llm-patching - dev-server-bundle, bundle-files, ws-proxy, region-requirements Updated: - adapters/index.ts — removed agentuity adapter registration - detect/index.ts — removed agentuity detector, simplified to framework database + generic fallback - detect/types.ts — removed agentuity special value docs - ai/prompt/index.ts — removed agent subcommand - Framework detection tests — removed agentuity-specific cases - Adapter registry tests — agentuity now falls through to generic - runtime/src/index.ts — createAgent() warns to use AI SDK instead Test health: 579 pass, 6 fail (all pre-existing TS error formatting)
Tests were hardcoding Unicode box-drawing characters (│, ╭) but the formatter uses ASCII fallbacks (|, +) in CI/agent environments. Import symbols from tui/symbols.ts so tests use the same characters as the formatter. All 13 tests now pass in both Unicode and ASCII modes. Full CLI test suite: 585 pass, 0 fail.
|
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 |
The telemetry package imports from @agentuity/server (getServiceUrls, createLogger) but was missing the tsconfig project reference. This breaks tsgo --build in CI which requires explicit references.
📦 Canary Packages Publishedversion: PackagesInstallAdd to your {
"dependencies": {
"@agentuity/db": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-db-1.0.54-665b590.tgz",
"@agentuity/claude-code": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-claude-code-1.0.54-665b590.tgz",
"@agentuity/sandbox": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-sandbox-1.0.54-665b590.tgz",
"@agentuity/stream": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-stream-1.0.54-665b590.tgz",
"@agentuity/queue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-queue-1.0.54-665b590.tgz",
"@agentuity/migrate": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-migrate-1.0.54-665b590.tgz",
"@agentuity/hono": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-hono-1.0.54-665b590.tgz",
"@agentuity/cli": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-cli-1.0.54-665b590.tgz",
"@agentuity/schedule": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-schedule-1.0.54-665b590.tgz",
"@agentuity/local": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-local-1.0.54-665b590.tgz",
"@agentuity/webhook": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-webhook-1.0.54-665b590.tgz",
"@agentuity/auth": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-auth-1.0.54-665b590.tgz",
"@agentuity/frontend": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-frontend-1.0.54-665b590.tgz",
"@agentuity/coder": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-coder-1.0.54-665b590.tgz",
"@agentuity/vector": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-vector-1.0.54-665b590.tgz",
"@agentuity/analytics": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-analytics-1.0.54-665b590.tgz",
"@agentuity/workbench": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-workbench-1.0.54-665b590.tgz",
"@agentuity/runtime": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-runtime-1.0.54-665b590.tgz",
"@agentuity/telemetry": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-telemetry-1.0.54-665b590.tgz",
"@agentuity/keyvalue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-keyvalue-1.0.54-665b590.tgz",
"@agentuity/schema": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-schema-1.0.54-665b590.tgz",
"@agentuity/adapter": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-adapter-1.0.54-665b590.tgz",
"@agentuity/postgres": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-postgres-1.0.54-665b590.tgz",
"@agentuity/react": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-react-1.0.54-665b590.tgz",
"@agentuity/email": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-email-1.0.54-665b590.tgz",
"@agentuity/drizzle": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-drizzle-1.0.54-665b590.tgz",
"@agentuity/core": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-core-1.0.54-665b590.tgz",
"@agentuity/task": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-task-1.0.54-665b590.tgz",
"@agentuity/server": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-server-1.0.54-665b590.tgz",
"@agentuity/opencode": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-opencode-1.0.54-665b590.tgz"
}
}Or install directly: bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-db-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-claude-code-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-sandbox-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-stream-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-queue-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-migrate-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-hono-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-cli-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-schedule-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-local-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-webhook-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-auth-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-frontend-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-coder-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-vector-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-analytics-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-workbench-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-runtime-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-telemetry-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-keyvalue-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-schema-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-adapter-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-postgres-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-react-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-email-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-drizzle-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-core-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-task-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-server-1.0.54-665b590.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/1.0.54-665b590/agentuity-opencode-1.0.54-665b590.tgz |
- Fix packages/server/test/server.test.ts to import from ../src/index.ts (the file ../src/server.ts never existed — pre-existing broken import) - Remove runtime from test:packages script (runtime is gutted, no tests)
The integration test was using --template-dir (removed) and expecting old template files (app.ts, AGENTS.md, @agentuity/runtime). Rewrite to use --framework hono and verify Agentuity augmentation: - @agentuity/cli devDep in package.json - deploy script - .gitignore entries
The hono package was never added to the root tsconfig.json when it was created in v3. This caused tsgo --build to skip it, resulting in missing dist/ in CI build artifact verification.
test-utils is private (source-only, never published) but had a no-op
build script ('echo No build needed') which prevented the CI build
verification from skipping it. Without a build script, the skip logic
in build-sdk.sh correctly identifies it as source-only.
The patchBunS3ForStorageDev() workaround patched Bun's S3Client to use virtual-hosted-style URLs for Agentuity storage. This is no longer needed. - Delete scripts/test-storage-runner.ts (197 lines) - Delete scripts/test-storage.ts (151 lines) - Remove storage-cli-test job from CI workflow
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
Sunset
@agentuity/runtimeand remove all v2-specific build infrastructure. With the buildpack pipeline and framework-native scaffolding in place, the Agentuity-native build path (createApp(), agents, vite pipeline) is no longer needed.Changes
Runtime sunset
createApp(),createRouter(), andcreateAgent()as throwing functions with migration guidance@agentuity/honomiddlewarecreateAgent()specifically warns users to use an AI SDK directlyDecouple dependents
@agentuity/postgres— Replace dynamicregisterShutdownHookimport with standardprocess.on("beforeExit/SIGTERM/SIGINT")handlers. Remove runtime from peer/dev deps@agentuity/evals— Move eval types locally (EvalContext,EvalHandlerResult,CreateEvalConfig). Mark asprivate: true(suspended, not published). Remove runtime dependencycreateRouter/createAgentto Hono +@agentuity/auth/clientpatterns@agentuity/server— RemovecreateApp()reference from bootstrap docsRemove v2 build pipeline (~12,800 lines)
cmd/build/vite/(22 files) — agent discovery, route discovery, metadata generator, server bundler, vite builder, workbench generator, beacon plugin, HMR config, static renderer, etc.cmd/build/vite-bundler.ts— bridge to vite pipelinecmd/build/adapters/agentuity.ts— agentuity native adaptercmd/build/detect/agentuity.ts— agentuity framework detectorcmd/build/app-config-extractor.ts,app-router-detector.ts,format-schema.ts— dead codeagents-docs.ts— agent-specific AGENTS.md generationcmd/ai/prompt/agent.md+agent.ts— agent prompt templateDev command: AI Gateway env injection
OPENAI_BASE_URL,ANTHROPIC_BASE_URL,GROQ_BASE_URLinto child process env whenAGENTUITY_SDK_KEYis setagentuity devFix pre-existing test failures
tui/symbols.tsinstead of hardcoded UnicodestrictPortexpectation and add requiredbackendPortparamTest health
585 pass, 0 fail — first time the full CLI test suite is 100% green.
Lines changed
~49,500 lines removed across 6 commits.