@rynfar/meridian 1.62.7 → 1.64.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/README.md +3 -2
- package/bin/meridian-launchd.sh +128 -0
- package/dist/{cli-21w6xm0d.js → cli-4ghkaajs.js} +27332 -12903
- package/dist/{cli-xmweegb1.js → cli-8yp89fan.js} +52 -0
- package/dist/cli-pbvm9kc2.js +760 -0
- package/dist/cli.js +71 -12
- package/dist/meridian-v2.js +139 -0
- package/dist/{pluginPage-03q5j753.js → pluginPage-n3gdtbmj.js} +1 -1
- package/dist/{profileCli-39vshwdn.js → profileCli-ap7eg985.js} +2 -2
- package/dist/{profilePage-gtazq15d.js → profilePage-vfj2dbhn.js} +1 -1
- package/dist/proxy/adapter.d.ts +13 -0
- package/dist/proxy/adapter.d.ts.map +1 -1
- package/dist/proxy/adapters/opencode.d.ts +7 -0
- package/dist/proxy/adapters/opencode.d.ts.map +1 -1
- package/dist/proxy/buildInfo.d.ts +94 -0
- package/dist/proxy/buildInfo.d.ts.map +1 -0
- package/dist/proxy/cwd.d.ts.map +1 -1
- package/dist/proxy/errors.d.ts.map +1 -1
- package/dist/proxy/passthroughDenial.d.ts +17 -0
- package/dist/proxy/passthroughDenial.d.ts.map +1 -0
- package/dist/proxy/passthroughEarlyStop.d.ts +52 -7
- package/dist/proxy/passthroughEarlyStop.d.ts.map +1 -1
- package/dist/proxy/passthroughTools.d.ts.map +1 -1
- package/dist/proxy/query.d.ts +8 -0
- package/dist/proxy/query.d.ts.map +1 -1
- package/dist/proxy/server.d.ts.map +1 -1
- package/dist/proxy/session/cache.d.ts +11 -2
- package/dist/proxy/session/cache.d.ts.map +1 -1
- package/dist/proxy/session/crossProcessTurnCoordinator.d.ts +40 -0
- package/dist/proxy/session/crossProcessTurnCoordinator.d.ts.map +1 -0
- package/dist/proxy/session/durableFileSystem.d.ts +21 -0
- package/dist/proxy/session/durableFileSystem.d.ts.map +1 -0
- package/dist/proxy/session/lineage.d.ts +20 -0
- package/dist/proxy/session/lineage.d.ts.map +1 -1
- package/dist/proxy/session/processIncarnation.d.ts +46 -0
- package/dist/proxy/session/processIncarnation.d.ts.map +1 -0
- package/dist/proxy/session/recoveryClaim.d.ts +19 -0
- package/dist/proxy/session/recoveryClaim.d.ts.map +1 -0
- package/dist/proxy/session/sdkProcessGate.d.ts +19 -0
- package/dist/proxy/session/sdkProcessGate.d.ts.map +1 -0
- package/dist/proxy/sessionLifecycle.d.ts +105 -0
- package/dist/proxy/sessionLifecycle.d.ts.map +1 -0
- package/dist/proxy/sessionStore.d.ts +53 -7
- package/dist/proxy/sessionStore.d.ts.map +1 -1
- package/dist/proxy/setup.d.ts +35 -10
- package/dist/proxy/setup.d.ts.map +1 -1
- package/dist/proxy/types.d.ts +4 -0
- package/dist/proxy/types.d.ts.map +1 -1
- package/dist/proxy/updateCheck.d.ts +31 -0
- package/dist/proxy/updateCheck.d.ts.map +1 -0
- package/dist/server.js +5 -5
- package/dist/setup-4v3zg3c0.js +33 -0
- package/dist/telemetry/profileBar.d.ts +3 -3
- package/dist/telemetry/profileBar.d.ts.map +1 -1
- package/dist/telemetry/settingsPage.d.ts +1 -1
- package/dist/telemetry/settingsPage.d.ts.map +1 -1
- package/package.json +10 -5
- package/plugin/meridian-v2.ts +190 -0
- package/dist/cli-pc0mtjjv.js +0 -167
- package/dist/setup-0x573t61.js +0 -19
- package/dist/{cli-xfbhn15a.js → cli-0ed6j0vk.js} +3 -3
package/README.md
CHANGED
|
@@ -35,7 +35,8 @@ npm install -g @rynfar/meridian
|
|
|
35
35
|
claude login
|
|
36
36
|
|
|
37
37
|
# 3. Configure OpenCode plugin (one time — OpenCode users only)
|
|
38
|
-
meridian setup
|
|
38
|
+
meridian setup # OpenCode V1
|
|
39
|
+
# meridian setup --v2 --opencode-bin ~/.local/bin/opencode2 # pinned V2 beta
|
|
39
40
|
|
|
40
41
|
# 4. Start
|
|
41
42
|
meridian
|
|
@@ -96,7 +97,7 @@ The Claude Agent SDK provides programmatic access to Claude. But your favorite c
|
|
|
96
97
|
|
|
97
98
|
| Agent | Status | Notes |
|
|
98
99
|
|-------|--------|-------|
|
|
99
|
-
| [OpenCode](https://github.com/anomalyco/opencode) | ✅ Verified |
|
|
100
|
+
| [OpenCode](https://github.com/anomalyco/opencode) | ✅ Verified | V1 and pinned V2 beta support; requires the matching `meridian setup` mode ([setup](docs/agents.md#opencode)) — tools, durable resume, restart, undo, compaction, parallel subagents |
|
|
100
101
|
| [ForgeCode](https://forgecode.dev) | ✅ Verified | Provider config (see [Agent Setup](docs/agents.md)) — passthrough tool execution, session resume, streaming |
|
|
101
102
|
| [Droid (Factory AI)](https://factory.ai/product/ide) | ✅ Verified | BYOK config (see [Agent Setup](docs/agents.md)) — full tool support, session resume, streaming |
|
|
102
103
|
| [Crush](https://github.com/charmbracelet/crush) | ✅ Verified | Provider config (see [Agent Setup](docs/agents.md)) — full tool support, session resume, headless `crush run` |
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
#
|
|
3
|
+
# Launch Meridian as a long-running service without drifting from the release.
|
|
4
|
+
#
|
|
5
|
+
# A service pointed straight at a checkout's `dist/cli.js` runs whatever was
|
|
6
|
+
# last built there. Build on a feature branch, and the next restart — a crash,
|
|
7
|
+
# a reboot, KeepAlive — silently serves unreleased code. `/health` cannot warn
|
|
8
|
+
# you, because the version string it reports comes from package.json and is
|
|
9
|
+
# identical on the branch and the tag.
|
|
10
|
+
#
|
|
11
|
+
# So this runs the *installed* package by default, and updates it when the
|
|
12
|
+
# registry is ahead. Development builds are still one env var away, and they
|
|
13
|
+
# announce themselves in `/health` and in the site header rather than passing
|
|
14
|
+
# as a release.
|
|
15
|
+
#
|
|
16
|
+
# Normal service use: bin/meridian-launchd.sh
|
|
17
|
+
# Test a local build: MERIDIAN_DEV_BUILD=1 MERIDIAN_PORT=3457 bin/meridian-launchd.sh
|
|
18
|
+
#
|
|
19
|
+
# Every exit path execs something. Under launchd's KeepAlive, a launcher that
|
|
20
|
+
# refuses to start is a proxy that is simply down, which is worse than one
|
|
21
|
+
# running a known-stale version.
|
|
22
|
+
|
|
23
|
+
set -u
|
|
24
|
+
|
|
25
|
+
PACKAGE="@rynfar/meridian"
|
|
26
|
+
CDPATH=""
|
|
27
|
+
REPO_DIR="$(cd -- "$(dirname -- "$0")/.." && pwd)"
|
|
28
|
+
CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/meridian"
|
|
29
|
+
UPDATE_STAMP="$CACHE_DIR/launcher-update-check"
|
|
30
|
+
|
|
31
|
+
# Bound how often a restart loop may talk to the registry. KeepAlive can
|
|
32
|
+
# restart this many times a minute; without a floor, a crash loop becomes a
|
|
33
|
+
# request flood.
|
|
34
|
+
MIN_CHECK_INTERVAL_SECONDS=3600
|
|
35
|
+
|
|
36
|
+
log() { echo "[meridian-launchd] $*"; }
|
|
37
|
+
|
|
38
|
+
# --- Development build: explicit, stamped, never mistaken for a release ---
|
|
39
|
+
|
|
40
|
+
if [ "${MERIDIAN_DEV_BUILD:-}" = "1" ]; then
|
|
41
|
+
if [ ! -f "$REPO_DIR/dist/cli.js" ]; then
|
|
42
|
+
log "MERIDIAN_DEV_BUILD=1 but $REPO_DIR/dist/cli.js is missing — run 'npm run build' first."
|
|
43
|
+
exit 1
|
|
44
|
+
fi
|
|
45
|
+
MERIDIAN_BUILD_SOURCE="dev"
|
|
46
|
+
MERIDIAN_BUILD_SHA="$(git -C "$REPO_DIR" rev-parse HEAD 2>/dev/null || echo "")"
|
|
47
|
+
MERIDIAN_BUILD_BRANCH="$(git -C "$REPO_DIR" rev-parse --abbrev-ref HEAD 2>/dev/null || echo "")"
|
|
48
|
+
if [ -n "$(git -C "$REPO_DIR" status --porcelain 2>/dev/null)" ]; then
|
|
49
|
+
MERIDIAN_BUILD_DIRTY="1"
|
|
50
|
+
else
|
|
51
|
+
MERIDIAN_BUILD_DIRTY="0"
|
|
52
|
+
fi
|
|
53
|
+
export MERIDIAN_BUILD_SOURCE MERIDIAN_BUILD_SHA MERIDIAN_BUILD_BRANCH MERIDIAN_BUILD_DIRTY
|
|
54
|
+
log "dev build: ${MERIDIAN_BUILD_BRANCH:-?} @ $(echo "$MERIDIAN_BUILD_SHA" | cut -c1-8)${MERIDIAN_BUILD_DIRTY:+ (dirty=$MERIDIAN_BUILD_DIRTY)}"
|
|
55
|
+
exec node "$REPO_DIR/dist/cli.js" "$@"
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
# --- Release build: run what is installed, keep it current ---
|
|
59
|
+
|
|
60
|
+
CLI="$(command -v meridian 2>/dev/null || true)"
|
|
61
|
+
|
|
62
|
+
should_check() {
|
|
63
|
+
[ "${MERIDIAN_NO_SELF_UPDATE:-}" = "1" ] && return 1
|
|
64
|
+
[ -f "$UPDATE_STAMP" ] || return 0
|
|
65
|
+
last="$(cat "$UPDATE_STAMP" 2>/dev/null || echo "")"
|
|
66
|
+
# A truncated or garbage stamp would blow up the arithmetic below, and under
|
|
67
|
+
# `set -u` that aborts the function — permanently disabling the update check
|
|
68
|
+
# while the bad file sits there. Treat anything non-numeric as no stamp.
|
|
69
|
+
case "$last" in
|
|
70
|
+
'' | *[!0-9]*) return 0 ;;
|
|
71
|
+
esac
|
|
72
|
+
[ "$(( $(date +%s) - last ))" -ge "$MIN_CHECK_INTERVAL_SECONDS" ]
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
registry_latest() {
|
|
76
|
+
# Honours the same override as the in-process check (see updateCheck.ts), so
|
|
77
|
+
# a mirror configured for one applies to both.
|
|
78
|
+
node -e '
|
|
79
|
+
const url = process.env.MERIDIAN_UPDATE_CHECK_URL
|
|
80
|
+
|| "https://registry.npmjs.org/-/package/'"$PACKAGE"'/dist-tags"
|
|
81
|
+
fetch(url, { signal: AbortSignal.timeout(5000) })
|
|
82
|
+
.then((r) => (r.ok ? r.json() : null))
|
|
83
|
+
.then((d) => process.stdout.write(typeof d?.latest === "string" ? d.latest : ""))
|
|
84
|
+
.catch(() => {})
|
|
85
|
+
' 2>/dev/null
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if [ -n "$CLI" ] && should_check; then
|
|
89
|
+
# Stamp BEFORE attempting anything network-bound. If the install below hangs
|
|
90
|
+
# or the process is killed mid-update, the next restart waits out the
|
|
91
|
+
# interval instead of retrying immediately, forever.
|
|
92
|
+
mkdir -p "$CACHE_DIR" 2>/dev/null
|
|
93
|
+
date +%s > "$UPDATE_STAMP" 2>/dev/null
|
|
94
|
+
|
|
95
|
+
INSTALLED="$("$CLI" --version 2>/dev/null || echo "")"
|
|
96
|
+
LATEST="$(registry_latest)"
|
|
97
|
+
|
|
98
|
+
if [ -n "$LATEST" ] && [ -n "$INSTALLED" ] && [ "$LATEST" != "$INSTALLED" ]; then
|
|
99
|
+
log "updating $PACKAGE: $INSTALLED -> $LATEST"
|
|
100
|
+
if command -v volta >/dev/null 2>&1 && [ -x "$HOME/.volta/bin/meridian" ]; then
|
|
101
|
+
volta install "$PACKAGE@$LATEST" || log "volta install failed — continuing on $INSTALLED"
|
|
102
|
+
else
|
|
103
|
+
npm install -g "$PACKAGE@$LATEST" || log "npm install failed — continuing on $INSTALLED"
|
|
104
|
+
fi
|
|
105
|
+
CLI="$(command -v meridian 2>/dev/null || echo "$CLI")"
|
|
106
|
+
fi
|
|
107
|
+
fi
|
|
108
|
+
|
|
109
|
+
if [ -n "$CLI" ]; then
|
|
110
|
+
MERIDIAN_BUILD_SOURCE="npm"
|
|
111
|
+
export MERIDIAN_BUILD_SOURCE
|
|
112
|
+
exec "$CLI" "$@"
|
|
113
|
+
fi
|
|
114
|
+
|
|
115
|
+
# No installed package. Fall back to the checkout so the service still comes
|
|
116
|
+
# up, but stamp it honestly — this is exactly the drift the launcher exists to
|
|
117
|
+
# make visible, so it must not be reported as a release.
|
|
118
|
+
log "no installed $PACKAGE found on PATH — falling back to the local build at $REPO_DIR/dist/cli.js"
|
|
119
|
+
log "install the release with: npm install -g $PACKAGE"
|
|
120
|
+
if [ ! -f "$REPO_DIR/dist/cli.js" ]; then
|
|
121
|
+
log "and $REPO_DIR/dist/cli.js does not exist either — nothing to run."
|
|
122
|
+
exit 1
|
|
123
|
+
fi
|
|
124
|
+
MERIDIAN_BUILD_SOURCE="local"
|
|
125
|
+
MERIDIAN_BUILD_SHA="$(git -C "$REPO_DIR" rev-parse HEAD 2>/dev/null || echo "")"
|
|
126
|
+
MERIDIAN_BUILD_BRANCH="$(git -C "$REPO_DIR" rev-parse --abbrev-ref HEAD 2>/dev/null || echo "")"
|
|
127
|
+
export MERIDIAN_BUILD_SOURCE MERIDIAN_BUILD_SHA MERIDIAN_BUILD_BRANCH
|
|
128
|
+
exec node "$REPO_DIR/dist/cli.js" "$@"
|