Initial public push: docs cosmos v4 + AI module + framework groundwork
This is the snapshot the production landing site (nibiru-framework.com) is deployed from. Brings together the recent splash + docs migration to the v4 "Cosmos" design system, the new in-framework AI module, and the framework groundwork that backs the framework-reference extraction. What lands: - docs/: Astro + Starlight site with the v4 dark cosmic palette, GalaxyHero canvas constellation, Mission Control chat (wired to /api/oracle → api.neuronetz.ai via providers.mjs Ollama), 5-panel MMVC stage (Model · AI · Module · Controller · View), translated EN/DE/JA/ES/FR content, PWA + sitemap + llms.txt + Umami analytics. - docs/design-system/: canonical mockup bundle (source/index-v2.html for splash, source/docs-system.html + preview/ for docs, SPEC.md, tokens). - docs/scripts/extraction/framework-reference-v2.md: deep framework reference (~1.6k lines, file:line citations, every public factory and idiom — basis for the LoRA training corpus. - application/module/ai/: AI module with chat / embed / RAG / agent plugins, plus pdoQuery / httpGet / fileRead tools and Modelfile + smoke-test in training/. - application/module/users/: user / ACL / form-factory traits used as the reference plugin pattern for the framework docs. - application/settings/config/database/: schema + seed migrations including the AI module tables (200–203). - Form factory + autogenerator changes the framework-reference-v2 covers. Production secrets stay out: docs/.env, settings.production.ini and ai.production.ini are all gitignored (.example files are in tree). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
60
application/module/ai/training/build.sh
Executable file
60
application/module/ai/training/build.sh
Executable file
@@ -0,0 +1,60 @@
|
||||
#!/usr/bin/env bash
|
||||
# =============================================================================
|
||||
# Build nibiru-coder on the configured Ollama server.
|
||||
#
|
||||
# Usage:
|
||||
# ./application/module/ai/training/build.sh # default tag :1.0
|
||||
# ./application/module/ai/training/build.sh 1.1 # custom tag
|
||||
# OLLAMA_BASE_URL=https://your.ollama.example ./.../build.sh # remote Ollama
|
||||
#
|
||||
# Prereqs:
|
||||
# - The base model (qwen2.5-coder:14b) is already pulled on the server.
|
||||
# - jq is installed locally.
|
||||
# =============================================================================
|
||||
set -euo pipefail
|
||||
|
||||
OLLAMA_BASE_URL="${OLLAMA_BASE_URL:-http://localhost:11434}"
|
||||
TAG="${1:-1.0}"
|
||||
MODEL_NAME="nibiru-coder:${TAG}"
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
MODELFILE_PATH="${SCRIPT_DIR}/Modelfile"
|
||||
|
||||
if [ ! -f "$MODELFILE_PATH" ]; then
|
||||
echo "Modelfile not found at $MODELFILE_PATH" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v jq >/dev/null 2>&1; then
|
||||
echo "jq is required: https://stedolan.github.io/jq/" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Building $MODEL_NAME on $OLLAMA_BASE_URL …"
|
||||
RESP=$(jq -n \
|
||||
--arg name "$MODEL_NAME" \
|
||||
--rawfile mf "$MODELFILE_PATH" \
|
||||
'{name: $name, modelfile: $mf, stream: false}' \
|
||||
| curl -sS -X POST "${OLLAMA_BASE_URL}/api/create" \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-binary @-)
|
||||
|
||||
echo "$RESP" | jq -r '.status // .error // "ok"'
|
||||
|
||||
# Smoke test — make sure it answers.
|
||||
echo
|
||||
echo "Smoke test: 'What does Form::create() do?'"
|
||||
curl -sS "${OLLAMA_BASE_URL}/api/chat" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d "$(jq -n --arg m "$MODEL_NAME" '{
|
||||
model: $m,
|
||||
messages: [{role:"user", content:"In one sentence, what does Form::create() do in Nibiru?"}],
|
||||
stream: false,
|
||||
options: {num_predict: 60}
|
||||
}')" | jq -r '.message.content'
|
||||
|
||||
echo
|
||||
echo "Done. Use the model:"
|
||||
echo " curl ${OLLAMA_BASE_URL}/api/chat -d '{\"model\":\"$MODEL_NAME\",\"messages\":[…]}'"
|
||||
echo "or set in your app:"
|
||||
echo " [AI]"
|
||||
echo " chat.model = \"$MODEL_NAME\""
|
||||
Reference in New Issue
Block a user