Moves all Mosaic framework runtime files from the separate bootstrap repo into the monorepo as canonical source. The @mosaic/mosaic npm package now ships the complete framework — bin scripts, runtime configs, tools, and templates — enabling standalone installation via npm install. Structure: packages/mosaic/framework/ ├── bin/ 28 CLI scripts (mosaic, mosaic-doctor, mosaic-sync-skills, etc.) ├── runtime/ Runtime adapters (claude, codex, opencode, pi, mcp) ├── tools/ Shell tooling (git, prdy, orchestrator, quality, etc.) ├── templates/ Agent and repo templates ├── defaults/ Default identity files (AGENTS.md, STANDARDS.md, SOUL.md, etc.) ├── install.sh Legacy bash installer └── remote-install.sh One-liner remote installer Key files with Pi support and recent fixes: - bin/mosaic: launch_pi() with skills-local loop - bin/mosaic-doctor: --fix auto-wiring for all 4 harnesses - bin/mosaic-sync-skills: Pi as 4th link target, symlink-aware find - bin/mosaic-link-runtime-assets: Pi settings.json patching - bin/mosaic-migrate-local-skills: Pi skill roots, symlink find - runtime/pi/RUNTIME.md + mosaic-extension.ts Package ships 251 framework files in the npm tarball (278KB compressed).
49 lines
1.6 KiB
Bash
Executable File
49 lines
1.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
# shellcheck source=./common.sh
|
|
source "$SCRIPT_DIR/common.sh"
|
|
|
|
ensure_repo_root
|
|
load_repo_hooks
|
|
|
|
# ─── Mission session cleanup (ORCHESTRATOR-PROTOCOL) ────────────────────────
|
|
ORCH_DIR=".mosaic/orchestrator"
|
|
MISSION_JSON="$ORCH_DIR/mission.json"
|
|
SESSION_LOCK="$ORCH_DIR/session.lock"
|
|
COORD_LIB="$HOME/.config/mosaic/tools/orchestrator/_lib.sh"
|
|
|
|
if [[ -f "$SESSION_LOCK" ]] && [[ -f "$COORD_LIB" ]] && command -v jq &>/dev/null; then
|
|
# shellcheck source=/dev/null
|
|
source "$COORD_LIB"
|
|
|
|
sess_id="$(jq -r '.session_id // ""' "$SESSION_LOCK")"
|
|
if [[ -n "$sess_id" && -f "$MISSION_JSON" ]]; then
|
|
# Update mission.json: mark session ended
|
|
updated="$(jq \
|
|
--arg sid "$sess_id" \
|
|
--arg ts "$(iso_now)" \
|
|
--arg reason "completed" \
|
|
'(.sessions[] | select(.session_id == $sid)) |= . + {
|
|
ended_at: $ts,
|
|
ended_reason: $reason
|
|
}' "$MISSION_JSON")"
|
|
echo "$updated" > "$MISSION_JSON.tmp" && mv "$MISSION_JSON.tmp" "$MISSION_JSON"
|
|
echo "[agent-framework] Session $sess_id recorded in mission state"
|
|
fi
|
|
|
|
session_lock_clear "."
|
|
fi
|
|
|
|
if declare -F mosaic_hook_session_end >/dev/null 2>&1; then
|
|
run_step "Run repo end hook" mosaic_hook_session_end
|
|
else
|
|
echo "[agent-framework] No repo end hook configured (.mosaic/repo-hooks.sh)"
|
|
fi
|
|
|
|
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
|
run_step "Show status" git status --short
|
|
run_step "Show diff summary" git diff --stat
|
|
fi
|