Skip to content

simple mode: KiroCrew default, curated pack list with UI hints - #81

Merged
royosherove merged 9 commits into
mainfrom
feat/kirocrew-default-simple
Aug 16, 2026
Merged

simple mode: KiroCrew default, curated pack list with UI hints#81
royosherove merged 9 commits into
mainfrom
feat/kirocrew-default-simple

Conversation

@royosherove

Copy link
Copy Markdown
Member

Changes

  • KiroCrew is now the default selection in simple mode
  • Simple mode shows only 7 curated packs: KiroCrew, OpenClaw, Hermes, Claude Code, Codex CLI, Kiro CLI, Troika
  • KiroCrew labeled [WebUI], all others labeled [Terminal]
  • Advanced mode unchanged (still shows all packs, defaults to OpenClaw)

Why

KiroCrew includes a web dashboard out of the box — the best default for users who want a visual interface. Terminal-only packs are still available but clearly labeled.

- KiroCrew is now the default selection in simple mode
- Simple mode shows only: KiroCrew, OpenClaw, Hermes, Claude Code, Codex, Kiro-CLI, Troika
- KiroCrew labeled [WebUI], all others labeled [Terminal] (as prefix for scannability)
- Advanced mode unchanged (still shows all packs, defaults to OpenClaw)

Review fixes (Sol + Sonnet):
- M1: Iterate simple_packs in declared order, not registry order
- M2: Fallback to first item if default pack missing from registry
- M3: AUTO_YES non-interactive auto-selects kirocrew without gum
- L1: webui_packs array for extensibility (not hardcoded if/else)
- L2: Hoisted local declarations out of loop
- L3: UI type as prefix [WebUI]/[Terminal] for visual scanning
- Fix PACK_NAME extraction to strip prefix labels
@royosherove
royosherove force-pushed the feat/kirocrew-default-simple branch from 0ddd284 to a6625f1 Compare August 16, 2026 09:58

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a6625f114a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread install.sh Outdated
Comment on lines +1912 to +1913
if [[ "$INSTALL_MODE" == "simple" && "$AUTO_YES" == true ]]; then
PACK_NAME="kirocrew"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve a credential-free unattended default

When the installer is invoked with bare -y and no --pack or --kiro-from-secret, this branch now selects KiroCrew, while the later credential collection is skipped whenever AUTO_YES=true (install.sh:3179-3182). The KiroCrew installer explicitly reports that Kiro authentication is required without an API key (packs/kirocrew/install.sh:709-713), so the documented unattended path completes with a dashboard whose agent cannot execute work until someone manually connects and performs device-flow login. Keep an IAM-authenticated pack as the credential-free -y default, or require/provision Kiro credentials before automatically selecting KiroCrew.

Useful? React with 👍 / 👎.

Comment thread install.sh Outdated
Comment on lines +1923 to +1926
PACK_NAME="openclaw"
warn "kirocrew not found in registry — falling back to openclaw"
fi
ok "Agent: ${PACK_NAME} (auto-selected)"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Warn when auto-selecting the experimental pack

For bare non-interactive installs, this early return bypasses both existing experimental-warning paths even though kirocrew is marked experimental: true in the registry. Interactive users see (experimental) and explicit --pack kirocrew users receive the rough-edges warning, but unattended users—the only users who do not choose the pack themselves—are silently moved from the stable OpenClaw default to an experimental pack. Consult PACK_EXPERIMENTAL before returning so this default change is visible in automation logs.

Useful? React with 👍 / 👎.

Pack-agnostic design for configure_webui_auth():
- Cognito Managed Login + PKCE (no client secret)
- AdminCreateUserOnly (no self-signup)
- Server-side JWT enforcement requirements
- Reusable by any future WebUI pack
- Security considerations, edge cases, cleanup plan

Incorporates Sol review feedback on:
- C1: Enforcement defined (JWT validation on all endpoints)
- C2: OAuth flow clarified (auth-code + PKCE, not SRP)
- C3: App client created for both new and existing pools
- C4: No-auth gated on network isolation
- C5: HTTPS required for remote access
- Add experimental warning in AUTO_YES auto-select path
- Validate openclaw fallback exists (fail clearly if neither default found)
- Declare wp local (prevent scope leak)
- Guard against empty gum_items with clear error message

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: abacc957ff

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/design/kirocrew-webui-auth.md Outdated
aws cognito-idp create-user-pool-client \
--user-pool-id "${POOL_ID}" \
--client-name "${pack_name}-webui" \
--generate-secret # ← NO: public client, no secret

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove the secret-generating flag from the sample

When this documented snippet is executed, the inline comment terminates the continued shell command, so the AWS invocation ends after --generate-secret; it creates a secret-bearing client, and the following --no-generate-secret line runs as a separate command and fails. This contradicts the public-client PKCE design and prevents all subsequent OAuth settings from being applied, so move the explanation outside the command and retain only --no-generate-secret.

Useful? React with 👍 / 👎.

KiroCrew is now the default in simple mode — no longer experimental.
- Update registry.yaml (source of truth) for kirocrew experimental=false
- Regenerate registry.json via sync script
- Fix invalid CLI options in design doc (remove --allowed-o-auth-flows-with-pkce,
  remove contradictory --generate-secret)
- Fix fail-open: pack must fail clearly if it lacks auth enforcement
- All tests pass locally (sync: 46/46, contracts: 177/177)
@royosherove
royosherove force-pushed the feat/kirocrew-default-simple branch from 502c215 to a473722 Compare August 16, 2026 11:08

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a473722321

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/design/kirocrew-webui-auth.md Outdated
Comment on lines +150 to +151
--allowed-o-auth-flows code \
--allowed-o-auth-scopes openid email \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Enable OAuth for the Cognito app client

When this provisioning command is used, the client does not opt in to Cognito's OAuth authorization-server features, so the documented Managed Login authorization-code flow cannot work despite specifying code, scopes, and callback URLs. The AWS CLI reference states that --allowed-o-auth-flows-user-pool-client must be set to use OAuth 2.0 features; add that flag as the repository's existing Cognito example does.

Useful? React with 👍 / 👎.

Comment thread docs/design/kirocrew-webui-auth.md Outdated
Comment on lines +196 to +198
import secrets, string
alphabet = string.ascii_letters + string.digits + '!@#$%&*'
print(''.join(secrets.choice(alphabet) for _ in range(16)))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Guarantee every required password character class

When the generated password happens to omit a category, admin-set-user-password rejects it because the pool policy above requires uppercase, lowercase, numeric, and symbol characters. Drawing all 16 characters independently from the combined alphabet has about a 22% chance of missing at least one required category, making initial-user provisioning intermittently fail; generate one character from each class and shuffle the result instead.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a45e315860

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread install.sh Outdated
--user-pool-tags "loki:managed=true,loki:pack=${pack_name},loki:env=${ENV_NAME}" \
--region "$DEPLOY_REGION" --output json 2>/dev/null) \
|| fail "Cognito user pool creation failed; verify cognito-idp permissions."
pool_id=$(echo "$pool_json" | json_field Id)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Parse the nested Cognito response objects

When auth setup creates a new pool, create-user-pool returns the ID under .UserPool.Id, but json_field Id reads the nonexistent top-level .Id, so pool_id becomes null and app-client creation fails. The existing-pool path also cannot complete because line 2202 similarly reads .ClientId instead of .UserPoolClient.ClientId; parse both nested response fields so every auth-enabled installation does not terminate after creating partial Cognito resources.

Useful? React with 👍 / 👎.

Comment thread install.sh
Comment on lines +2232 to +2234
export WEBUI_AUTH_ENABLED="true" WEBUI_COGNITO_POOL_ID="$pool_id" WEBUI_COGNITO_CLIENT_ID="$client_id"
export WEBUI_COGNITO_DOMAIN="${domain_prefix}.auth.${DEPLOY_REGION}.amazoncognito.com"
export WEBUI_COGNITO_REGION="$DEPLOY_REGION" WEBUI_CALLBACK_URL="$callback_url" WEBUI_LOGOUT_URL="$logout_url"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Pass the Cognito configuration into the deployment

When this function succeeds, these exports exist only in the local installer process: they are absent from PARAM_CFN_NAMES/PARAM_VALUES, the CloudFormation userdata, and the KiroCrew pack, and a repository-wide search finds no consumer outside this function. Consequently the deployed gateway cannot know the pool, client, or domain, so the newly printed Cognito credentials never authenticate to the WebUI even though the installer reports it as protected.

Useful? React with 👍 / 👎.

Comment thread install.sh Outdated
Comment on lines +2195 to +2196
--supported-identity-providers COGNITO --allowed-o-auth-flows code \
--allowed-o-auth-scopes openid email --callback-urls "[\"${callback_url}\"]" \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Enable OAuth on the created app client

When this executable provisioning path is used for Managed Login, it configures authorization-code flows and scopes but omits --allowed-o-auth-flows-user-pool-client, which the AWS CLI documentation requires to activate OAuth 2.0 features for the client. Thus the authorization endpoint cannot run the intended code flow; the fresh evidence beyond the earlier documentation finding is that the same omission is now present in the actual installer command.

Useful? React with 👍 / 👎.

Comment thread install.sh
Comment on lines +2135 to +2136
local callback_url="http://localhost:${webui_port}${callback_path}"
local logout_url="http://localhost:${webui_port}/"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Register the deployed dashboard callback URL

For the normal KiroCrew CloudFormation deployment, deploy/cloudformation/template.yaml:632-667 exposes the dashboard through an HTTPS CloudFront distribution, but this app client registers only a callback on http://localhost:5476. A user beginning login from the deployed dashboard is therefore redirected to port 5476 on their own machine instead of back to the deployment, so the Cognito flow cannot complete unless they independently establish and use a local tunnel.

Useful? React with 👍 / 👎.

Comment thread install.sh Outdated
fail "Invalid --webui-email value: ${user_email}"
fi
local password
password=$(python3 -c 'import secrets,string; print("".join(secrets.choice(string.ascii_letters+string.digits+"!@#$%&*") for _ in range(16)))')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Generate a password satisfying every required class

When random selection omits any character class, admin-set-user-password rejects this password because the newly created pool requires uppercase, lowercase, numbers, and symbols. With this alphabet and 16 independent draws, that occurs about 25% of the time, after the pool, client, domain, and user have already been created; the fresh evidence beyond the earlier design-document finding is that the probabilistic generator is now executable installer code. Generate at least one character from each required class and shuffle the result.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bf0db8ca42

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread install.sh Outdated
Comment on lines +2188 to +2189
allow_admin=$(echo "$pool_cfg" | jq -r '.UserPool.AdminCreateUserConfig.AllowAdminCreateUserOnly // true')
[[ "$allow_admin" != true ]] && fail "Existing pool ${pool_id} permits self-signup; choose a pool with admin-only user creation."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Reject pools with self-registration enabled

When an existing pool explicitly has AllowAdminCreateUserOnly: false, jq's // operator treats that boolean as absent and substitutes true, so the subsequent guard accepts the pool. Any user can then self-register and obtain tokens for this public app client, violating the installer’s admin-only authentication guarantee; default only null or a missing path rather than false.

Useful? React with 👍 / 👎.

Comment thread install.sh Outdated
local ts_suffix; ts_suffix=$(date +%s | tail -c 4)
ENV_NAME="${PACK_NAME}-$((existing_count + 1))-${ts_suffix}"
LOKI_WATERMARK="$ENV_NAME"
[[ "$PACK_NAME" == "kirocrew" ]] && configure_webui_auth "$PACK_NAME" 5476 "/auth/callback"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Defer Cognito provisioning until deployment confirmation

For an interactive KiroCrew install, this call creates the pool, app client, domain, and user during configuration, before show_summary asks whether to deploy. Selecting “Change settings” reruns configuration and can provision another set, while aborting or any later quota/deployment failure leaves the first set orphaned; collect the choices here but perform these side effects only after final confirmation, as the installer already does for pack credentials.

Useful? React with 👍 / 👎.

Comment thread install.sh
--admin-create-user-config '{"AllowAdminCreateUserOnly":true}' \
--auto-verified-attributes email --username-attributes email \
--schema '[{"Name":"email","Required":true,"Mutable":true}]' \
--user-pool-tags "{\"loki:managed\":\"true\",\"loki:pack\":\"${pack_name}\",\"loki:env\":\"${ENV_NAME}\"}" \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove managed Cognito pools during uninstall

Every newly created pool is tagged as belonging to the deployment, but the repository-wide Cognito command search finds no cleanup in uninstall.sh, whose discovery and teardown are driven by the managed VPC. Consequently a normal successful uninstall deletes the stack/VPC but permanently leaves this pool, its domain, app client, and login user behind; extend teardown to discover these tags by environment and delete the Cognito resources.

Useful? React with 👍 / 👎.

- #2: Add --allowed-o-auth-flows-user-pool-client to enable OAuth/managed login
- #3: Password generation guarantees uppercase, lowercase, digit, and symbol
- #4: Defer Cognito resource creation until after user confirms deployment
      (prevents orphaned resources on cancel/change-settings)
- #5: Check for existing domain on pool before creating new one (reuse)
- #1: Write WEBUI config to SSM Parameter Store so instance can read during
      bootstrap (fixes auth enforcement gap)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dd7b27a811

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread install.sh Outdated
Comment on lines +2144 to +2145
if [[ "${AUTO_YES:-false}" == true && -z "$user_email" ]]; then
fail "WebUI auth in non-interactive mode requires --webui-email <email>"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep bare unattended installs runnable

When the installer is invoked with bare -y, choose_pack now selects KiroCrew and enables deferred WebUI auth, but this guard then unconditionally calls fail because no --webui-email was supplied, so the advertised “accept defaults; skip prompts” path never reaches deployment. Fresh evidence beyond the earlier unattended-default finding is that the newly added deferred Cognito setup now executes this mandatory-email guard before deployment; either retain a pack that needs no extra input as the unattended default or make Cognito provisioning optional without the flag.

Useful? React with 👍 / 👎.

Comment thread install.sh
Comment on lines +3453 to +3455
# Deferred WebUI auth: create Cognito resources only after user confirms deployment
if [[ "${WEBUI_AUTH_DEFERRED:-false}" == true ]]; then
configure_webui_auth "$PACK_NAME" 5476 "/auth/callback"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Provision auth only after the console stack exists

When advanced mode uses the CloudFormation Console deployment method, this call creates the pool, client, domain, and user before main invokes deploy_console, which merely opens the stack-review URL and then exits; closing that browser page therefore leaves all Cognito resources behind without any deployment. Fresh evidence after the earlier provisioning-timing finding is that the deferred block still runs before the console handoff rather than after actual stack creation; provision these resources through the stack or only after deployment can be confirmed.

Useful? React with 👍 / 👎.

P1 fixes:
- Fix jq // operator treating explicit false as absent (self-registration check)
- Add post-deploy Cognito callback URL update with CloudFront domain
- Unattended mode: fall back to openclaw (v1 = interactive wizard only)
- Non-interactive without --webui-email: skip auth gracefully (TODO for future)
- Console deploy: show manual callback URL update instructions

P2 fixes:
- Docs: add --allowed-o-auth-flows-user-pool-client to app client example
- Docs: fix password generation to guarantee all character classes

Deferred (intentional):
- Cognito cleanup on uninstall (future iteration)
- Full unattended KiroCrew support (requires --webui-email plumbing)
@royosherove
royosherove merged commit 6831641 into main Aug 16, 2026
5 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8ff6d7ada2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread install.sh
Comment on lines +3583 to +3585
cf_url=$(aws cloudformation describe-stacks --stack-name "${ENV_NAME}" \
--region "$DEPLOY_REGION" --output json 2>/dev/null \
| jq -r '.Stacks[0].Outputs[] | select(.OutputKey=="CloudFrontURL" or .OutputKey=="DashboardURL" or .OutputKey=="WebUIURL") | .OutputValue' \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Query the actual stack and dashboard output

For every CLI KiroCrew deployment with WebUI auth enabled, deploy_cfn_stack creates ${ENV_NAME}-stack, but this query asks for ${ENV_NAME}; because the script uses set -euo pipefail, the resulting describe-stacks error aborts the installer after the stack has been created and before bootstrap completion is reported. The fresh evidence beyond the earlier callback comment is this exact post-deployment lookup mismatch; additionally, the inspected template names the relevant output KiroCrewDashboardUrl, not any of the three keys selected here. Use STACK_NAME and the template's exact output key so callback registration can run.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant