Repository navigation
KZN-19254 - add app builder CLI commands for working with business apps - #40
Merged
Merged
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Cancellation during readPushMap with --forget can still allow writePushMap to remove the remembered target after the flow is aborted, so the write path needs an abort check.
No open issues 🎉
What changed in this PR
Adds Business App workflows to appbuilder, extending the CLI beyond plugin scaffolding and local development to preview, release, merge, rollback, and action-link management.
Changes:
- Registers Business App commands with shared interactive UI and headless controls.
- Adds Codex skill setup and shared Claude/Codex template management.
- Adds JSON identity output, OAuth storage checks, safer API redirects, and local app-state tracking.
The .copilot-docs/ reference files were unavailable, so plugin-contract verification was limited; the documentation setup workflow may not have run.
| File | Description |
|---|---|
src/ui/Working.tsx |
Extracts the shared progress indicator. |
src/ui/SessionFrame.tsx |
Shares session framing and command-exit handling. |
src/ui/SelectList.tsx |
Adds filtering and initial selection. |
src/ui/PushUI.tsx |
Adopts shared UI and cancellation handling. |
src/ui/Lines.tsx |
Extracts multiline text rendering. |
src/ui/ErrorFrame.tsx |
Shares error and choice rendering. |
src/ui/ConfirmPrompt.tsx |
Shares standard and production confirmations. |
src/ui/commandSession.ts |
Centralizes account resolution and flow controls. |
src/ui/ChoiceList.tsx |
Maps command choices to selectable items. |
src/ui/AppUI.tsx |
Renders interactive Business App workflows. |
src/templates/claude/skills/kizen-custom-block/SKILL.md |
Updates agent guidance and harness placeholders. |
src/program.ts |
Registers app and Codex setup commands. |
src/lib/whoamiCommand.ts |
Adds structured JSON identity output. |
src/lib/setupCodex.ts |
Implements Codex managed-file setup. |
src/lib/setupCodex.test.ts |
Covers Codex setup and unsafe paths. |
src/lib/setupClaude.ts |
Reuses shared agent-file management. |
src/lib/setupClaude.test.ts |
Updates skill coverage and symlink checks. |
src/lib/oauthStore.ts |
Adds storage probes and write-error classification. |
src/lib/oauthSession.ts |
Checks storage before login and refresh. |
src/lib/oauthSession.test.ts |
Covers unwritable storage and disk exhaustion. |
src/lib/oauthCommands.ts |
Shares interactivity detection and storage-error hints. |
src/lib/oauthCommands.test.ts |
Covers JSON identity and failure responses. |
src/lib/oauth.ts |
Defines actionable session-storage errors. |
src/lib/managedFiles.ts |
Validates managed paths before reading or writing. |
src/lib/managedFiles.test.ts |
Covers symlinks and invalid managed paths. |
src/lib/listSearch.ts |
Implements accent-insensitive list filtering. |
src/lib/listSearch.test.ts |
Covers filtering and original item indices. |
src/lib/kizenTypes.ts |
Extends API types for app operations. |
src/lib/kizenClient.ts |
Adds request primitives and redirect restrictions. |
src/lib/interactive.ts |
Centralizes interactive versus headless selection. |
src/lib/interactive.test.ts |
Covers terminal, automation, and flag detection. |
src/lib/gitignore.ts |
Reports whether ignore entries were written. |
src/lib/gitignore.test.ts |
Covers the write-status return value. |
src/lib/createPlugin.ts |
Includes Codex skills in new projects. |
src/lib/createPlugin.test.ts |
Verifies both scaffolded skill sets. |
src/lib/createHeadless.ts |
Clarifies marketplace versus Business App requirements. |
src/lib/createCopilotFiles.ts |
Renders shared skills for both agents. |
src/lib/createCopilotFiles.test.ts |
Covers harness-specific generated files. |
src/lib/commandCore.test.ts |
Covers credentials, write gates, and failure output. |
src/lib/businessAppPayload.ts |
Maps packaged plugins to app publish bodies. |
src/lib/businessAppPayload.test.ts |
Covers payload mapping and field filtering. |
src/lib/appState.ts |
Persists folder bases and preview state. |
src/lib/appState.test.ts |
Covers state preservation and write safeguards. |
src/lib/agentSkills.test.ts |
Validates templates and documented CLI commands. |
src/lib/agentSetup.ts |
Shares agent-file setup and staleness detection. |
src/lib/agentSetup.test.ts |
Covers managed-file staleness across agents. |
src/lib/agentHarness.ts |
Defines agent metadata and template rendering. |
src/commands/setupCodex.ts |
Exposes Codex setup options. |
src/commands/interactive.test.ts |
Covers command-level UI routing. |
src/commands/encrypt.ts |
Adds shared headless-mode selection. |
src/commands/create.ts |
Adds explicit noninteractive scaffolding control. |
src/commands/block.ts |
Adds shared headless-mode selection. |
src/commands/auth.ts |
Exposes JSON identity and login interactivity flags. |
src/commands/app.ts |
Defines Business App commands and options. |
src/__snapshots__/program.test.ts.snap |
Updates help output for new commands. |
pnpm-lock.yaml |
Locks archive and ignore-rule dependencies. |
package.json |
Bumps the version and adds dependencies. |
Review effort: Balanced
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.
Adds commands for working with business-level apps, to support the kicode agent as well as local development with Claude/Codex/etc.
New commands
appbuilder app versionsappbuilder app push--force(push despite merge conflict markers),--base-from-preview <id>(take this folder's base from your preview; only offered as an explicit choice)appbuilder app publish--force(publish despite a base conflict; never publishes a preview other than the one reviewed),--expect-preview <id>(publish only if your preview is still that source package)appbuilder app merge--release <n>,--base <n>(the release this folder was copied from, when none is recorded),--accept-live-base(record that the folder already contains Live)appbuilder app rollback <version>appbuilder app pull <version>--out <dir>(default../<api_name>-v<version>)appbuilder app actions listappbuilder app actions link [action] [object]--menu,--no-menu(default for a new link)appbuilder app actions unlink [action] [object]appbuilder app preview delete--owner. Deleting the app's only version needs--delete-app--owner <userId>,--expect-updated <ts>(delete only if the preview hasn't changed since it was reviewed),--delete-appappbuilder setup-codex.agents/skills) in a plugin--include-libChanged commands
appbuilder whoami--jsonflag prints the identity as JSONCommon to every
appcommand--yes(or confirm at a terminal).--dry-runforces one.go/fmoneed--allow-production.--jsonprints a JSON result (always headless). Each dry run includes anapplyArgvpinned to the account (and preview) it reviewed. When a decision is needed, the result lists itschoicesand the command exits 2.--env,--businessand--userpick the signed-in account.-c/--profileselect deprecated API-key credentials.--no-interactiveorAPPBUILDER_NO_INTERACTIVEforces headless.Jira: https://kizen.atlassian.net/browse/KZN-19254