Open
Conversation
Refactor all resource types (agent, memory, credential, gateway, gateway-target) into self-contained primitive classes that own the full add/remove lifecycle. Each primitive extends BasePrimitive and implements add(), remove(), previewRemove(), getRemovable(), and registerCommands(). Primitives absorb scattered operation functions and register their own CLI subcommands via a registry loop.
…e issues Absorb gateway integration changes from main into the primitive architecture: - Update GatewayPrimitive with unassigned targets, OAuth auto-credential, allowedScopes - Update GatewayTargetPrimitive with mcp-tool→gateway-target rename and external endpoints - Update CredentialPrimitive with OAuth2 discriminated union, managed credential protection, gateway target reference checking, and hyphen→underscore env var fix - Remove VPC-related code from AgentPrimitive (removed upstream) - Break circular dependency: validate.ts no longer imports from primitive registry - Delete obsolete test files for absorbed modules, fix test mocks and expectations
Test project accidentally included in the primitive architecture commit.
Contributor
Coverage Report
|
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
Introduces
BasePrimitive— an abstract base class that all resource types (agent, memory, credential, gateway, gateway-target) extend. Each primitive is a self-contained class insrc/cli/primitives/that owns the full add/remove lifecycle for its resource type.add(),remove(),previewRemove(),getRemovable(),registerCommands(),addScreen()handleAddAgent,handleCreatePath,handleByoPath,removeAgentcreateMemory,removeMemory,getRemovableMemoriescreateCredential,removeCredential,resolveCredentialStrategy; adds OAuth2 discriminated union, managed credential protection, gateway target reference checkingcreateGatewayFromWizard,removeGateway; adds unassigned targets, OAuth auto-credential, allowedScopescreateToolFromWizard,removeMcpTool(nowremoveGatewayTarget); adds external endpoint supportregistry.ts) exports singleton instances andALL_PRIMITIVESarrayadd,remove) are now thin wrappers that delegate to primitives viaregisterCommands()Test plan
tsc --noEmit)agentcore add agentinteractive flow generates code + updates agentcore.jsonagentcore add memory --name test --strategies SEMANTIC --jsonproduces correct outputagentcore remove memory --name test --jsonremoves memoryagentcore addshows all resource types with working wizards