pantheon-opencode 1.6.0-beta.8 → 1.6.0
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/AGENTS.global.md +118 -0
- package/AGENTS.md +18 -168
- package/CHANGELOG.md +126 -346
- package/README.md +83 -608
- package/README.pt-BR.md +120 -345
- package/bin/pantheon-init.mjs +366 -132
- package/commands/pantheon-audit.md +7 -1
- package/commands/pantheon-consolidate.md +1 -1
- package/commands/pantheon-deepwork.md +14 -3
- package/commands/pantheon-focus.md +17 -0
- package/commands/pantheon-vision.md +61 -12
- package/package.json +19 -11
- package/plugin.json +1 -1
- package/pyproject.toml +6 -2
- package/scripts/_pantheon_paths.py +24 -0
- package/scripts/build-agents-md.mjs +368 -69
- package/scripts/changelog-merge.mjs +161 -0
- package/scripts/check-plugin-v2-coverage.mjs +11 -8
- package/scripts/docs-check-changelog.mjs +204 -0
- package/scripts/docs-link-check.mjs +314 -0
- package/scripts/docs-media.mjs +157 -0
- package/scripts/doctor.mjs +828 -40
- package/scripts/install/agents-md.mjs +2 -2
- package/scripts/install/backup.mjs +648 -0
- package/scripts/install/cli-ui.mjs +303 -72
- package/scripts/install/component-selection.mjs +61 -0
- package/scripts/install/config-migration.mjs +583 -27
- package/scripts/install/exit-codes.mjs +26 -0
- package/scripts/install/file-inventory.mjs +555 -0
- package/scripts/install/health-check.mjs +31 -25
- package/scripts/install/interactive.mjs +78 -383
- package/scripts/install/migrate.mjs +49 -25
- package/scripts/install/model-picker.mjs +218 -250
- package/scripts/install/opencode-version.mjs +83 -21
- package/scripts/install/opencode.mjs +1465 -180
- package/scripts/install/plan-artifact.mjs +517 -0
- package/scripts/install/plan.mjs +475 -0
- package/scripts/install/plugin.mjs +251 -30
- package/scripts/install/prompt-result.mjs +2 -0
- package/scripts/install/shared.mjs +256 -99
- package/scripts/install/state.mjs +63 -8
- package/scripts/install/strings.mjs +60 -4
- package/scripts/install/venv.mjs +90 -47
- package/scripts/install/verify.mjs +128 -0
- package/scripts/install/vision-prompt.mjs +173 -0
- package/scripts/install-mcp.mjs +2 -2
- package/scripts/manifest-inventory.mjs +49 -3
- package/scripts/mcp_persistence.py +1535 -1050
- package/scripts/memory_mcp.py +12 -843
- package/scripts/node-engine-policy.mjs +85 -0
- package/scripts/package-evidence.mjs +10 -2
- package/scripts/postinstall.mjs +26 -26
- package/scripts/probe-pantheon-cost.mjs +118 -19
- package/scripts/prune.mjs +9 -3
- package/scripts/reconcile.mjs +325 -0
- package/scripts/release-gates.mjs +682 -0
- package/scripts/restore.mjs +222 -0
- package/scripts/run-node-tests.mjs +24 -8
- package/scripts/sync-artifacts.mjs +20 -7
- package/scripts/sync-tui.mjs +29 -4
- package/scripts/test-opencode-v2-sandbox.sh +36 -123
- package/scripts/uninstall.mjs +369 -34
- package/scripts/update.mjs +164 -0
- package/scripts/validate-node-engine-policy.mjs +13 -0
- package/scripts/version-check.mjs +34 -1
- package/scripts/versioning.mjs +23 -3
- package/scripts/vision-status.mjs +682 -0
- package/skills-lock.json +8 -8
- package/src/agents/aphrodite.md +13 -10
- package/src/agents/apollo.md +4 -5
- package/src/agents/athena.md +74 -46
- package/src/agents/demeter.md +10 -7
- package/src/agents/gaia.md +0 -1
- package/src/agents/hephaestus.md +4 -3
- package/src/agents/hermes.md +10 -9
- package/src/agents/iris.md +6 -1
- package/src/agents/mnemosyne.md +14 -15
- package/src/agents/nyx.md +4 -4
- package/src/agents/prometheus.md +12 -11
- package/src/agents/talos.md +6 -0
- package/src/agents/zeus.md +84 -56
- package/src/instructions/agent-return-format.instructions.md +12 -41
- package/src/instructions/memory-protocol.instructions.md +5 -11
- package/src/instructions/test-economy.instructions.md +12 -0
- package/src/instructions/yagni.instructions.md +6 -15
- package/src/instructions/zeus-anti-stall.instructions.md +6 -6
- package/src/instructions/zeus-communication-rules.instructions.md +6 -6
- package/src/instructions/zeus-council-synthesis.instructions.md +11 -12
- package/src/instructions/zeus-memory-operations.instructions.md +13 -7
- package/src/instructions/zeus-timeout-retry.instructions.md +36 -10
- package/src/mcp/_pantheon_paths.py +24 -0
- package/src/mcp/mcp_codemap_module.py +86 -18
- package/src/mcp/mcp_persistence.py +1535 -1050
- package/src/mcp/memory_mcp.py +444 -94
- package/src/mcp/pantheon_vision.py +285 -41
- package/src/mcp/requirements-mcp.txt +5 -0
- package/src/pantheon/context-pruner.ts +541 -0
- package/src/pantheon/cost-command.ts +814 -60
- package/src/pantheon/goal-loop.ts +11 -8
- package/src/pantheon/memory-context.ts +1017 -0
- package/src/pantheon/model-agents.ts +19 -0
- package/src/pantheon/model-command.ts +218 -56
- package/src/pantheon/model-pricing.ts +536 -0
- package/src/pantheon/presets.mjs +2 -0
- package/src/pantheon/task-result-guard.ts +50 -14
- package/src/pantheon/v2-bounded-read.ts +640 -0
- package/src/pantheon/v2-delegation-enforce.ts +133 -6
- package/src/pantheon/v2-execute-after.ts +135 -24
- package/src/pantheon/v2-model-overrides.ts +275 -0
- package/src/pantheon/v2-tools.ts +89 -35
- package/src/pantheon/v2-unsupported.mjs +2 -3
- package/src/pantheon/v2-vision.ts +622 -0
- package/src/pantheon/vision-local.ts +531 -0
- package/src/pantheon/vision.ts +1160 -115
- package/src/plugin-v2.ts +654 -162
- package/src/plugin.ts +15 -11
- package/src/plugins/tui/dist/tui-v2.d.ts +1036 -0
- package/src/plugins/tui/dist/tui-v2.d.ts.map +1 -0
- package/src/plugins/tui/dist/tui-v2.js +3808 -0
- package/src/plugins/tui/dist/tui-v2.js.map +1 -0
- package/src/plugins/tui/dist/tui.js +4 -4
- package/src/plugins/tui/index-v2.ts +6 -0
- package/src/plugins/tui/package-lock.json +5416 -1297
- package/src/plugins/tui/package.json +14 -10
- package/src/plugins/tui/src/index-v2.tsx +4372 -0
- package/src/plugins/tui/src/index.tsx +3 -3
- package/src/plugins/tui/src/opencode-v2.d.ts +13 -0
- package/src/plugins/tui/tsconfig.typecheck.json +5 -0
- package/src/plugins/tui/tsdown.config.ts +2 -2
- package/src/plugins/tui/tui-v2.ts +2 -0
- package/src/plugins/tui/tui.ts +3 -0
- package/src/routing.yml +50 -5
- package/src/skills/agent-coordination/SKILL.md +7 -2
- package/src/skills/artifact-management/SKILL.md +5 -1
- package/src/skills/auto-continue/SKILL.md +14 -6
- package/src/skills/codemap/SKILL.md +1 -1
- package/src/skills/memory-bank/SKILL.md +21 -13
- package/src/skills/session-goal/SKILL.md +14 -15
- package/src/skills/spec-driven-development/SKILL.md +3 -1
- package/src/skills/worktrees/SKILL.md +30 -11
- package/scripts/probe-context-rehydrate.mjs +0 -263
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
# `@opencode/plugin@2.0.18` SDK contract or compatibility across the full 2.x
|
|
16
16
|
# line. This project is V2-exclusive, so there is a single host leg to validate.
|
|
17
17
|
#
|
|
18
|
-
# Modes (
|
|
18
|
+
# Modes (run sequentially; a failure stops later checks):
|
|
19
19
|
# --prepare Build tarball, install pantheon-opencode + the OpenCode V2
|
|
20
20
|
# binary in the sandbox prefix, headless init, and generate
|
|
21
21
|
# the project config and sandbox run-test.sh.
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
# regenerated first).
|
|
24
24
|
# --prompts Prompt battery via `opencode run --format json`.
|
|
25
25
|
# --cost Offline pantheon_cost probe.
|
|
26
|
-
# --rehydrate Offline context_rehydrate + context_session_summary probe.
|
|
27
26
|
# --hooks V2 hook canary: proves hook callbacks FIRE through the
|
|
28
27
|
# sandbox's V2 binary (not merely that a plugin loaded).
|
|
29
28
|
# This does not test transform callback effects or Pantheon
|
|
@@ -33,6 +32,11 @@
|
|
|
33
32
|
#
|
|
34
33
|
# Env overrides:
|
|
35
34
|
# PANTHEON_SANDBOX_ROOT Sandbox root (default: ~/pantheon-sandbox)
|
|
35
|
+
# PANTHEON_SANDBOX_TARBALL Optional pre-built package tarball to install
|
|
36
|
+
# instead of running `npm pack` in the checkout. The
|
|
37
|
+
# release gate points this at its one immutable
|
|
38
|
+
# artifact so the sandbox validates the exact bytes
|
|
39
|
+
# that will be published.
|
|
36
40
|
# OPENCODE_V2_SPEC npm spec providing the V2 binary
|
|
37
41
|
# (default: @opencode/cli@latest). NOTE: this is an
|
|
38
42
|
# install spec only — it is not a dependency of this
|
|
@@ -67,6 +71,12 @@ OPENCODE_V2_SPEC="${OPENCODE_V2_SPEC:-@opencode/cli@latest}"
|
|
|
67
71
|
PANTHEON_SANDBOX_MODEL="${PANTHEON_SANDBOX_MODEL:-opencode-go/mimo-v2.5}"
|
|
68
72
|
PANTHEON_PROMPT_TIMEOUT="${PANTHEON_PROMPT_TIMEOUT:-300}"
|
|
69
73
|
|
|
74
|
+
# Optional pre-built package tarball. The release gate sets this to the ONE
|
|
75
|
+
# immutable artifact it already packed and hashed, so the sandbox installs the
|
|
76
|
+
# exact bytes that will be published instead of packing a second tarball. When
|
|
77
|
+
# unset (developer use) --prepare keeps packing from the checkout.
|
|
78
|
+
SANDBOX_TARBALL="${PANTHEON_SANDBOX_TARBALL:-}"
|
|
79
|
+
|
|
70
80
|
V2_BIN="${OPENCODE_V2_BIN:-opencode2}"
|
|
71
81
|
|
|
72
82
|
# OpenCode V2's CLI talks to its background service for `mcp list`. Keep the
|
|
@@ -88,14 +98,12 @@ TARGET_VERSION="v2"
|
|
|
88
98
|
|
|
89
99
|
REPORT_FILE="$SANDBOX_ROOT/prompts-report.md"
|
|
90
100
|
COST_REPORT_FILE="$SANDBOX_ROOT/pantheon-cost-report.md"
|
|
91
|
-
REHYDRATE_REPORT_FILE="$SANDBOX_ROOT/context-rehydrate-report.md"
|
|
92
101
|
EXTRACT_PY="$SANDBOX_ROOT/.prompt-extract-json.py"
|
|
93
102
|
|
|
94
103
|
MODE_PREPARE=0
|
|
95
104
|
MODE_RESET=0
|
|
96
105
|
MODE_PROMPTS=0
|
|
97
106
|
MODE_COST=0
|
|
98
|
-
MODE_REHYDRATE=0
|
|
99
107
|
MODE_HOOKS=0
|
|
100
108
|
RUN_VERSION=""
|
|
101
109
|
|
|
@@ -265,7 +273,10 @@ for record in records:
|
|
|
265
273
|
if command != python_bin or cwd != runtime_dir or script not in expected:
|
|
266
274
|
raise SystemExit(1)
|
|
267
275
|
registered.add(script)
|
|
268
|
-
|
|
276
|
+
# OpenCode can initialize the same configured workspace more than once during
|
|
277
|
+
# service startup and `mcp list`. Count the logical server set here; the later
|
|
278
|
+
# `mcp list` assertion still requires exactly five connected MCP names.
|
|
279
|
+
if registered != expected:
|
|
269
280
|
raise SystemExit(1)
|
|
270
281
|
PY
|
|
271
282
|
then
|
|
@@ -1109,14 +1120,26 @@ cmd_reset() {
|
|
|
1109
1120
|
}
|
|
1110
1121
|
|
|
1111
1122
|
install_binaries() {
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1123
|
+
local tgz_path
|
|
1124
|
+
if [ -n "$SANDBOX_TARBALL" ]; then
|
|
1125
|
+
[ -f "$SANDBOX_TARBALL" ] \
|
|
1126
|
+
|| die "PANTHEON_SANDBOX_TARBALL does not exist: $SANDBOX_TARBALL"
|
|
1127
|
+
tgz_path="$(cd "$(dirname "$SANDBOX_TARBALL")" && pwd)/$(basename "$SANDBOX_TARBALL")"
|
|
1128
|
+
log "--- Installing pantheon-opencode (from supplied release tarball) ---"
|
|
1129
|
+
else
|
|
1130
|
+
log "--- Installing pantheon-opencode (from repo tarball) ---"
|
|
1131
|
+
cd "$REPO_DIR"
|
|
1132
|
+
npm pack --ignore-scripts 2>/dev/null || die "npm pack failed"
|
|
1133
|
+
local tgz
|
|
1134
|
+
tgz=$(ls -t pantheon-opencode-*.tgz | head -1)
|
|
1135
|
+
tgz_path="$REPO_DIR/$tgz"
|
|
1136
|
+
fi
|
|
1117
1137
|
npm rm -g pantheon-opencode 2>/dev/null || true
|
|
1118
|
-
npm install -g "$
|
|
1119
|
-
if
|
|
1138
|
+
npm install -g "$tgz_path" || die "install of $(basename "$tgz_path") failed"
|
|
1139
|
+
if [ -z "$SANDBOX_TARBALL" ] \
|
|
1140
|
+
&& ! git -C "$REPO_DIR" ls-files --error-unmatch -- "$tgz_path" >/dev/null 2>&1; then
|
|
1141
|
+
rm -f -- "$tgz_path"
|
|
1142
|
+
fi
|
|
1120
1143
|
log "--- Installing OpenCode V2 ($OPENCODE_V2_SPEC) ---"
|
|
1121
1144
|
npm install -g "$OPENCODE_V2_SPEC" || die "install of $OPENCODE_V2_SPEC failed"
|
|
1122
1145
|
}
|
|
@@ -1535,45 +1558,6 @@ run_cost_probe() { # v
|
|
|
1535
1558
|
record "$v" "pantheon-cost" "$status" "$detail"
|
|
1536
1559
|
}
|
|
1537
1560
|
|
|
1538
|
-
run_rehydrate_probe() { # v
|
|
1539
|
-
local v="$1" package_root probe raw status detail
|
|
1540
|
-
if ! package_root="$(installed_package_root)"; then
|
|
1541
|
-
record "$v" "context-rehydrate" "FAIL" "sandbox package is not installed"
|
|
1542
|
-
return 0
|
|
1543
|
-
fi
|
|
1544
|
-
probe="$package_root/scripts/probe-context-rehydrate.mjs"
|
|
1545
|
-
if [ ! -f "$probe" ]; then
|
|
1546
|
-
record "$v" "context-rehydrate" "FAIL" "installed package has no offline context probe"
|
|
1547
|
-
return 0
|
|
1548
|
-
fi
|
|
1549
|
-
if ! command -v node >/dev/null 2>&1; then
|
|
1550
|
-
record "$v" "context-rehydrate" "FAIL" "node runtime is not available"
|
|
1551
|
-
return 0
|
|
1552
|
-
fi
|
|
1553
|
-
set +e
|
|
1554
|
-
raw="$(timeout 30 node "$probe" --version "$v" --json 2>&1)"
|
|
1555
|
-
local rc=$?
|
|
1556
|
-
set -e
|
|
1557
|
-
case "$raw" in
|
|
1558
|
-
*'"status":"PASS"'*) status="PASS" ;;
|
|
1559
|
-
*'"status":"NOT_TESTED"'*) status="FAIL" ;;
|
|
1560
|
-
*'"status":"AMBIENTAL"'*) status="FAIL" ;;
|
|
1561
|
-
*) status="FAIL" ;;
|
|
1562
|
-
esac
|
|
1563
|
-
detail="$(printf '%s' "$raw" | tr '\n' ' ' | cut -c1-400)"
|
|
1564
|
-
if [ "$rc" -eq 124 ]; then
|
|
1565
|
-
status="FAIL"
|
|
1566
|
-
detail="context probe timed out after 30s"
|
|
1567
|
-
elif [ "$rc" -ne 0 ] && [ "$status" = "PASS" ]; then
|
|
1568
|
-
# A non-zero probe exit must never be reported as PASS.
|
|
1569
|
-
status="FAIL"
|
|
1570
|
-
detail="$detail (probe exit $rc)"
|
|
1571
|
-
elif [ "$rc" -ne 0 ] && [ "$status" != "FAIL" ]; then
|
|
1572
|
-
detail="$detail (probe exit $rc)"
|
|
1573
|
-
fi
|
|
1574
|
-
record "$v" "context-rehydrate" "$status" "$detail"
|
|
1575
|
-
}
|
|
1576
|
-
|
|
1577
1561
|
run_version_prompts() { # v
|
|
1578
1562
|
local v="$1" bin
|
|
1579
1563
|
if ! bin="$(sandbox_bin)"; then
|
|
@@ -1666,31 +1650,6 @@ write_cost_report() { # versions...
|
|
|
1666
1650
|
log "Cost probe report written to $COST_REPORT_FILE"
|
|
1667
1651
|
}
|
|
1668
1652
|
|
|
1669
|
-
write_rehydrate_report() { # versions...
|
|
1670
|
-
local versions=("$@") total_fail=0 total_pass=0
|
|
1671
|
-
{
|
|
1672
|
-
printf '# Pantheon Context Rehydration Probe Report\n\n'
|
|
1673
|
-
printf -- '- **Date:** %s\n' "$(date -u '+%Y-%m-%d %H:%M UTC')"
|
|
1674
|
-
printf -- '- **Sandbox:** %s\n\n' "$SANDBOX_ROOT"
|
|
1675
|
-
printf '| Version | Probe | Result | Detail |\n|---|---|---|---|\n'
|
|
1676
|
-
local v result
|
|
1677
|
-
for v in "${versions[@]}"; do
|
|
1678
|
-
result="${RESULTS["$v:context-rehydrate"]:-NOT_TESTED}"
|
|
1679
|
-
case "$result" in
|
|
1680
|
-
PASS) total_pass=$((total_pass + 1)) ;;
|
|
1681
|
-
*) total_fail=$((total_fail + 1)) ;;
|
|
1682
|
-
esac
|
|
1683
|
-
printf '| %s | context_rehydrate + context_session_summary | %s | %s |\n' \
|
|
1684
|
-
"$v" "$result" "${DETAILS["$v:context-rehydrate"]:-—}"
|
|
1685
|
-
done
|
|
1686
|
-
printf '\n## Summary\n\n'
|
|
1687
|
-
printf -- '- PASS: %d\n- Not PASS (blocking): %d\n\n' \
|
|
1688
|
-
"$total_pass" "$total_fail"
|
|
1689
|
-
printf '**Verdict: %s**\n' "$(probe_verdict "$total_pass" "$((total_pass + total_fail))")"
|
|
1690
|
-
} > "$REHYDRATE_REPORT_FILE"
|
|
1691
|
-
log "Context probe report written to $REHYDRATE_REPORT_FILE"
|
|
1692
|
-
}
|
|
1693
|
-
|
|
1694
1653
|
run_cost() { # versions...
|
|
1695
1654
|
local versions=("$@") v fail=0
|
|
1696
1655
|
mkdir -p "$SANDBOX_ROOT"
|
|
@@ -1710,25 +1669,6 @@ run_cost() { # versions...
|
|
|
1710
1669
|
log "Cost probe: PASS."
|
|
1711
1670
|
}
|
|
1712
1671
|
|
|
1713
|
-
run_rehydrate() { # versions...
|
|
1714
|
-
local versions=("$@") v fail=0
|
|
1715
|
-
mkdir -p "$SANDBOX_ROOT"
|
|
1716
|
-
for v in "${versions[@]}"; do
|
|
1717
|
-
log "[$v] context_rehydrate/session_summary offline probe ..."
|
|
1718
|
-
run_rehydrate_probe "$v"
|
|
1719
|
-
log "[$v] context probe → ${RESULTS["$v:context-rehydrate"]}"
|
|
1720
|
-
done
|
|
1721
|
-
write_rehydrate_report "${versions[@]}"
|
|
1722
|
-
for v in "${versions[@]}"; do
|
|
1723
|
-
[ "${RESULTS["$v:context-rehydrate"]:-}" = "PASS" ] || fail=$((fail + 1))
|
|
1724
|
-
done
|
|
1725
|
-
if [ "$fail" -gt 0 ]; then
|
|
1726
|
-
log "Context probe: $fail check(s) without explicit PASS."
|
|
1727
|
-
exit 1
|
|
1728
|
-
fi
|
|
1729
|
-
log "Context probe: PASS."
|
|
1730
|
-
}
|
|
1731
|
-
|
|
1732
1672
|
# ── Hook canary (proves callbacks FIRE, not just that a plugin loaded) ────────
|
|
1733
1673
|
|
|
1734
1674
|
run_hooks() {
|
|
@@ -1813,7 +1753,6 @@ while [ $# -gt 0 ]; do
|
|
|
1813
1753
|
--reset) MODE_RESET=1 ;;
|
|
1814
1754
|
--prompts) MODE_PROMPTS=1 ;;
|
|
1815
1755
|
--cost) MODE_COST=1 ;;
|
|
1816
|
-
--rehydrate) MODE_REHYDRATE=1 ;;
|
|
1817
1756
|
--hooks) MODE_HOOKS=1 ;;
|
|
1818
1757
|
--run)
|
|
1819
1758
|
shift
|
|
@@ -1839,7 +1778,7 @@ fi
|
|
|
1839
1778
|
|
|
1840
1779
|
if [ "$MODE_PREPARE" -eq 0 ] && [ -z "$RUN_VERSION" ] \
|
|
1841
1780
|
&& [ "$MODE_PROMPTS" -eq 0 ] && [ "$MODE_COST" -eq 0 ] \
|
|
1842
|
-
&& [ "$
|
|
1781
|
+
&& [ "$MODE_HOOKS" -eq 0 ]; then
|
|
1843
1782
|
usage
|
|
1844
1783
|
fi
|
|
1845
1784
|
|
|
@@ -1859,10 +1798,6 @@ if [ -n "$RUN_VERSION" ]; then
|
|
|
1859
1798
|
sandbox_env
|
|
1860
1799
|
run_cost "$RUN_VERSION"
|
|
1861
1800
|
fi
|
|
1862
|
-
if [ "$MODE_REHYDRATE" -eq 1 ]; then
|
|
1863
|
-
sandbox_env
|
|
1864
|
-
run_rehydrate "$RUN_VERSION"
|
|
1865
|
-
fi
|
|
1866
1801
|
if [ "$MODE_HOOKS" -eq 1 ]; then
|
|
1867
1802
|
sandbox_env
|
|
1868
1803
|
run_hooks
|
|
@@ -1873,37 +1808,15 @@ elif [ "$MODE_PROMPTS" -eq 1 ]; then
|
|
|
1873
1808
|
if [ "$MODE_COST" -eq 1 ]; then
|
|
1874
1809
|
run_cost "$TARGET_VERSION"
|
|
1875
1810
|
fi
|
|
1876
|
-
if [ "$MODE_REHYDRATE" -eq 1 ]; then
|
|
1877
|
-
run_rehydrate "$TARGET_VERSION"
|
|
1878
|
-
fi
|
|
1879
1811
|
if [ "$MODE_HOOKS" -eq 1 ]; then
|
|
1880
1812
|
run_hooks
|
|
1881
1813
|
fi
|
|
1882
1814
|
elif [ "$MODE_COST" -eq 1 ]; then
|
|
1883
1815
|
sandbox_env
|
|
1884
1816
|
run_cost "$TARGET_VERSION"
|
|
1885
|
-
if [ "$MODE_REHYDRATE" -eq 1 ]; then
|
|
1886
|
-
run_rehydrate "$TARGET_VERSION"
|
|
1887
|
-
fi
|
|
1888
1817
|
if [ "$MODE_HOOKS" -eq 1 ]; then
|
|
1889
1818
|
run_hooks
|
|
1890
1819
|
fi
|
|
1891
|
-
elif [ "$MODE_REHYDRATE" -eq 1 ]; then
|
|
1892
|
-
sandbox_env
|
|
1893
|
-
rehydrate_status=0
|
|
1894
|
-
# run_rehydrate exits when its check fails; isolate it so the separately
|
|
1895
|
-
# requested hook canary still runs, then return a failing status afterward.
|
|
1896
|
-
(run_rehydrate "$TARGET_VERSION") || rehydrate_status=$?
|
|
1897
|
-
hooks_status=0
|
|
1898
|
-
if [ "$MODE_HOOKS" -eq 1 ]; then
|
|
1899
|
-
(run_hooks) || hooks_status=$?
|
|
1900
|
-
fi
|
|
1901
|
-
if [ "$rehydrate_status" -ne 0 ]; then
|
|
1902
|
-
exit "$rehydrate_status"
|
|
1903
|
-
fi
|
|
1904
|
-
if [ "$hooks_status" -ne 0 ]; then
|
|
1905
|
-
exit "$hooks_status"
|
|
1906
|
-
fi
|
|
1907
1820
|
elif [ "$MODE_HOOKS" -eq 1 ]; then
|
|
1908
1821
|
sandbox_env
|
|
1909
1822
|
run_hooks
|