Add instance management commands and easy setup#98
Draft
Conversation
- Rename `setup config` to `setup inspect` - Add `setup instance list` to view configured instances - Add `setup instance create` with interactive prompts - Add `setup instance remove` to delete instances - Add `setup instance set-active` to set default instance Extends ConfigSource interface with optional instance management methods and implements CRUD operations in DwJsonSource for managing the dw.json configs array.
- Update b2c-config skill with new command name and instance management docs - Fix reference in b2c-custom-api-development skill
Add documentation for the new optional ConfigSource methods: - listInstances, createInstance, removeInstance, setActiveInstance - credentialFields, storeCredential, removeCredential These enable plugins to provide custom instance storage (cloud config, global registry) and secure credential storage (keychain, vault).
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.
TODO:
setup clior something for initial setup (perhaps trigger when no config can be sourced and setup is run 🤔 )Summary
setup config→setup inspectsetup instance listto view all configured instancessetup instance createwith interactive prompts for creating instance configssetup instance removeto delete instance configurationssetup instance set-activeto set the default instanceArchitecture
Two Capabilities Model
The design separates two distinct capabilities that config sources can provide:
At resolution time, values merge: dw.json provides hostname + keychain provides password.
ConfigSource Interface Extension
Sources can now implement optional instance management methods:
Plugin Extensibility
Plugins can implement these methods to:
InstanceManagerclass aggregateslistInstances()from all sourcesExample plugin implementation:
This PR implements
DwJsonSourceas the first instance source. TheInstanceManagerservice aggregates instances from all sources that implementlistInstances().Implementation
ConfigSourceinterface with optional instance management and credential storage methodsDwJsonSourcefor managing theconfigs[]array in dw.jsonInstanceManagerservice class to aggregate across multiple sourcesmapNormalizedConfigToDwJson()function for reverse mappingDwJsonSourceclass for direct use by pluginsTest plan