@guiho/runx 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -15,6 +15,22 @@ owner: runx
15
15
 
16
16
  # Changelog
17
17
 
18
+ ## 0.5.2 - 2026-07-20
19
+
20
+ ### Fixed
21
+
22
+ - Changed the Linux/macOS installer to download latest native and agent assets
23
+ through GitHub's stable `releases/latest/download` aliases, avoiding scoped
24
+ package-tag truncation during redirect parsing.
25
+ - Changed the no-argument greeting to report Windows, Linux, or macOS according
26
+ to the runtime operating system.
27
+
28
+ ### Changed
29
+
30
+ - Migrated RunX release configuration from legacy `mirror.config.toml` to
31
+ `mirror.yaml` while preserving package, commit, tag, push, and changelog
32
+ behavior.
33
+
18
34
  ## 0.5.1 - 2026-07-19
19
35
 
20
36
  ### Fixed
package/DOCS.md CHANGED
@@ -27,9 +27,11 @@ before Bun is installed.
27
27
  No arguments prints exactly:
28
28
 
29
29
  ```text
30
- Hello Windows - runx v<version>
30
+ Hello <Windows|Linux|macOS> - runx v<version>
31
31
  ```
32
32
 
33
+ The platform label matches the runtime operating system.
34
+
33
35
  The foreground reads `~/.guiho/runx/cache.json` and never waits for network
34
36
  work. A detached worker validates GitHub release data and atomically refreshes
35
37
  that cache. When a decoded cache announces an update, RunX prints:
@@ -8,9 +8,9 @@ files:
8
8
  extract-release-notes.ts: Extracts one exact version section from CHANGELOG.md and fails closed when the heading or notes are missing.
9
9
  extract-release-notes.spec.ts: Verifies exact heading boundaries and exclusion of frontmatter and other release sections.
10
10
  verify-release-assets.ts: Fails on missing, duplicate, extra, legacy, empty, binary, or misidentified release assets.
11
- installers.spec.ts: Verifies installer progress, resources, exact stable/prerelease normalization, executable version matching, Markdown rejection, and no POSIX Bun dependency.
11
+ installers.spec.ts: Verifies latest-alias and exact-tag URLs, installer progress, resources, executable version matching, Markdown rejection, and no POSIX Bun dependency.
12
12
  install.ps1: Resolves an exact Windows release, downloads and validates a compatible asset, transactionally replaces the canonical executable, verifies its version, and rolls back on failure.
13
- install.sh: Bash installer for Linux or Darwin with strict mode, progress, validation, PATH, dual skills, instructions, verification, and rollback.
13
+ install.sh: Bash installer for Linux or Darwin with stable latest-download resolution, exact tagged releases, progress, validation, PATH, dual skills, instructions, verification, and rollback.
14
14
  documents: {}
15
15
  tags:
16
16
  - devops
package/devops/install.sh CHANGED
@@ -10,6 +10,7 @@ VARIANT_OVERRIDE=""
10
10
  OS=""
11
11
  ARCH=""
12
12
  TARGET_VERSION=""
13
+ INSTALLED_VERSION=""
13
14
  TMP=""
14
15
 
15
16
  cleanup() { [ -z "$TMP" ] || rm -rf -- "$TMP"; }
@@ -76,11 +77,21 @@ normalize_version() {
76
77
 
77
78
  resolve_target_version() {
78
79
  if [ "$VERSION" != latest ]; then normalize_version "$VERSION"; return; fi
79
- printf 'Resolving latest stable RunX release...\n' >&2
80
- effective=$(curl --fail --location --silent --show-error --proto '=https' --tlsv1.2 --output /dev/null --write-out '%{url_effective}' "https://github.com/${REPO}/releases/latest")
81
- tag=${effective##*/}
82
- tag=$(printf '%s' "$tag" | sed 's/%40/@/g; s/%2[Ff]/\//g')
83
- normalize_version "$tag"
80
+ printf 'latest\n'
81
+ }
82
+
83
+ build_asset_url() {
84
+ asset=$1
85
+ if [ -n "$DOWNLOAD_BASE_URL" ]; then
86
+ printf '%s/%s\n' "${DOWNLOAD_BASE_URL%/}" "$asset"
87
+ return
88
+ fi
89
+ if [ "$TARGET_VERSION" = latest ]; then
90
+ printf 'https://github.com/%s/releases/latest/download/%s\n' "$REPO" "$asset"
91
+ return
92
+ fi
93
+ encoded_tag="%40guiho%2Frunx%40${TARGET_VERSION}"
94
+ printf 'https://github.com/%s/releases/download/%s/%s\n' "$REPO" "$encoded_tag" "$asset"
84
95
  }
85
96
 
86
97
  build_candidates() {
@@ -148,7 +159,12 @@ verify_installed_version() {
148
159
  fi
149
160
  actual=$(cat "$verify_output")
150
161
  rm -f -- "$verify_output"
151
- [ "$actual" = "$TARGET_VERSION" ] || { printf 'error: installed RunX reported %s; expected %s\n' "${actual:-<empty>}" "$TARGET_VERSION" >&2; return 1; }
162
+ normalized=$(normalize_version "$actual") || return 1
163
+ if [ "$TARGET_VERSION" != latest ] && [ "$normalized" != "$TARGET_VERSION" ]; then
164
+ printf 'error: installed RunX reported %s; expected %s\n' "${actual:-<empty>}" "$TARGET_VERSION" >&2
165
+ return 1
166
+ fi
167
+ INSTALLED_VERSION=$normalized
152
168
  }
153
169
 
154
170
  ensure_path() {
@@ -201,9 +217,8 @@ install_transactional() {
201
217
  }
202
218
 
203
219
  install_agent_assets() {
204
- tag_base=${DOWNLOAD_BASE_URL:-"https://github.com/${REPO}/releases/download"}
205
- skill_url="${tag_base%/}/${encoded_tag}/guiho-s-runx.md"
206
- prompt_url="${tag_base%/}/${encoded_tag}/guiho-i-runx.md"
220
+ skill_url=$(build_asset_url guiho-s-runx.md)
221
+ prompt_url=$(build_asset_url guiho-i-runx.md)
207
222
  printf 'Downloading skill asset: %s\n' "$skill_url"
208
223
  download_asset "$skill_url" "$TMP/guiho-s-runx.md" || fail 'could not download guiho-s-runx.md'
209
224
  verify_markdown_asset "$TMP/guiho-s-runx.md" 'guiho-s-runx'
@@ -248,15 +263,14 @@ main() {
248
263
  TMP=$(mktemp -d "${TMPDIR:-/tmp}/runx-install.XXXXXX")
249
264
  mkdir -p -- "$INSTALL_DIR"
250
265
  destination="$INSTALL_DIR/runx"
251
- encoded_tag="%40guiho%2Frunx%40${TARGET_VERSION}"
252
266
  downloaded=""
253
267
  first_asset=$(build_candidates | head -n 1)
254
- source_url="${DOWNLOAD_BASE_URL:-https://github.com/${REPO}/releases/download}/${encoded_tag}/${first_asset}"
268
+ source_url=$(build_asset_url "$first_asset")
255
269
  printf 'Initiating GUIHO CLI Upgrade / Installation Sequence...\n'
256
270
  printf 'Target Version: v%s\nArchitecture: %s\nVariant: %s\nSource URL: %s\n' "$TARGET_VERSION" "$ARCH" "${VARIANT_OVERRIDE:-baseline}" "$source_url"
257
271
  build_candidates | while IFS= read -r asset; do printf '%s\n' "$asset"; done >"$TMP/candidates"
258
272
  while IFS= read -r asset; do
259
- if [ -n "$DOWNLOAD_BASE_URL" ]; then url="${DOWNLOAD_BASE_URL%/}/${encoded_tag}/${asset}"; else url="https://github.com/${REPO}/releases/download/${encoded_tag}/${asset}"; fi
273
+ url=$(build_asset_url "$asset")
260
274
  candidate="$TMP/$asset"
261
275
  printf 'Downloading %s\n' "$url"
262
276
  if download_asset "$url" "$candidate"; then :; else
@@ -274,7 +288,7 @@ main() {
274
288
  install_agent_assets
275
289
  [ "${RUNX_SKIP_PATH_UPDATE:-0}" = 1 ] || ensure_path
276
290
  printf 'Final verification: %s --version\n' "$destination"
277
- printf 'Installed and verified RunX %s at %s\n' "$TARGET_VERSION" "$destination"
291
+ printf 'Installed and verified RunX %s at %s\n' "$INSTALLED_VERSION" "$destination"
278
292
  }
279
293
 
280
294
  if [ "${RUNX_INSTALLER_SOURCE_ONLY:-0}" = 1 ]; then
@@ -24,11 +24,13 @@ describe('RunX direct installers', () => {
24
24
  expect(script).toContain('not valid UTF-8 text')
25
25
  })
26
26
 
27
- test('Bash installer selects Darwin assets and has no runtime Bun dependency', async () => {
27
+ test('Bash installer selects Darwin assets and resolves latest assets without parsing redirect tags', async () => {
28
28
  const script = await Bun.file(new URL('./install.sh', import.meta.url)).text()
29
29
  expect(script).toStartWith('#!/usr/bin/env bash\nset -euo pipefail')
30
30
  expect(script).toContain("Darwin) printf 'darwin")
31
31
  expect(script).toContain('--progress-bar')
32
+ expect(script).toContain('/releases/latest/download/')
33
+ expect(script).not.toContain("write-out '%{url_effective}'")
32
34
  expect(script).toContain('guiho-s-runx.md')
33
35
  expect(script).toContain('guiho-i-runx.md')
34
36
  expect(script).toContain('.agents/skills/guiho-s-runx')
@@ -68,6 +70,14 @@ describe('RunX direct installers', () => {
68
70
  'prerelease=$(normalize_version @guiho/runx@1.3.0-alpha.2)',
69
71
  'test "$stable" = 1.2.3',
70
72
  'test "$prerelease" = 1.3.0-alpha.2',
73
+ 'VERSION=latest',
74
+ 'TARGET_VERSION=$(resolve_target_version)',
75
+ 'latest=$(build_asset_url runx-linux-x64-baseline)',
76
+ 'test "$latest" = https://github.com/CGuiho/runx/releases/latest/download/runx-linux-x64-baseline',
77
+ 'VERSION=@guiho/runx@1.3.0-alpha.2',
78
+ 'TARGET_VERSION=$(resolve_target_version)',
79
+ 'exact=$(build_asset_url runx-linux-x64-baseline)',
80
+ 'test "$exact" = https://github.com/CGuiho/runx/releases/download/%40guiho%2Frunx%401.3.0-alpha.2/runx-linux-x64-baseline',
71
81
  'TARGET_VERSION=$(bun --version)',
72
82
  'verify_installed_version "$(command -v bun)"',
73
83
  ].join('; '),
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: Latest RunX Bash Installer Plan
3
+ purpose: Sequence the GitHub issue 20 installer fix from URL resolution through public release verification.
4
+ description: Replaces redirect-tag parsing with latest-download aliases while preserving exact releases and transactional installation.
5
+ created: 2026-07-20
6
+ flags:
7
+ - approved
8
+ - implemented
9
+ owner: runx-plans
10
+ tags:
11
+ - installer
12
+ - linux
13
+ keywords:
14
+ - issue 20
15
+ - latest download
16
+ - regression test
17
+ ---
18
+
19
+ # Latest RunX Bash Installer Plan
20
+
21
+ ## Unit 1: Replace Fragile Latest-Tag Discovery
22
+
23
+ 1. Keep exact-version normalization for explicit stable and prerelease inputs.
24
+ 2. Route `latest` binary and agent assets through
25
+ `releases/latest/download/<asset>`, matching the proven XDocs installer.
26
+ 3. Verify the installed executable's semantic version and report the resolved
27
+ version after installation.
28
+
29
+ ## Unit 2: Prove The Regression
30
+
31
+ 1. Assert that latest URLs use the stable GitHub download alias.
32
+ 2. Assert that redirect `url_effective` parsing is absent.
33
+ 3. Preserve exact encoded-tag URL coverage, Bash syntax, piping, native payload
34
+ validation, agent-asset validation, and executable version checks.
35
+ 4. Run focused tests, then the full RunX typecheck, test, build, binary, asset,
36
+ and XDocs gates.
37
+
38
+ ## Unit 3: Release And Close
39
+
40
+ 1. Prepare a Mirror patch release with version-only changelog notes.
41
+ 2. Publish exactly fourteen assets.
42
+ 3. Execute the public Linux installer path against the release.
43
+ 4. Post evidence to issue 20 and close it only after the public install passes.
@@ -8,8 +8,10 @@ files:
8
8
  automatic-agent-maintenance.md: Implements non-blocking automatic global skill and nearest AGENTS.md reconciliation for issue 11.
9
9
  citty-cli-migration.md: Executes the full Citty command-tree migration, compatibility validation, protected delivery, and patch release.
10
10
  interactive-init-manifest.md: Sequences the SemVer manifest, public group, scripts directory, and interactive initializer delivery.
11
+ linux-installer-latest-release.md: Replaces redirect-tag parsing with latest-download aliases, regression tests the URLs, and sequences public issue verification.
11
12
  mirror-automatic-push.md: Enables automatic Mirror release pushes with a synchronized protected-main safety gate.
12
13
  npm-trusted-publishing-release.md: Sequences workflow implementation, protected delivery, Mirror patching, and public trusted-publishing verification.
14
+ platform-aware-startup-greeting.md: Centralizes Windows, Linux, and macOS greeting rendering, deterministic tests, documentation, release, and issue closure.
13
15
  rfc-0034-cli-compliance-migration.md: Executes the breaking full RFC 0034 migration across runtime, configuration, help, agents, upgrades, distribution, release assets, documentation, and validation.
14
16
  windows-self-upgrade.md: Sequences synchronous Windows replacement, rollback coverage, validation, issue closure, and patch delivery.
15
17
  upgrade-reliability-implementation.md: Sequences release discovery, streamed progress, transactional replacement, recovery, installers, and validation.
@@ -18,8 +20,10 @@ documents:
18
20
  automatic-agent-maintenance.md: Approved automatic agent-maintenance implementation plan.
19
21
  citty-cli-migration.md: Active plan for replacing handwritten CLI parsing and routing with Citty and delivering its patch release.
20
22
  interactive-init-manifest.md: Approved implementation plan for the RunX interactive init manifest feature.
23
+ linux-installer-latest-release.md: Approved implementation plan for GitHub issue 20.
21
24
  mirror-automatic-push.md: Approved plan for configuring, validating, and merging Mirror push=true without applying another release.
22
25
  npm-trusted-publishing-release.md: Approved executable plan for the RunX 0.2.1 trusted-publishing release trial.
26
+ platform-aware-startup-greeting.md: Approved implementation plan for GitHub issue 21.
23
27
  rfc-0034-cli-compliance-migration.md: Approved step-by-step plan for making RunX fully compliant with the GUIHO CLI engineer contract.
24
28
  windows-self-upgrade.md: Approved executable plan for fixing Windows native self-upgrade and delivering its patch.
25
29
  upgrade-reliability-implementation.md: Approved executable plan for GitHub issues 12 and 13.
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: Platform-Aware RunX Greeting Plan
3
+ purpose: Sequence the GitHub issue 21 greeting fix from pure rendering through released Linux verification.
4
+ description: Centralizes supported platform labels, deterministic tests, documentation, patch release, and issue closure.
5
+ created: 2026-07-20
6
+ flags:
7
+ - approved
8
+ - implemented
9
+ owner: runx-plans
10
+ tags:
11
+ - cli
12
+ - startup
13
+ keywords:
14
+ - issue 21
15
+ - platform label
16
+ - regression test
17
+ ---
18
+
19
+ # Platform-Aware RunX Greeting Plan
20
+
21
+ ## Unit 1: Centralize Greeting Rendering
22
+
23
+ 1. Add a pure greeting renderer to the existing Citty CLI module.
24
+ 2. Map `win32`, `linux`, and `darwin` to Windows, Linux, and macOS.
25
+ 3. Route the no-argument command through the renderer without changing cached
26
+ update notice ordering.
27
+
28
+ ## Unit 2: Prove Every Supported Platform
29
+
30
+ 1. Add deterministic renderer assertions for Windows, Linux, and macOS.
31
+ 2. Update child-process expectations to use the runtime platform.
32
+ 3. Run the focused CLI suite and retry only independently diagnosed timing
33
+ flakes.
34
+ 4. Run the full RunX validation gates.
35
+
36
+ ## Unit 3: Document, Release, And Close
37
+
38
+ 1. Replace literal-Windows startup guidance in repository instructions and CLI
39
+ documentation.
40
+ 2. Update the owning XDocs descriptors.
41
+ 3. Include the correction in the same Mirror patch as issue 20.
42
+ 4. Verify the released Linux binary prints `Hello Linux`, post evidence to
43
+ issue 21, and close it.
@@ -7,6 +7,8 @@ files:
7
7
  bash-installer-review.md: Accepts the canonical Bash shebang, strict mode, recovery invocation, and executable shell tests for GitHub issue 15.
8
8
  citty-cli-migration-review.md: Reviews the implemented Citty command tree, compatibility adapter, tests, documentation, packaging, and release readiness.
9
9
  interactive-init-manifest-review.md: Reviews the implemented RunX initializer, strict manifest contract, tests, documentation, and delivery readiness.
10
+ linux-installer-latest-release-review.md: Accepts latest-download alias resolution, exact-version preservation, transactional safeguards, tests, and GitHub issue 20 release readiness.
11
+ platform-aware-startup-greeting-review.md: Accepts centralized Windows, Linux, and macOS startup labels, deterministic tests, documentation, and GitHub issue 21 release readiness.
10
12
  windows-self-upgrade-review.md: Reviews synchronous Windows replacement, rollback, cleanup, tests, CI coverage, and release readiness.
11
13
  rfc-0034-cli-compliance-migration-review.md: Accepts the RFC 0034 migration after independent upgrade-routing, cached-notice, prompt-output, asset, and release-readiness corrections.
12
14
  automatic-agent-maintenance-review.md: Accepts atomic global skill and nearest AGENTS.md reconciliation, detached failure isolation, command boundaries, and regression evidence.
@@ -17,6 +19,8 @@ documents:
17
19
  bash-installer-review.md: Accepted implementation review for the RunX Bash installer.
18
20
  citty-cli-migration-review.md: Accepted implementation review for the full Citty CLI migration.
19
21
  interactive-init-manifest-review.md: Accepted implementation review for the RunX interactive init manifest feature.
22
+ linux-installer-latest-release-review.md: Accepted implementation review for GitHub issue 20.
23
+ platform-aware-startup-greeting-review.md: Accepted implementation review for GitHub issue 21.
20
24
  windows-self-upgrade-review.md: Accepted implementation review for the Windows native self-upgrade fix.
21
25
  rfc-0034-cli-compliance-migration-review.md: Accepted implementation and independent correction review for RX-01 through RX-16.
22
26
  automatic-agent-maintenance-review.md: Accepted implementation review for GitHub issue 11 automatic agent maintenance.
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: Latest RunX Bash Installer Implementation Review
3
+ purpose: Review the GitHub issue 20 installer correction against its approved plan and acceptance signals.
4
+ description: Confirms latest-download URL resolution, exact version preservation, transactional safeguards, tests, and release readiness.
5
+ created: 2026-07-20
6
+ flags:
7
+ - accepted
8
+ tags:
9
+ - review
10
+ - installer
11
+ keywords:
12
+ - issue 20
13
+ - latest release
14
+ - install.sh
15
+ owner: runx-implementation-reviews
16
+ ---
17
+
18
+ # Latest RunX Bash Installer Implementation Review
19
+
20
+ ## Verdict
21
+
22
+ Accepted for patch release.
23
+
24
+ ## Findings
25
+
26
+ No blocking findings.
27
+
28
+ ## Acceptance Criteria Check
29
+
30
+ - Latest binaries and Markdown assets use
31
+ `releases/latest/download/<asset>`.
32
+ - Explicit stable and prerelease versions retain encoded RunX tag URLs.
33
+ - Redirect `url_effective` parsing was removed.
34
+ - Transactional replacement, rollback, native validation, Markdown validation,
35
+ dual skill installation, instruction reconciliation, PATH setup, and final
36
+ executable verification remain present.
37
+ - Focused and full regression suites pass.
38
+
39
+ ## Residual Risk
40
+
41
+ The Windows host cannot execute the Linux binary locally. Public Linux
42
+ installation and greeting behavior must be verified after the patch assets are
43
+ published.
44
+
45
+ ## References
46
+
47
+ - [Task specification](../../todo/linux-installer-latest-release.md)
48
+ - [Implementation plan](../../plans/linux-installer-latest-release.md)
49
+ - [GitHub issue 20](https://github.com/CGuiho/runx/issues/20)
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: Platform-Aware RunX Greeting Implementation Review
3
+ purpose: Review the GitHub issue 21 greeting correction against its approved plan and acceptance signals.
4
+ description: Confirms centralized platform labels, deterministic coverage, update-notice ordering, and release readiness.
5
+ created: 2026-07-20
6
+ flags:
7
+ - accepted
8
+ tags:
9
+ - review
10
+ - cli
11
+ keywords:
12
+ - issue 21
13
+ - platform greeting
14
+ - startup
15
+ owner: runx-implementation-reviews
16
+ ---
17
+
18
+ # Platform-Aware RunX Greeting Implementation Review
19
+
20
+ ## Verdict
21
+
22
+ Accepted for patch release.
23
+
24
+ ## Findings
25
+
26
+ No blocking findings.
27
+
28
+ ## Acceptance Criteria Check
29
+
30
+ - One pure renderer maps Windows, Linux, and macOS deterministically.
31
+ - The no-argument Citty route uses the renderer.
32
+ - Cached update notices remain before the greeting.
33
+ - Version, help, routing, diagnostics, and exit behavior are unchanged.
34
+ - Tests assert all three supported operating-system labels and runtime
35
+ child-process behavior.
36
+ - Repository instructions and CLI documentation describe the new contract.
37
+
38
+ ## Deviation
39
+
40
+ The historical RFC 0034 literal-Windows banner is intentionally superseded by
41
+ the developer-approved platform-aware contract.
42
+
43
+ ## Residual Risk
44
+
45
+ The released Linux binary must be smoke-tested after publication.
46
+
47
+ ## References
48
+
49
+ - [Task specification](../../todo/platform-aware-startup-greeting.md)
50
+ - [Implementation plan](../../plans/platform-aware-startup-greeting.md)
51
+ - [GitHub issue 21](https://github.com/CGuiho/runx/issues/21)
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: Resolve The Latest RunX Bash Install
3
+ purpose: Track the Linux and macOS latest-release installer correction requested by GitHub issue 20.
4
+ description: Defines stable latest-download resolution, exact version behavior, installer safeguards, regression coverage, and public verification.
5
+ created: 2026-07-20
6
+ flags:
7
+ - testing
8
+ owner: runx-todo
9
+ tags:
10
+ - installer
11
+ - linux
12
+ - github
13
+ keywords:
14
+ - issue 20
15
+ - latest release
16
+ - install.sh
17
+ ---
18
+
19
+ # Resolve The Latest RunX Bash Install
20
+
21
+ ## Outcome
22
+
23
+ The Bash installer installs the latest stable RunX release on Linux and macOS
24
+ without parsing a redirected release tag whose package name contains a slash.
25
+
26
+ ## External Tracker
27
+
28
+ - [CGuiho/runx#20](https://github.com/CGuiho/runx/issues/20)
29
+
30
+ ## Acceptance Signals
31
+
32
+ - `latest` assets resolve through GitHub's stable
33
+ `releases/latest/download/<asset>` endpoint.
34
+ - Exact stable and prerelease versions continue to use encoded RunX tags.
35
+ - Binary, skill, and instruction assets use the same release selector.
36
+ - Bash syntax, piped startup, exact-version, and executable-verification tests
37
+ pass.
38
+ - The public installer succeeds against the released patch before issue
39
+ closure.
40
+
41
+ ## Watch-Outs
42
+
43
+ - Do not recover a latest tag from the final redirect URL segment. The RunX tag
44
+ contains `@guiho/runx@...`; the slash can become a path separator and discard
45
+ the package scope.
46
+ - Preserve transactional replacement, Markdown validation, PATH setup, dual
47
+ skill installation, and final executable verification.
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: Use The Runtime Platform In The RunX Greeting
3
+ purpose: Track the platform-aware no-argument greeting requested by GitHub issue 21.
4
+ description: Defines Windows, Linux, and macOS greeting labels, output ordering, regression coverage, and public verification.
5
+ created: 2026-07-20
6
+ flags:
7
+ - testing
8
+ owner: runx-todo
9
+ tags:
10
+ - cli
11
+ - startup
12
+ keywords:
13
+ - issue 21
14
+ - operating system
15
+ - greeting
16
+ ---
17
+
18
+ # Use The Runtime Platform In The RunX Greeting
19
+
20
+ ## Outcome
21
+
22
+ `runx` with no arguments names the operating system it is actually running on:
23
+ Windows, Linux, or macOS.
24
+
25
+ ## External Tracker
26
+
27
+ - [CGuiho/runx#21](https://github.com/CGuiho/runx/issues/21)
28
+
29
+ ## Acceptance Signals
30
+
31
+ - Windows prints `Hello Windows - runx v<version>`.
32
+ - Linux prints `Hello Linux - runx v<version>`.
33
+ - macOS prints `Hello macOS - runx v<version>`.
34
+ - Cached update notices remain before the greeting.
35
+ - Help, version, command routing, output channels, and exit codes are unchanged.
36
+ - Deterministic tests cover all three supported platform labels.
37
+
38
+ ## Contract Note
39
+
40
+ This issue intentionally replaces the historical RFC 0034 literal-Windows
41
+ banner. The developer explicitly approved the platform-aware behavior.
@@ -5,6 +5,7 @@ parent: runx-docs
5
5
  children: []
6
6
  files:
7
7
  bash-installer.md: Completes the GitHub issue 15 Bash shebang, invocation, strict-mode, and executable test contract.
8
+ linux-installer-latest-release.md: Defines GitHub issue 20 latest-release alias resolution and public Bash installer acceptance.
8
9
  automatic-agent-maintenance.md: Defines issue 11 automatic agent-resource maintenance outcomes and acceptance signals.
9
10
  automatic-agent-maintenance-implementation.md: Records the delivered issue 11 reconciler, hidden worker, command boundaries, tests, and release handoff.
10
11
  protect-branches-and-tag-creation.md: Records the verified active GitHub branch and release-tag rulesets for RunX.
@@ -12,8 +13,10 @@ files:
12
13
  rfc-0034-cli-compliance-migration-implementation.md: Records the delivered RX units, implementation map, test-hang diagnosis, and independent audit corrections.
13
14
  upgrade-reliability.md: Completes GitHub issues 12 and 13 for verified replacement, complete listing, exact recovery, and direct installers.
14
15
  unicode-help-tree.md: Completes GitHub issue 17 with Unicode branches, nested guides, aligned descriptions, and legacy ASCII rejection.
16
+ platform-aware-startup-greeting.md: Defines GitHub issue 21 Windows, Linux, and macOS no-argument greeting behavior.
15
17
  documents:
16
18
  bash-installer.md: Completed task specification for the canonical RunX Bash installer.
19
+ linux-installer-latest-release.md: Task specification for reliable latest RunX Bash installation.
17
20
  automatic-agent-maintenance.md: Task specification for automatic RunX skill and AGENTS.md maintenance.
18
21
  automatic-agent-maintenance-implementation.md: Completed implementation record for automatic RunX agent maintenance.
19
22
  protect-branches-and-tag-creation.md: Completed task specification with active RunX ruleset IDs, protected patterns, and verification evidence.
@@ -21,6 +24,7 @@ documents:
21
24
  rfc-0034-cli-compliance-migration-implementation.md: Completed implementation, independent correction, and validation handoff for TODO task 1.
22
25
  upgrade-reliability.md: Completed task specification for RunX upgrade reliability.
23
26
  unicode-help-tree.md: Completed task specification for the RunX Unicode help tree.
27
+ platform-aware-startup-greeting.md: Task specification for the platform-aware RunX greeting.
24
28
  tags:
25
29
  - todo
26
30
  keywords:
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: Latest RunX Bash Installer Validation
3
+ purpose: Record verification evidence for GitHub issue 20.
4
+ description: Captures Bash syntax, installer regression tests, full package checks, release assets, public latest-alias resolution, and remaining live-install verification.
5
+ created: 2026-07-20
6
+ flags:
7
+ - release-ready
8
+ tags:
9
+ - validation
10
+ - installer
11
+ keywords:
12
+ - issue 20
13
+ - latest download
14
+ - fourteen assets
15
+ owner: runx-validation
16
+ ---
17
+
18
+ # Latest RunX Bash Installer Validation
19
+
20
+ ## Summary
21
+
22
+ The implementation is ready for patch release. Public installation against the
23
+ new patch remains the final closure gate.
24
+
25
+ ## Commands Run
26
+
27
+ | Check | Result |
28
+ | --- | --- |
29
+ | `bash -n devops/install.sh` | Passed |
30
+ | `bun test devops/installers.spec.ts` | Passed: 5 tests, 39 expectations |
31
+ | `bun run typecheck` | Passed |
32
+ | `bun test` | Passed: 54 tests, 373 expectations |
33
+ | `bun run build` | Passed |
34
+ | `bun run binary` | Passed |
35
+ | `bun run binaries` | Passed: 12 native binaries |
36
+ | `bun run verify-assets` | Passed: exactly 14 assets |
37
+ | Public `releases/latest/download/runx-linux-x64-baseline` headers | Passed: redirects to the current RunX release asset and returns HTTP 200 |
38
+ | XDocs strict metadata, tree, and doctor | Passed |
39
+
40
+ ## Regression Evidence
41
+
42
+ - The script contains the stable latest-download endpoint.
43
+ - The script does not inspect `url_effective`.
44
+ - Sourced Bash tests prove latest and exact encoded-tag URL shapes.
45
+ - Existing payload, Markdown, and executable checks remain green.
46
+
47
+ ## Remaining Gate
48
+
49
+ After publication, execute the public Bash installer on Linux, verify the
50
+ reported version, and record the result in issue 20 before closure.
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: Platform-Aware RunX Greeting Validation
3
+ purpose: Record verification evidence for GitHub issue 21.
4
+ description: Captures deterministic platform assertions, runtime smoke tests, full package checks, and remaining released-Linux verification.
5
+ created: 2026-07-20
6
+ flags:
7
+ - release-ready
8
+ tags:
9
+ - validation
10
+ - cli
11
+ keywords:
12
+ - issue 21
13
+ - Windows
14
+ - Linux
15
+ - macOS
16
+ owner: runx-validation
17
+ ---
18
+
19
+ # Platform-Aware RunX Greeting Validation
20
+
21
+ ## Summary
22
+
23
+ The implementation is ready for patch release. The published Linux executable
24
+ is the final platform-specific closure gate.
25
+
26
+ ## Commands Run
27
+
28
+ | Check | Result |
29
+ | --- | --- |
30
+ | Focused `bun test source/cli.spec.ts` banner assertions | Passed |
31
+ | Independently rerun background-maintenance timing test | Passed |
32
+ | `bun run typecheck` | Passed |
33
+ | `bun test` | Passed: 54 tests, 373 expectations |
34
+ | `bun run build` | Passed |
35
+ | `bun run binaries` | Passed |
36
+ | Compiled `runx-windows-x64-baseline.exe` no arguments | Passed: `Hello Windows - runx v0.5.1` |
37
+ | Compiled Windows `--version` | Passed: `0.5.1` |
38
+ | XDocs strict metadata, tree, and doctor | Passed |
39
+
40
+ ## Deterministic Assertions
41
+
42
+ - `win32` renders `Hello Windows`.
43
+ - `linux` renders `Hello Linux`.
44
+ - `darwin` renders `Hello macOS`.
45
+ - Cached update output remains before the startup greeting.
46
+
47
+ ## Remaining Gate
48
+
49
+ After publication, run the released Linux binary without arguments and record
50
+ `Hello Linux - runx v<released-version>` in issue 21 before closure.
@@ -8,6 +8,8 @@ files:
8
8
  alpha-implementation-summary.md: Records the completed alpha implementation, checks, and release boundaries.
9
9
  citty-cli-migration.md: Records the complete local validation gate for the Citty command-tree migration.
10
10
  interactive-init-manifest.md: Records validation evidence for the interactive initializer and strict manifest contract.
11
+ linux-installer-latest-release.md: Records Bash syntax, latest and exact URL regression coverage, full tests, builds, exact assets, public alias resolution, and the issue 20 live-install gate.
12
+ platform-aware-startup-greeting.md: Records deterministic platform assertions, runtime smoke tests, full package checks, and the issue 21 released-Linux gate.
11
13
  windows-self-upgrade.md: Records Windows replacement, rollback, cleanup, native build, CI, and XDocs validation evidence.
12
14
  upgrade-reliability.md: Summarizes completed current-main validation for GitHub issues 12 and 13.
13
15
  rfc-0034-cli-compliance-migration.md: Records passing RFC tests, live upgrade/startup/prompt regressions, builds, bootstrap, installers, import scan, and fourteen-asset evidence.
@@ -20,6 +22,8 @@ documents:
20
22
  alpha-implementation-summary.md: Validation summary for the first RunX implementation.
21
23
  citty-cli-migration.md: Validation evidence for TypeScript, tests, native assets, npm packaging, CLI behavior, and XDocs.
22
24
  interactive-init-manifest.md: Validation evidence for the RunX interactive init manifest feature.
25
+ linux-installer-latest-release.md: Patch-release validation report for GitHub issue 20.
26
+ platform-aware-startup-greeting.md: Patch-release validation report for GitHub issue 21.
23
27
  npm-trusted-publishing-0.2.2.md: Validation evidence for the blocked 0.2.2 npm trusted-publishing retry.
24
28
  windows-self-upgrade.md: Validation evidence for GitHub issues #9 and #1 and the Windows self-upgrade patch.
25
29
  upgrade-reliability.md: Completed umbrella validation for GitHub issues 12 and 13.
package/library/cli.d.ts CHANGED
@@ -2,7 +2,8 @@
2
2
  * @copyright Copyright © 2026 GUIHO Technologies as represented by Cristóvão GUIHO. All Rights Reserved.
3
3
  */
4
4
  import type { CommandDef } from 'citty';
5
- export { runCli, runCliWithErrorHandling, runxCommand, };
5
+ export { renderStartupBanner, runCli, runCliWithErrorHandling, runxCommand, };
6
+ declare function renderStartupBanner(platform?: NodeJS.Platform, version?: string): string;
6
7
  declare const runxCommand: CommandDef<any>;
7
8
  declare function runCli(rawArgs?: string[]): Promise<void>;
8
9
  declare function runCliWithErrorHandling(rawArgs?: string[]): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../source/cli.ts"],"names":[],"mappings":"AAAA;;GAEG;AA+BH,OAAO,KAAK,EAAkB,UAAU,EAAkB,MAAM,OAAO,CAAA;AAIvE,OAAO,EACL,MAAM,EACN,uBAAuB,EACvB,WAAW,GACZ,CAAA;AAyPD,QAAA,MAAiB,WAAW,iBAAwB,CAAA;AAEpD,iBAAe,MAAM,CAAC,OAAO,GAAE,MAAM,EAA0B,GAAG,OAAO,CAAC,IAAI,CAAC,CAgC9E;AAMD,iBAAe,uBAAuB,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAexE"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../source/cli.ts"],"names":[],"mappings":"AAAA;;GAEG;AA+BH,OAAO,KAAK,EAAkB,UAAU,EAAkB,MAAM,OAAO,CAAA;AAIvE,OAAO,EACL,mBAAmB,EACnB,MAAM,EACN,uBAAuB,EACvB,WAAW,GACZ,CAAA;AAuDD,iBAAS,mBAAmB,CAAC,QAAQ,kBAAmB,EAAE,OAAO,SAAgB,GAAG,MAAM,CAEzF;AAyMD,QAAA,MAAiB,WAAW,iBAAwB,CAAA;AAEpD,iBAAe,MAAM,CAAC,OAAO,GAAE,MAAM,EAA0B,GAAG,OAAO,CAAC,IAAI,CAAC,CAgC9E;AAMD,iBAAe,uBAAuB,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAexE"}
package/library/cli.js CHANGED
@@ -17,7 +17,7 @@ import { fetchReleaseCatalog, paginateReleaseCatalog, resolveUpgradePlatform } f
17
17
  import { checkForLatestVersion, uninstallSelf, upgradeSelf } from './self-management.js';
18
18
  import { readCachedUpdateNotice, runUpdateWorker, spawnUpdateWorker } from './update-cache.js';
19
19
  import { renderReleaseCatalog, renderUpgradeEvent, renderUpgradeHeading, renderUpgradePlan, renderUpgradeResult } from './upgrade-reporting.js';
20
- export { runCli, runCliWithErrorHandling, runxCommand, };
20
+ export { renderStartupBanner, runCli, runCliWithErrorHandling, runxCommand, };
21
21
  class CliHandled extends Error {
22
22
  }
23
23
  class CliUsageError extends Error {
@@ -32,6 +32,14 @@ const formatSchema = Type.Union([Type.Literal('text'), Type.Literal('json')]);
32
32
  const archSchema = Type.Union([Type.Literal('x64'), Type.Literal('arm64')]);
33
33
  const variantSchema = Type.Union([Type.Literal('baseline'), Type.Literal('default'), Type.Literal('modern')]);
34
34
  const positiveIntegerSchema = Type.Integer({ minimum: 1 });
35
+ const platformLabels = {
36
+ darwin: 'macOS',
37
+ linux: 'Linux',
38
+ win32: 'Windows',
39
+ };
40
+ function renderStartupBanner(platform = process.platform, version = readVersion()) {
41
+ return `Hello ${platformLabels[platform] ?? platform} - runx v${version}\n`;
42
+ }
35
43
  const helpArgs = {
36
44
  help: { type: 'boolean', alias: 'h', description: 'Show command help.' },
37
45
  'help-tree': { type: 'boolean', description: 'Show this command hierarchy.' },
@@ -174,7 +182,7 @@ function createCommandTree() {
174
182
  },
175
183
  run: ({ args }) => {
176
184
  if (args._.length === 0)
177
- write(`Hello Windows - runx v${readVersion()}\n`);
185
+ write(renderStartupBanner());
178
186
  },
179
187
  });
180
188
  state.commands.set('', root);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@guiho/runx",
3
3
  "description": "A language-agnostic, documented command catalog and local CLI executor.",
4
- "version": "0.5.1",
4
+ "version": "0.5.2",
5
5
  "type": "module",
6
6
  "main": "./library/guiho-runx.js",
7
7
  "types": "./library/guiho-runx.d.ts",