feat(core,cli): lifecycle hooks, @Controller decorator, and agent-skills installer with auto-upgrade#52
Open
hemantj-cloud wants to merge 13 commits into
Open
Conversation
… and teardown phases
…efix tool names
…dd custom TTY prompts
…ing createAgentDescriptor function and async command checking
… agent descriptors
…ing in upgrade command
e022fdb to
bfdd33e
Compare
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.
Description
This PR lands three coordinated features across the
coreandclipackages: NestJS-style lifecycle hooks, an@Controllerdecorator with tool-name prefixing, and a full agent-skills installer (with automatic upgrades) supporting 13 AI coding agents across project/global scopes. It also refines the Streamable HTTP transport UI and trims an unused dependency.Type of Change
Related Issues
Changes Made
Core Package (
packages/core)core/lifecycle.ts,core/server.ts, andcore/index.ts:OnModuleInit,OnApplicationBootstrap,OnModuleDestroy,BeforeApplicationShutdown,OnApplicationShutdown).instantiateAll).enableShutdownHooks) and guarantees clean, ordered teardown.triggerLifecycleHookand the lifecycle hook types fromcore/index.ts.core/decorators.ts,core/builders.ts, andcore/di/container.ts:@Controller(prefix | { prefix })to auto-register classes and support namespaces (tool prefixing) without mutating shared metadata.ControllerDecorator,getControllerPrefix,getInitialToolMetadata, and theControllerOptionstype fromcore/index.ts.core/decorators.ts,core/di/injectable.decorator.ts,core/events/event.decorator.ts, andcore/pipes/pipe.decorator.ts:core/transports/streamable-http.ts:cursor: pointerattributes, redundant focus classes, and unused hover styles from HTML/CSS mockups.better-sqlite3/@types/better-sqlite3dependency and its NOTICE attribution fromcore,cli, andwidgetspackages.@Controllertool prefixing insrc/core/__tests__/server.test.ts,src/core/__tests__/server.extended.test.ts,src/core/__tests__/di.test.ts, andsrc/core/decorators/__tests__/decorators.test.ts.CLI Package (
packages/cli)src/skills/...:createAgentDescriptorfactory/helper to reduce boilerplate and structure command/directory presence detection.initnow installs agent skills unconditionally (no more yes/no prompt) viarunSkillsFlow; adds a--forceflag to overwrite existing skill files.src/commands/upgrade.ts:nitrostack.skillsVersionfield in the project'spackage.json.upgrade, clones the skills repo, compares versions, and reinstalls skills when a newer version is available (supports--dry-run).src/commands/init.tsandsrc/index.ts:promptYesNoHorizontal) and vertical scope prompts.initflow to remove a redundant dependency installation prompt.src/__tests__/skills.test.ts.src/__tests__/upgrade.test.tscovering skill-upgrade version comparison and install logic.Testing
npm run lintnpm testJest suites cover the lifecycle runner,
@Controller, DI eager instantiation, the CLI skills flow, and the new skills-upgrade logic.Checklist
CONTRIBUTING.md