Skip to content

fix(ego-browser): recover help() from live helpers when docs are empty - #289

Open
chenjiangjiang85-jpg wants to merge 1 commit into
citrolabs:devfrom
chenjiangjiang85-jpg:fix/help-runtime-live-fallback
Open

fix(ego-browser): recover help() from live helpers when docs are empty#289
chenjiangjiang85-jpg wants to merge 1 commit into
citrolabs:devfrom
chenjiangjiang85-jpg:fix/help-runtime-live-fallback

Conversation

@chenjiangjiang85-jpg

Copy link
Copy Markdown

Summary

help() still returns Unknown helper for every helper on the shipped ego lite 0.4.6.14 app. Recover a usable signature from the live helper function when the embedded docs catalog is empty or missing that name.

Related issue

Closes #287

Related: #84, #85, #273

Changes

  • When help() has no names and the embedded catalog is empty, list live helpers from the current helper context.
  • When help(name) misses an embedded doc, recover the signature from the live function instead of immediately returning Unknown helper.
  • Keep Unknown helper only for names that are not present as live functions.
  • Add regression tests for an empty catalog, a missing-but-live helper, and a truly unknown name.

Verification

cd package/ego-browser
CI=true npm ci
npm test
# 314 pass, 0 fail

Local 0.4.6.14 app still reproduces the empty catalog:

ego-browser nodejs <<'EOF'
cliLog(help('click'))
cliLog(typeof click)
EOF
# Unknown helper: click
# function

This PR does not patch the closed-source app binary. It makes the next runtime ship degrade to live signatures instead of an empty catalog.

Impact

  • Public helper API or behavior
  • Agent skill or instructions
  • Site learning
  • Installation or update flow
  • Build, CI, or release process
  • Documentation only
  • No externally visible impact

help() remains the same public function. Agents that currently get an empty string / Unknown helper will get recovered signatures when the helper exists. True unknown names are unchanged.

Checklist

  • The PR targets the correct base branch (dev for normal changes; only dev may target main).
  • The change is focused and does not include unrelated cleanup.
  • Tests were added or updated for behavior changes, or the reason they are unnecessary is explained above.
  • Relevant tests and validation commands pass locally.
  • Public helper JSDoc and agent-facing documentation are updated when the helper surface changes.
  • No credentials, tokens, cookies, personal data, or other secrets are included.
  • A release-note label is selected (feat, fix, docs, chore, ci, or refactor).

citrolabs#84/citrolabs#85 embed helper docs at build time, but ego lite 0.4.6.14 still
ships an empty catalog so help('click') returns Unknown helper. Fall
back to the live function signature when the embedded map is empty or
missing a helper, and keep Unknown helper only for names that are not
present at all.

Closes citrolabs#287
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