Skip to content

feat(cli): --bundle names the AfterGlow.app for the suite's assistant commands - #5794

Open
prakashUXtech wants to merge 25 commits into
devfrom
lead/cli-bundle-CB-z-bundle-flag
Open

prakashUXtech wants to merge 25 commits into
devfrom
lead/cli-bundle-CB-z-bundle-flag

Conversation

@prakashUXtech

@prakashUXtech prakashUXtech commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #5793 (on #4999).

Refs #3773
Refs #5751

What and why

Drift item #5643. The cli-bundle packet says the CLI finds the AfterGlow.app either from --bundle or from its own executable's path. Until now only the second worked: MCPConfig.bundle(flag:executable:) existed, but HelpReports.bundle always passed flag: nil, and Arguments never parsed --bundle. SuiteHelpCatalog's needsBundle message already tells people to "pass --bundle ".

  • Arguments: the command form now takes --bundle <path> as a value flag. Giving it twice or without a value is refused with usage (64). Arguments.bundled rejects it for any app other than suite, with "--bundle is only for afterglow suite's commands", and for suite swaps in Apps.suite(bundle:). Arguments.usage shows the new line: afterglow suite <command> --in <file> (--out <file> | --in-place) --bundle <AfterGlow.app> [--json '{…}'] [--force].
  • Apps.suite(bundle:): the suite's Help app, whose open passes the bundle on to HelpReports.open(_:bundle:). Apps.suite is now suite(bundle: nil) and behaves as before.
  • HelpReports: new bundleFlag: String? field (init defaults to nil), set from the file's open.
  • MCPConfig: HelpReports.bundle now calls MCPConfig.bundle(flag: bundleFlag, executable: MCPConfig.ownExecutable()).

Invocation is unchanged, and so are the MCP files (Sources/AfterGlowCLICore/MCP/*) and Tests/RealJobs/suite/connect-assistant/connect-assistant.jobs.json.

Tests

Tests/AfterGlowCLITests/BundleFlagTests.swift (Swift Testing, written first):

  • theFlagParsesAndReachesTheProvider: parsing --bundle /Applications/AfterGlow.app and running help.connect-assistant answers AssistantConnect.command(bundle:) / configJSON(bundle:) for that path.
  • theFlagIsRefusedTwiceOrWithoutAValue: both cases are usage (64).
  • otherAppsRefuseTheFlag: photo edit.copy … --bundle is usage and the message names --bundle.
  • theRunAnswersForTheNamedBundle: a full CLI.run from this test process, which is not inside a bundle, writes the answer for the named bundle.
  • withoutTheFlagConnectStaysUnavailable: without the flag the command still fails with 69 and the needsBundle message.
  • usageShowsTheFlag.

Mutate: 6/8 AfterGlowCLICore.Arguments (all 3 new entries caught. The 2 that escape are older entries that plant bugs in CLI.swift, which this PR does not touch: "an existing --out overwritten without --force" and "availability not checked before the run")
Mutate: 6/6 AfterGlowCLICore.Apps
Mutate: 3/3 AfterGlowCLICore.HelpReports (new plan)
Mutate: 2/2 AfterGlowCLICore.MCPConfig (new plan)

scripts/mutate --validate passes. scripts/ci --changed: CI: PASS.

No snapshot PNGs change.

Docs: this uses no new platform or library API (Foundation and Swift only, all already in use in these files), so I did not check the docs MCP.

Belt-Lead: act-1a178358362-etn1
Feature: cli-bundle
Slice: CB-z
Fast-Check: pass
Head: 86af25f


Generated by Claude Code

scripts/bundle-apps builds the afterglow product in release, copies it to Contents/Helpers/afterglow, checks its framework links, signs it ad hoc after the helpers, and its verify step runs the bundled afterglow --version. RJ-X62's job folder lands with platforms empty, pending CB-7.
# Conflicts:
#	Sources/AfterGlowCLICore/MCPConfig.swift
#	Sources/SuiteModel/Packaging/AssistantConnect.swift
#	Tests/AfterGlowCLITests/MCPConfigTests.swift
#	Tests/SuiteModelTests/AssistantConnectTests.swift
…ocal

# Conflicts:
#	Sources/SuiteModel/Packaging/AssistantConnectPanel.swift
#	Sources/SuiteShell/SuiteHelpCommands.swift
#	Sources/SuiteUI/AssistantConnectSheet.swift
#	Tests/AppSnapshotTests/RenderBudgetConnectTests.swift
#	Tests/AppSnapshotTests/SuiteHelpSnapshots.swift
#	Tests/RealJobs/suite/connect-assistant/connect-assistant.jobs.json
#	Tests/SuiteModelTests/AssistantConnectPanelTests.swift
#	Tests/mutations/SuiteModel.AssistantConnectPanel.json
#	UITests/AfterGlowJourneyTests+Connect.swift
@prakashUXtech prakashUXtech added the fast-lane Merge automatically when small, green and outside protected paths label Oct 26, 2026 — with Claude
@prakashUXtech prakashUXtech added the beta In the AfterGlow beta cut label Oct 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Fast lane: this PR body has AI attribution lines ("Generated by Claude Code", "🤖 Generated with" or a Co-Authored-By: Claude trailer). The lane strips them from the squash commit, so nothing waits on this, but please delete them from the body and leave them out of your next PRs.

@github-actions github-actions Bot removed the fast-lane Merge automatically when small, green and outside protected paths label Oct 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Fast lane: not eligible. too big: 645 lines, 29 files (max 400 lines, 15 files). This PR now needs normal captain review.

@github-actions github-actions Bot added the fast-lane Merge automatically when small, green and outside protected paths label Oct 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Fast lane: labelled because the PR carries Belt-Lead.

@github-actions github-actions Bot removed the fast-lane Merge automatically when small, green and outside protected paths label Oct 26, 2026
@prakashUXtech prakashUXtech added the needs-split Over the lane cap; split per lead.md rule 22 label Oct 31, 2026
@prakashUXtech

Copy link
Copy Markdown
Contributor Author

Supervisor sentinel: this PR is 645 lines / 29 files, over the lane's 400/15 cap (lead.md rule 22). First merge origin/dev into the branch: when parent slices were squash-merged, the branch still carries their commits and the count drops to this PR's own work once dev is in. If it is still over the cap, split it into PRs of 150-400 lines (tests and model in one, wiring in another) and close this one; the lane merges the pieces on their own. Oversize PRs aren't hand-merged.

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

Labels

beta In the AfterGlow beta cut needs-split Over the lane cap; split per lead.md rule 22 no-fast-lane

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant