-
Notifications
You must be signed in to change notification settings - Fork 0
fix: separate install callability from content maturity #209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 0.42.63.2 | ||
| 0.42.63.3 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -350,7 +350,23 @@ doctor() { | |
| return | ||
| fi | ||
| stop_stale_serve_if_requested | ||
| run env GBRAIN_SKILLS_DIR="$INSTALL_DIR/skills" "$HOME/.bun/bin/gbrain" doctor --json | ||
| local output | ||
| local cmd=(env GBRAIN_SKILLS_DIR="$INSTALL_DIR/skills" "$HOME/.bun/bin/gbrain" doctor --json) | ||
| printf '+' | ||
| printf ' %q' "${cmd[@]}" | ||
| printf '\n' | ||
| if [ "$DRY_RUN" = "true" ]; then | ||
| return | ||
| fi | ||
| if output="$("${cmd[@]}" 2>&1)"; then | ||
| printf '%s\n' "$output" | ||
| return | ||
| fi | ||
| printf '%s\n' "$output" | ||
| if [ "$RUN_HEALTH" = "false" ]; then | ||
| die "Doctor failed and --skip-health disabled the structured failure classifier. Rerun without --skip-health or repair the reported doctor failure." | ||
| fi | ||
| log "Doctor reported brain/content readiness gaps; continuing to the source-aware runtime health gate." | ||
|
100yenadmin marked this conversation as resolved.
|
||
| } | ||
|
|
||
| health_report() { | ||
|
|
@@ -364,10 +380,6 @@ health_report() { | |
| if [ "$WITH_WORKSPACE_DOCS" = "true" ] || { [ "$WITH_WORKSPACE_DOCS" = "auto" ] && [ -d "$WORKSPACE_DOCS_DIR" ]; }; then | ||
| require_workspace_docs="true" | ||
| fi | ||
| if [ "$RUN_HEALTH" = "auto" ] && [ "$WITH_SUPPORT_KB" != "true" ] && [ "$require_workspace_docs" != "true" ]; then | ||
| log "Skipping source-aware health report because no source package was requested or detected" | ||
| return | ||
| fi | ||
| local health_args=() | ||
|
100yenadmin marked this conversation as resolved.
|
||
| if [ "$WITH_OPENCLAW" = "true" ]; then | ||
| health_args+=(--require-openclaw) | ||
|
|
@@ -381,10 +393,10 @@ health_report() { | |
| health_args+=(--require-workspace-docs) | ||
| fi | ||
| if [ "$DRY_RUN" = "true" ]; then | ||
| run node scripts/eva-brain-health.mjs "${health_args[@]}" | ||
| run bun scripts/eva-brain-health.mjs "${health_args[@]}" | ||
| return | ||
| fi | ||
| run env GBRAIN_BIN="$HOME/.bun/bin/gbrain" node scripts/eva-brain-health.mjs "${health_args[@]}" | ||
| run env GBRAIN_BIN="$HOME/.bun/bin/gbrain" bun scripts/eva-brain-health.mjs "${health_args[@]}" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When an operator passes Useful? React with 👍 / 👎. |
||
| } | ||
|
|
||
| provider_test() { | ||
|
|
@@ -556,43 +568,6 @@ install_support_kb() { | |
| run node "$kb_dir/scripts/status.mjs" | ||
| run "$HOME/.bun/bin/gbrain" sync --repo "$kb_dir" --source openclaw-support-kb --no-embed | ||
| embed_support_kb_if_provider_auth_available | ||
| disable_source_cycle_freshness_if_supported openclaw-support-kb | ||
| } | ||
|
|
||
| disable_source_cycle_freshness_if_supported() { | ||
| disable_source_freshness_if_supported "$1" cycle-freshness | ||
| } | ||
|
|
||
| disable_source_sync_freshness_if_supported() { | ||
| disable_source_freshness_if_supported "$1" sync-freshness | ||
| } | ||
|
|
||
| disable_source_freshness_if_supported() { | ||
| local source_id="$1" | ||
| local freshness_command="$2" | ||
| local output | ||
| local cmd=("$HOME/.bun/bin/gbrain" sources "$freshness_command" "$source_id" off) | ||
| printf '+' | ||
| printf ' %q' "${cmd[@]}" | ||
| printf '\n' | ||
| if [ "$DRY_RUN" = "true" ]; then | ||
| log "Dry-run: skipping optional $freshness_command disable execution" | ||
| return | ||
| fi | ||
| if output="$("${cmd[@]}" 2>&1)"; then | ||
| printf '%s\n' "$output" | ||
| return | ||
| fi | ||
| local normalized_output | ||
| normalized_output="$(printf '%s' "$output" | tr -d '\r' | sed -e 's/[[:space:]]*$//')" | ||
| local first_line | ||
| first_line="$(printf '%s\n' "$normalized_output" | sed -n '1p')" | ||
| if [ "$first_line" = "Unknown sources subcommand: $freshness_command" ]; then | ||
| log "Skipping $freshness_command disable; installed gbrain does not expose 'sources $freshness_command'." | ||
| return | ||
| fi | ||
| printf '%s\n' "$output" >&2 | ||
| return 1 | ||
| } | ||
|
|
||
| install_workspace_docs() { | ||
|
|
@@ -621,8 +596,6 @@ install_workspace_docs() { | |
| fi | ||
| run "$HOME/.bun/bin/gbrain" import "$WORKSPACE_DOCS_DIR" --source-id "$WORKSPACE_DOCS_SOURCE" --no-embed | ||
| embed_source_if_provider_auth_available "$WORKSPACE_DOCS_SOURCE" "Workspace docs" | ||
| disable_source_cycle_freshness_if_supported "$WORKSPACE_DOCS_SOURCE" | ||
| disable_source_sync_freshness_if_supported "$WORKSPACE_DOCS_SOURCE" | ||
| } | ||
|
|
||
| main() { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.