@orkestrel/scaffold 0.0.2 → 0.0.4
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/README.md +29 -15
- package/dist/bin/scaffold.js +1162 -1200
- package/dist/bin/scaffold.js.map +1 -1
- package/dist/host/AGENTS.md +124 -925
- package/dist/host/CLAUDE.md +335 -495
- package/dist/host/agents/skills/orkestrel-align-packages/SKILL.md +53 -0
- package/dist/host/agents/skills/orkestrel-align-packages/agents/openai.yaml +4 -0
- package/dist/host/agents/skills/orkestrel-align-packages/references/fleet.md +50 -0
- package/dist/host/agents/skills/orkestrel-align-packages/references/integration.md +56 -0
- package/dist/host/agents/skills/orkestrel-build-application/SKILL.md +64 -0
- package/dist/host/agents/skills/orkestrel-build-application/agents/openai.yaml +4 -0
- package/dist/host/agents/skills/orkestrel-build-application/references/application.md +129 -0
- package/dist/host/agents/skills/orkestrel-harden-package/SKILL.md +64 -0
- package/dist/host/agents/skills/orkestrel-harden-package/agents/openai.yaml +4 -0
- package/dist/host/agents/skills/orkestrel-harden-package/references/centralization.md +85 -0
- package/dist/host/agents/skills/orkestrel-harden-package/references/contract.md +57 -0
- package/dist/host/agents/skills/orkestrel-harden-package/references/hardening.md +93 -0
- package/dist/host/agents/skills/orkestrel-harden-package/references/research.md +61 -0
- package/dist/host/claude/agents/application.md +30 -0
- package/dist/host/claude/agents/builder.md +10 -7
- package/dist/host/claude/agents/checker.md +14 -8
- package/dist/host/claude/agents/codex.md +94 -0
- package/dist/host/claude/agents/grok.md +37 -34
- package/dist/host/claude/agents/implementer.md +40 -0
- package/dist/host/claude/agents/orkestrel.md +88 -223
- package/dist/host/claude/agents/planner.md +13 -34
- package/dist/host/claude/agents/reviewer.md +38 -24
- package/dist/host/claude/agents/verifier.md +14 -10
- package/dist/host/claude/rules/application.md +57 -0
- package/dist/host/claude/rules/architecture.md +180 -0
- package/dist/host/claude/rules/browser.md +28 -0
- package/dist/host/claude/rules/documentation.md +64 -0
- package/dist/host/claude/rules/names.md +209 -0
- package/dist/host/claude/rules/patterns.md +130 -0
- package/dist/host/claude/rules/quality.md +45 -0
- package/dist/host/claude/rules/styles.md +64 -0
- package/dist/host/claude/rules/tests.md +123 -0
- package/dist/host/claude/rules/typescript.md +78 -0
- package/dist/host/claude/rules/workspace.md +180 -0
- package/dist/host/claude/settings.json +112 -0
- package/dist/host/claude/skills/orkestrel-align-packages/SKILL.md +10 -0
- package/dist/host/claude/skills/orkestrel-build-application/SKILL.md +12 -0
- package/dist/host/claude/skills/orkestrel-harden-package/SKILL.md +10 -0
- package/dist/host/codex/agents/analyst.toml +15 -0
- package/dist/host/codex/agents/application.toml +25 -0
- package/dist/host/codex/agents/builder.toml +24 -0
- package/dist/host/codex/agents/checker.toml +15 -0
- package/dist/host/codex/agents/grok.toml +17 -0
- package/dist/host/codex/agents/implementer.toml +17 -0
- package/dist/host/codex/agents/opus.toml +25 -0
- package/dist/host/codex/agents/orkestrel.toml +16 -0
- package/dist/host/codex/agents/planner.toml +20 -0
- package/dist/host/codex/agents/reviewer.toml +18 -0
- package/dist/host/codex/agents/verifier.toml +14 -0
- package/dist/host/codex/config.toml +66 -0
- package/dist/host/cursor/mcp.json +12 -0
- package/dist/host/dotfiles/mcp.json +8 -0
- package/dist/host/dotfiles/oxlintrc.json +307 -1
- package/dist/host/guides/src/scaffold.md +2059 -2007
- package/dist/host/manifest.json +376 -137
- package/dist/host/scripts/codex.sh +49 -0
- package/dist/host/scripts/cursor.sh +33 -47
- package/dist/host/scripts/deps.sh +34 -16
- package/dist/host/scripts/ollama.sh +6 -149
- package/dist/host/tests/setupPolicy.ts +390 -0
- package/dist/src/core/index.cjs +6603 -1200
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +802 -267
- package/dist/src/core/index.d.ts +802 -267
- package/dist/src/core/index.js +6521 -1192
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +3132 -593
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +643 -95
- package/dist/src/server/index.d.ts +643 -95
- package/dist/src/server/index.js +3054 -594
- package/dist/src/server/index.js.map +1 -1
- package/package.json +16 -12
- package/dist/host/claude/agents/composer.md +0 -64
- package/dist/host/claude/agents/researcher.md +0 -38
- package/dist/host/claude/agents/scout.md +0 -35
- package/dist/host/github/workflows/ci.yml +0 -64
|
@@ -1,74 +1,60 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
# ----------------------------------------------------------------------------
|
|
5
|
-
# The Cursor CLI has no daemon to launch: `agent` is invoked on demand by the
|
|
6
|
-
# composer/grok dispatchers. This hook SENSES the bench at session start and
|
|
7
|
-
# announces the result into Claude's context (SessionStart stdout).
|
|
8
|
-
#
|
|
9
|
-
# AUTH SENSING — evidence-based, in order of authority:
|
|
10
|
-
# 1. `agent status` exits 0 even when it prints "Not logged in" — its exit
|
|
11
|
-
# code proves nothing, and under CURSOR_API_KEY auth "Not logged in" is
|
|
12
|
-
# COSMETIC on headless hosts (status reflects interactive login only;
|
|
13
|
-
# key auth here is verified end-to-end and works regardless).
|
|
14
|
-
# 2. The per-session functional signal is `agent models`: reachable + pins
|
|
15
|
-
# present on the account ⇒ the bench is usable. A live dispatch remains
|
|
16
|
-
# the final arbiter; only USER API keys work (admin/org keys fail at
|
|
17
|
-
# dispatch time).
|
|
18
|
-
# NEVER prints CURSOR_API_KEY. Always exits 0 — problems are announcements,
|
|
19
|
-
# not session blockers.
|
|
20
|
-
# ============================================================================
|
|
2
|
+
# SessionStart capability probe for the Cursor bench. External command output,
|
|
3
|
+
# model identifiers, and credentials never cross the hook-to-context boundary.
|
|
21
4
|
|
|
22
5
|
if [ "${CLAUDE_CODE_REMOTE:-}" != "true" ]; then
|
|
23
6
|
exit 0
|
|
24
7
|
fi
|
|
25
8
|
|
|
26
9
|
if ! command -v agent >/dev/null 2>&1; then
|
|
27
|
-
echo "cursor.sh: bench
|
|
10
|
+
echo "cursor.sh: bench unavailable; use an in-session research route."
|
|
28
11
|
exit 0
|
|
29
12
|
fi
|
|
30
13
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
14
|
+
MODELS_LOG="$(mktemp /tmp/orkestrel-cursor-models.XXXXXX)" || exit 0
|
|
15
|
+
chmod 600 "$MODELS_LOG"
|
|
16
|
+
cleanup_cursor_log() {
|
|
17
|
+
rm -f -- "$MODELS_LOG"
|
|
18
|
+
}
|
|
19
|
+
trap cleanup_cursor_log EXIT
|
|
34
20
|
|
|
35
21
|
models_ok=0
|
|
36
|
-
if agent models
|
|
22
|
+
if agent models >"$MODELS_LOG" 2>&1; then
|
|
37
23
|
models_ok=1
|
|
38
24
|
fi
|
|
39
25
|
|
|
40
|
-
|
|
41
|
-
|
|
26
|
+
valid_pin() {
|
|
27
|
+
case "$1" in
|
|
28
|
+
''|-*|*[!A-Za-z0-9._-]*) return 1 ;;
|
|
29
|
+
esac
|
|
30
|
+
[ "${#1}" -le 128 ]
|
|
31
|
+
}
|
|
32
|
+
|
|
42
33
|
id_ok() {
|
|
43
|
-
|
|
44
|
-
grep -Eq "${
|
|
34
|
+
escaped="$(printf '%s' "$1" | sed 's/[][\.^$*+?(){}|]/\\&/g')"
|
|
35
|
+
grep -Eq -- "${escaped}([^A-Za-z0-9._-]|$)" "$MODELS_LOG"
|
|
45
36
|
}
|
|
46
37
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
38
|
+
pins="pins ready"
|
|
39
|
+
if [ -z "${CURSOR_GROK_MODEL:-}" ]; then
|
|
40
|
+
pins="pins missing"
|
|
41
|
+
elif ! valid_pin "$CURSOR_GROK_MODEL"; then
|
|
42
|
+
pins="pins invalid"
|
|
51
43
|
elif [ "$models_ok" = "1" ]; then
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
break
|
|
56
|
-
fi
|
|
57
|
-
done
|
|
44
|
+
if ! id_ok "$CURSOR_GROK_MODEL"; then
|
|
45
|
+
pins="pins unavailable"
|
|
46
|
+
fi
|
|
58
47
|
else
|
|
59
|
-
pins="pins
|
|
48
|
+
pins="pins unverified"
|
|
60
49
|
fi
|
|
61
50
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
auth="interactive login present (${status_line})"
|
|
51
|
+
if [ "$models_ok" = "1" ]; then
|
|
52
|
+
auth="authentication reachable"
|
|
65
53
|
elif [ -z "${CURSOR_API_KEY:-}" ]; then
|
|
66
|
-
auth="
|
|
67
|
-
elif [ "$models_ok" = "1" ]; then
|
|
68
|
-
auth="key-auth reachable (status 'Not logged in' is cosmetic under key auth)"
|
|
54
|
+
auth="authentication unavailable"
|
|
69
55
|
else
|
|
70
|
-
auth="
|
|
56
|
+
auth="authentication unverified"
|
|
71
57
|
fi
|
|
72
58
|
|
|
73
|
-
echo "cursor.sh: bench
|
|
59
|
+
echo "cursor.sh: bench detected; ${auth}; ${pins}."
|
|
74
60
|
exit 0
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
# ============================================================================
|
|
3
|
-
# scripts/deps.sh — SessionStart hook: project dependencies
|
|
3
|
+
# scripts/deps.sh — SessionStart hook: reproducible project dependencies
|
|
4
4
|
# ----------------------------------------------------------------------------
|
|
5
|
-
# Runs in
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
# ONE meaningful line and sends the npm noise to /tmp/deps.log.
|
|
5
|
+
# Runs only in Claude Code's remote environment. The lockfile digest marker
|
|
6
|
+
# prevents a resumed session from treating stale node_modules as a valid
|
|
7
|
+
# installation after package-lock.json changes.
|
|
9
8
|
# ============================================================================
|
|
10
9
|
|
|
11
10
|
if [ "${CLAUDE_CODE_REMOTE:-}" != "true" ]; then
|
|
@@ -17,22 +16,41 @@ cd "$CLAUDE_PROJECT_DIR" || exit 0
|
|
|
17
16
|
if [ ! -f package.json ]; then
|
|
18
17
|
exit 0
|
|
19
18
|
fi
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
|
|
20
|
+
LOCK_MARKER="node_modules/.orkestrel-lock.sha256"
|
|
21
|
+
DEPS_LOG="$(mktemp /tmp/orkestrel-deps.XXXXXX)" || {
|
|
22
|
+
echo "deps.sh: could not create a private dependency log — skipped."
|
|
22
23
|
exit 0
|
|
23
|
-
|
|
24
|
+
}
|
|
25
|
+
chmod 600 "$DEPS_LOG"
|
|
26
|
+
|
|
27
|
+
cleanup_deps_log() {
|
|
28
|
+
rm -f -- "$DEPS_LOG"
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
trap cleanup_deps_log EXIT
|
|
24
32
|
|
|
25
33
|
if [ -f package-lock.json ]; then
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
LOCK_HASH="$(node -e "process.stdout.write(require('node:crypto').createHash('sha256').update(require('node:fs').readFileSync('package-lock.json')).digest('hex'))" 2>"$DEPS_LOG")"
|
|
35
|
+
|
|
36
|
+
if [ -n "$LOCK_HASH" ] &&
|
|
37
|
+
[ -d node_modules ] &&
|
|
38
|
+
[ -f "$LOCK_MARKER" ] &&
|
|
39
|
+
[ "$(tr -d '\r\n' <"$LOCK_MARKER")" = "$LOCK_HASH" ]; then
|
|
40
|
+
echo "deps.sh: dependencies match package-lock.json — skipped."
|
|
41
|
+
exit 0
|
|
30
42
|
fi
|
|
31
|
-
|
|
32
|
-
if npm
|
|
33
|
-
|
|
43
|
+
|
|
44
|
+
if npm ci --ignore-scripts >"$DEPS_LOG" 2>&1; then
|
|
45
|
+
if [ -n "$LOCK_HASH" ]; then
|
|
46
|
+
printf '%s\n' "$LOCK_HASH" >"$LOCK_MARKER"
|
|
47
|
+
fi
|
|
48
|
+
echo "deps.sh: dependencies installed from package-lock.json (npm ci)."
|
|
34
49
|
else
|
|
35
|
-
echo "deps.sh: npm
|
|
50
|
+
echo "deps.sh: npm ci failed; dependency installation remains incomplete."
|
|
36
51
|
fi
|
|
52
|
+
else
|
|
53
|
+
echo "deps.sh: no package-lock.json — automatic installation refused; commit a lockfile."
|
|
37
54
|
fi
|
|
55
|
+
|
|
38
56
|
exit 0
|
|
@@ -1,163 +1,20 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
# ----------------------------------------------------------------------------
|
|
5
|
-
# One job: bring the local-model daemon up for this session, healthy.
|
|
6
|
-
# Project dependencies live in scripts/deps.sh; the Cursor bench check lives in
|
|
7
|
-
# scripts/cursor.sh. All three are registered in .claude/settings.json and run
|
|
8
|
-
# IN PARALLEL at session start, so the daemon boots while npm installs.
|
|
9
|
-
#
|
|
10
|
-
# 0. Guards -- the orchestration set (hooks included) is mirrored
|
|
11
|
-
# byte-identical across every @orkestrel repo, and this repo serves
|
|
12
|
-
# several cloud environments: exit quietly in any repo that isn't
|
|
13
|
-
# @orkestrel/ollama, and wherever the ollama binary isn't installed.
|
|
14
|
-
# 1. Starts `ollama serve` -- the environment cache snapshots FILES, not
|
|
15
|
-
# running processes, so the daemon must be restarted every session.
|
|
16
|
-
# 2. Self-heals a known container defect -- this container class advertises
|
|
17
|
-
# AMX CPU flags but blocks AMX tile-state permissions at the kernel /
|
|
18
|
-
# seccomp level. Ollama's dynamic CPU-backend loader picks its only
|
|
19
|
-
# AMX-capable variant (libggml-cpu-sapphirerapids.so) on such hosts, and
|
|
20
|
-
# llama-server then segfaults on every model load. A cheap chat probe
|
|
21
|
-
# after the daemon comes up doubles as session warmup AND a canary for
|
|
22
|
-
# this failure; if it fires, we disable that .so and restart the daemon
|
|
23
|
-
# so the loader falls back to the next-best AVX-512 variant.
|
|
24
|
-
#
|
|
25
|
-
# SessionStart stdout is injected into Claude's context: keep stdout to terse
|
|
26
|
-
# status lines (they tell Claude what this environment offers); diagnostics go
|
|
27
|
-
# to stderr / /tmp/ollama.log. No `set -e`: a self-heal misfire should not
|
|
28
|
-
# stop Ollama from coming up.
|
|
29
|
-
# ============================================================================
|
|
2
|
+
# SessionStart loopback capability probe. Lifecycle stays user-owned and no
|
|
3
|
+
# caller-controlled endpoint is contacted or copied into model context.
|
|
30
4
|
|
|
31
|
-
# Run only in cloud sessions. Locally you manage your own Ollama, so skip.
|
|
32
5
|
if [ "${CLAUDE_CODE_REMOTE:-}" != "true" ]; then
|
|
33
6
|
exit 0
|
|
34
7
|
fi
|
|
35
8
|
|
|
36
|
-
# --- 0. Guards ---------------------------------------------------------------
|
|
37
|
-
# The daemon only serves the ollama package; every other @orkestrel repo
|
|
38
|
-
# carries this script as part of the mirrored hook set and must skip silently.
|
|
39
|
-
PKG_JSON="${CLAUDE_PROJECT_DIR:-$(cd "$(dirname "$0")/.." && pwd)}/package.json"
|
|
40
|
-
if ! grep -Eq '"name"[[:space:]]*:[[:space:]]*"@orkestrel/ollama"' "$PKG_JSON" 2>/dev/null; then
|
|
41
|
-
exit 0
|
|
42
|
-
fi
|
|
43
9
|
if ! command -v ollama >/dev/null 2>&1; then
|
|
44
|
-
echo "ollama.sh:
|
|
45
|
-
exit 0
|
|
46
|
-
fi
|
|
47
|
-
|
|
48
|
-
# Match the locations used by the setup script / environment variables.
|
|
49
|
-
export OLLAMA_MODELS="${OLLAMA_MODELS:-/opt/ollama/models}"
|
|
50
|
-
export OLLAMA_HOST="${OLLAMA_HOST:-127.0.0.1:11434}"
|
|
51
|
-
|
|
52
|
-
# Your Copilot workflow set OLLAMA_ORIGINS="*" so browser page contexts could
|
|
53
|
-
# call the API cross-origin. That was mainly a Playwright concern, so it is off
|
|
54
|
-
# here. Uncomment if anything still hits Ollama from a browser:
|
|
55
|
-
# export OLLAMA_ORIGINS="*"
|
|
56
|
-
|
|
57
|
-
# --- 1. Start the daemon ----------------------------------------------------
|
|
58
|
-
if ! curl -sf "http://${OLLAMA_HOST}/api/tags" >/dev/null 2>&1; then
|
|
59
|
-
nohup ollama serve >/tmp/ollama.log 2>&1 &
|
|
60
|
-
fi
|
|
61
|
-
|
|
62
|
-
ollama_ready=0
|
|
63
|
-
for i in $(seq 1 30); do
|
|
64
|
-
if curl -sf "http://${OLLAMA_HOST}/api/tags" >/dev/null 2>&1; then
|
|
65
|
-
echo "Ollama ready on ${OLLAMA_HOST}"
|
|
66
|
-
ollama_ready=1
|
|
67
|
-
break
|
|
68
|
-
fi
|
|
69
|
-
sleep 1
|
|
70
|
-
done
|
|
71
|
-
|
|
72
|
-
if [ "$ollama_ready" != "1" ]; then
|
|
73
|
-
# Don't fail the session if the daemon is slow; Claude can retry mid-session.
|
|
74
|
-
echo "Warning: Ollama did not report ready within 30s (see /tmp/ollama.log)" >&2
|
|
10
|
+
echo "ollama.sh: loopback capability unavailable."
|
|
75
11
|
exit 0
|
|
76
12
|
fi
|
|
77
13
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
# installed both warms that model for the session AND tells us whether this
|
|
81
|
-
# container hit the AMX-tile-permission wall. If it did, disable the
|
|
82
|
-
# AMX-only CPU backend variant and restart the daemon so the loader falls
|
|
83
|
-
# back to AVX-512, then re-probe once to confirm the fix landed.
|
|
84
|
-
sapphirerapids_so="/usr/local/lib/ollama/libggml-cpu-sapphirerapids.so"
|
|
85
|
-
|
|
86
|
-
probe_model() {
|
|
87
|
-
curl -sf "http://${OLLAMA_HOST}/api/tags" 2>/dev/null \
|
|
88
|
-
| grep -o '"name":"[^"]*"' \
|
|
89
|
-
| head -n 1 \
|
|
90
|
-
| sed -e 's/"name":"//' -e 's/"$//'
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
probe_chat() {
|
|
94
|
-
model="$1"
|
|
95
|
-
curl -s --max-time 120 "http://${OLLAMA_HOST}/api/chat" \
|
|
96
|
-
-d "{\"model\":\"${model}\",\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}],\"stream\":false,\"think\":false,\"keep_alive\":\"30m\",\"options\":{\"num_predict\":1}}"
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
model="$(probe_model)"
|
|
100
|
-
if [ -z "$model" ]; then
|
|
101
|
-
# No model installed yet -- nothing to warm or probe against.
|
|
102
|
-
echo "ollama.sh: no installed model found, skipping warmup probe." >&2
|
|
103
|
-
exit 0
|
|
104
|
-
fi
|
|
105
|
-
|
|
106
|
-
probe_response="$(probe_chat "$model")"
|
|
107
|
-
|
|
108
|
-
if echo "$probe_response" | grep -qi 'segmentation fault\|llama-server process has terminated'; then
|
|
109
|
-
echo "ollama.sh: detected llama-server crash on model warmup (likely the AMX/XTILE-blocked-container defect)." >&2
|
|
110
|
-
if [ -f "$sapphirerapids_so" ]; then
|
|
111
|
-
echo "ollama.sh: disabling AMX-only CPU backend variant so the loader falls back to AVX-512." >&2
|
|
112
|
-
if mv "$sapphirerapids_so" "${sapphirerapids_so}.disabled" 2>/dev/null; then
|
|
113
|
-
echo "ollama.sh: restarting Ollama daemon to pick up the backend change." >&2
|
|
114
|
-
ollama_pid="$(pgrep -x ollama | head -n 1)"
|
|
115
|
-
if [ -n "$ollama_pid" ]; then
|
|
116
|
-
kill "$ollama_pid" 2>/dev/null
|
|
117
|
-
# Wait for the old process to actually exit before relaunching, so the
|
|
118
|
-
# new daemon can't race the dying one for the port and the readiness
|
|
119
|
-
# poll below can't be satisfied by the dying daemon.
|
|
120
|
-
for i in $(seq 1 10); do
|
|
121
|
-
if ! kill -0 "$ollama_pid" 2>/dev/null; then
|
|
122
|
-
break
|
|
123
|
-
fi
|
|
124
|
-
sleep 0.5
|
|
125
|
-
done
|
|
126
|
-
fi
|
|
127
|
-
nohup ollama serve >/tmp/ollama.log 2>&1 &
|
|
128
|
-
|
|
129
|
-
restarted_ready=0
|
|
130
|
-
for i in $(seq 1 30); do
|
|
131
|
-
if curl -sf "http://${OLLAMA_HOST}/api/tags" >/dev/null 2>&1; then
|
|
132
|
-
restarted_ready=1
|
|
133
|
-
break
|
|
134
|
-
fi
|
|
135
|
-
sleep 1
|
|
136
|
-
done
|
|
137
|
-
|
|
138
|
-
if [ "$restarted_ready" = "1" ]; then
|
|
139
|
-
retry_response="$(probe_chat "$model")"
|
|
140
|
-
if echo "$retry_response" | grep -qi 'segmentation fault\|llama-server process has terminated'; then
|
|
141
|
-
echo "ollama.sh: self-heal restart complete, but the retry probe still failed. See /tmp/ollama.log." >&2
|
|
142
|
-
else
|
|
143
|
-
echo "ollama.sh: self-heal succeeded -- model warm (${model}) after AVX-512 fallback."
|
|
144
|
-
fi
|
|
145
|
-
else
|
|
146
|
-
echo "ollama.sh: daemon did not report ready after self-heal restart (see /tmp/ollama.log)." >&2
|
|
147
|
-
fi
|
|
148
|
-
else
|
|
149
|
-
echo "ollama.sh: warning -- could not rename ${sapphirerapids_so} (permissions?). Leaving daemon as-is." >&2
|
|
150
|
-
fi
|
|
151
|
-
else
|
|
152
|
-
echo "ollama.sh: warning -- AMX-only CPU backend not found at expected path; cannot self-heal automatically." >&2
|
|
153
|
-
fi
|
|
154
|
-
elif echo "$probe_response" | grep -q '"message"\|"content"\|"done":true'; then
|
|
155
|
-
echo "ollama.sh: model warm (${model}) -- warmup probe succeeded."
|
|
14
|
+
if curl -sf --max-time 2 "http://127.0.0.1:11434/api/tags" >/dev/null 2>&1; then
|
|
15
|
+
echo "ollama.sh: loopback capability ready; lifecycle remains user-owned."
|
|
156
16
|
else
|
|
157
|
-
echo "ollama.sh:
|
|
158
|
-
echo "ollama.sh: ${probe_response}" | head -c 500 >&2
|
|
159
|
-
echo "" >&2
|
|
160
|
-
echo "ollama.sh: leaving daemon as-is." >&2
|
|
17
|
+
echo "ollama.sh: loopback capability unreachable; lifecycle remains user-owned."
|
|
161
18
|
fi
|
|
162
19
|
|
|
163
20
|
exit 0
|