@jmylchreest/aide-plugin 0.0.16
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/bin/aide-wrapper.sh +123 -0
- package/dist/core/aide-client.d.ts +48 -0
- package/dist/core/aide-client.d.ts.map +1 -0
- package/dist/core/aide-client.js +166 -0
- package/dist/core/aide-client.js.map +1 -0
- package/dist/core/cleanup.d.ts +15 -0
- package/dist/core/cleanup.d.ts.map +1 -0
- package/dist/core/cleanup.js +48 -0
- package/dist/core/cleanup.js.map +1 -0
- package/dist/core/index.d.ts +17 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +17 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/mcp-sync.d.ts +99 -0
- package/dist/core/mcp-sync.d.ts.map +1 -0
- package/dist/core/mcp-sync.js +525 -0
- package/dist/core/mcp-sync.js.map +1 -0
- package/dist/core/persistence-logic.d.ts +24 -0
- package/dist/core/persistence-logic.d.ts.map +1 -0
- package/dist/core/persistence-logic.js +61 -0
- package/dist/core/persistence-logic.js.map +1 -0
- package/dist/core/pre-compact-logic.d.ts +11 -0
- package/dist/core/pre-compact-logic.d.ts.map +1 -0
- package/dist/core/pre-compact-logic.js +29 -0
- package/dist/core/pre-compact-logic.js.map +1 -0
- package/dist/core/session-init.d.ts +54 -0
- package/dist/core/session-init.d.ts.map +1 -0
- package/dist/core/session-init.js +349 -0
- package/dist/core/session-init.js.map +1 -0
- package/dist/core/session-summary-logic.d.ts +29 -0
- package/dist/core/session-summary-logic.d.ts.map +1 -0
- package/dist/core/session-summary-logic.js +167 -0
- package/dist/core/session-summary-logic.js.map +1 -0
- package/dist/core/skill-matcher.d.ts +46 -0
- package/dist/core/skill-matcher.d.ts.map +1 -0
- package/dist/core/skill-matcher.js +242 -0
- package/dist/core/skill-matcher.js.map +1 -0
- package/dist/core/tool-tracking.d.ts +20 -0
- package/dist/core/tool-tracking.d.ts.map +1 -0
- package/dist/core/tool-tracking.js +81 -0
- package/dist/core/tool-tracking.js.map +1 -0
- package/dist/core/types.d.ts +109 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +31 -0
- package/dist/core/types.js.map +1 -0
- package/dist/lib/aide-downloader.d.ts +90 -0
- package/dist/lib/aide-downloader.js +471 -0
- package/dist/lib/aide-downloader.js.map +1 -0
- package/dist/lib/hook-utils.d.ts +45 -0
- package/dist/lib/hook-utils.js +163 -0
- package/dist/lib/hook-utils.js.map +1 -0
- package/dist/opencode/hooks.d.ts +25 -0
- package/dist/opencode/hooks.d.ts.map +1 -0
- package/dist/opencode/hooks.js +268 -0
- package/dist/opencode/hooks.js.map +1 -0
- package/dist/opencode/index.d.ts +30 -0
- package/dist/opencode/index.d.ts.map +1 -0
- package/dist/opencode/index.js +32 -0
- package/dist/opencode/index.js.map +1 -0
- package/dist/opencode/types.d.ts +129 -0
- package/dist/opencode/types.d.ts.map +1 -0
- package/dist/opencode/types.js +12 -0
- package/dist/opencode/types.js.map +1 -0
- package/package.json +55 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# aide-wrapper.sh - Ensures aide binary exists before executing
|
|
3
|
+
#
|
|
4
|
+
# This wrapper is called by an assistant's MCP server configuration.
|
|
5
|
+
# It finds the aide binary, downloads it if missing, then delegates to it.
|
|
6
|
+
#
|
|
7
|
+
# Plugin root resolution order:
|
|
8
|
+
# 1. AIDE_PLUGIN_ROOT (canonical, platform-agnostic)
|
|
9
|
+
# 2. CLAUDE_PLUGIN_ROOT (set by Claude Code)
|
|
10
|
+
# 3. SCRIPT_DIR/.. (fallback: infer from wrapper location)
|
|
11
|
+
#
|
|
12
|
+
# Lives at: <plugin-root>/bin/aide-wrapper.sh
|
|
13
|
+
# Binary at: <plugin-root>/bin/aide
|
|
14
|
+
#
|
|
15
|
+
# Logs written to: .aide/_logs/wrapper.log
|
|
16
|
+
|
|
17
|
+
set -eo pipefail
|
|
18
|
+
|
|
19
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
20
|
+
PLUGIN_ROOT="${AIDE_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-$(cd "$SCRIPT_DIR/.." && pwd)}}"
|
|
21
|
+
|
|
22
|
+
# Binary extension
|
|
23
|
+
EXT=""
|
|
24
|
+
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" || "$OSTYPE" == "win32" ]]; then
|
|
25
|
+
EXT=".exe"
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
BINARY="$PLUGIN_ROOT/bin/aide${EXT}"
|
|
29
|
+
BIN_DIR="$PLUGIN_ROOT/bin"
|
|
30
|
+
|
|
31
|
+
# Setup logging
|
|
32
|
+
LOG_DIR="$PLUGIN_ROOT/.aide/_logs"
|
|
33
|
+
LOG_FILE="$LOG_DIR/wrapper.log"
|
|
34
|
+
mkdir -p "$LOG_DIR" 2>/dev/null || true
|
|
35
|
+
|
|
36
|
+
log() {
|
|
37
|
+
local timestamp
|
|
38
|
+
timestamp="$(date '+%Y-%m-%d %H:%M:%S')"
|
|
39
|
+
local msg="[$timestamp] [aide-wrapper] $*"
|
|
40
|
+
echo "$msg" >&2
|
|
41
|
+
echo "$msg" >> "$LOG_FILE" 2>/dev/null || true
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
PARENT_PID=$PPID
|
|
45
|
+
PARENT_CMD=$(ps -o comm= -p "$PPID" 2>/dev/null || echo "unknown")
|
|
46
|
+
PARENT_ARGS=$(ps -o args= -p "$PPID" 2>/dev/null || echo "unknown")
|
|
47
|
+
log "Starting wrapper (pid=$$, ppid=$PARENT_PID, parent=$PARENT_CMD, parent_args=$PARENT_ARGS, args=$*)"
|
|
48
|
+
log "PLUGIN_ROOT=$PLUGIN_ROOT"
|
|
49
|
+
log "BINARY=$BINARY"
|
|
50
|
+
|
|
51
|
+
# Version comparison: returns 0 (true) if $1 >= $2 (semver base only)
|
|
52
|
+
version_gte() {
|
|
53
|
+
local IFS=.
|
|
54
|
+
local a=($1) b=($2)
|
|
55
|
+
for i in 0 1 2; do
|
|
56
|
+
local va=${a[$i]:-0} vb=${b[$i]:-0}
|
|
57
|
+
if (( va > vb )); then return 0; fi
|
|
58
|
+
if (( va < vb )); then return 1; fi
|
|
59
|
+
done
|
|
60
|
+
return 0
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
# Determine if we need to download
|
|
64
|
+
NEEDS_DOWNLOAD=false
|
|
65
|
+
|
|
66
|
+
if [[ ! -x "$BINARY" ]]; then
|
|
67
|
+
NEEDS_DOWNLOAD=true
|
|
68
|
+
log "Binary not found or not executable"
|
|
69
|
+
else
|
|
70
|
+
# Check if this is a dev build that should be preserved
|
|
71
|
+
BINARY_VERSION=$("$BINARY" version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.+]+)?' | head -1 || true)
|
|
72
|
+
log "Binary version: ${BINARY_VERSION:-unknown}"
|
|
73
|
+
|
|
74
|
+
if [[ -n "$BINARY_VERSION" && "$BINARY_VERSION" == *"-dev."* ]]; then
|
|
75
|
+
# Dev build — check base version against plugin version
|
|
76
|
+
BASE_VERSION="${BINARY_VERSION%%-*}"
|
|
77
|
+
PLUGIN_VERSION=$(grep -oP '"version"\s*:\s*"\K[0-9]+\.[0-9]+\.[0-9]+' "$PLUGIN_ROOT/.claude-plugin/plugin.json" 2>/dev/null || true)
|
|
78
|
+
|
|
79
|
+
if [[ -n "$PLUGIN_VERSION" ]] && version_gte "$BASE_VERSION" "$PLUGIN_VERSION"; then
|
|
80
|
+
log "Dev build v$BINARY_VERSION (base $BASE_VERSION >= plugin v$PLUGIN_VERSION), using local build"
|
|
81
|
+
else
|
|
82
|
+
NEEDS_DOWNLOAD=true
|
|
83
|
+
log "Dev build v$BINARY_VERSION is older than plugin v${PLUGIN_VERSION:-unknown}, re-downloading"
|
|
84
|
+
fi
|
|
85
|
+
else
|
|
86
|
+
log "Release binary v${BINARY_VERSION:-unknown}"
|
|
87
|
+
fi
|
|
88
|
+
fi
|
|
89
|
+
|
|
90
|
+
if [[ "$NEEDS_DOWNLOAD" == "true" ]]; then
|
|
91
|
+
LOCKFILE="$BIN_DIR/.aide-download.lock"
|
|
92
|
+
DOWNLOADER="$PLUGIN_ROOT/src/lib/aide-downloader.ts"
|
|
93
|
+
|
|
94
|
+
# Use flock to ensure only one process downloads at a time.
|
|
95
|
+
# If another process holds the lock, we wait for it to finish.
|
|
96
|
+
(
|
|
97
|
+
flock -w 60 9 || { log "ERROR: Timed out waiting for download lock"; exit 1; }
|
|
98
|
+
|
|
99
|
+
# Re-check after acquiring lock — another process may have finished the download
|
|
100
|
+
if [[ -x "$BINARY" ]]; then
|
|
101
|
+
log "Binary appeared while waiting for lock (downloaded by another process)"
|
|
102
|
+
else
|
|
103
|
+
log "Downloading binary..."
|
|
104
|
+
log "Using downloader: $DOWNLOADER"
|
|
105
|
+
|
|
106
|
+
if ! npx --yes tsx "$DOWNLOADER" --dest "$BIN_DIR" 2>&1 | tee -a "$LOG_FILE" >&2; then
|
|
107
|
+
log "ERROR: Downloader failed"
|
|
108
|
+
exit 1
|
|
109
|
+
fi
|
|
110
|
+
|
|
111
|
+
if [[ ! -x "$BINARY" ]]; then
|
|
112
|
+
log "ERROR: Binary not found after download"
|
|
113
|
+
exit 1
|
|
114
|
+
fi
|
|
115
|
+
fi
|
|
116
|
+
) 9>"$LOCKFILE"
|
|
117
|
+
|
|
118
|
+
rm -f "$LOCKFILE"
|
|
119
|
+
log "Binary ready at $BINARY"
|
|
120
|
+
fi
|
|
121
|
+
|
|
122
|
+
log "Executing: $BINARY $*"
|
|
123
|
+
exec "$BINARY" "$@"
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform-agnostic aide binary discovery and state operations.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from src/lib/hook-utils.ts. Both Claude Code hooks and
|
|
5
|
+
* OpenCode plugin use this module for binary discovery and state management.
|
|
6
|
+
*
|
|
7
|
+
* Key difference from hook-utils.ts: accepts explicit binary path and
|
|
8
|
+
* platform-specific options instead of relying on CLAUDE_PLUGIN_ROOT.
|
|
9
|
+
*/
|
|
10
|
+
import type { FindBinaryOptions } from "./types.js";
|
|
11
|
+
/**
|
|
12
|
+
* Find the aide binary — platform-agnostic implementation.
|
|
13
|
+
*
|
|
14
|
+
* Search order:
|
|
15
|
+
* 1. pluginRoot/bin/aide (if pluginRoot provided)
|
|
16
|
+
* 2. cwd/.aide/bin/aide (project-local install)
|
|
17
|
+
* 3. Each path in additionalPaths
|
|
18
|
+
* 4. PATH fallback (system-wide install)
|
|
19
|
+
*/
|
|
20
|
+
export declare function findAideBinary(opts?: FindBinaryOptions): string | null;
|
|
21
|
+
/**
|
|
22
|
+
* Run an aide command and return stdout, or null on failure.
|
|
23
|
+
*/
|
|
24
|
+
export declare function runAide(binary: string, cwd: string, args: string[], options?: {
|
|
25
|
+
timeout?: number;
|
|
26
|
+
env?: Record<string, string | undefined>;
|
|
27
|
+
}): string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Set state in aide (global or per-agent)
|
|
30
|
+
*/
|
|
31
|
+
export declare function setState(binary: string, cwd: string, key: string, value: string, agentId?: string): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Get state from aide
|
|
34
|
+
*/
|
|
35
|
+
export declare function getState(binary: string, cwd: string, key: string, agentId?: string): string | null;
|
|
36
|
+
/**
|
|
37
|
+
* Delete a state key from aide
|
|
38
|
+
*/
|
|
39
|
+
export declare function deleteState(binary: string, cwd: string, key: string, agentId?: string): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Clear all state for an agent
|
|
42
|
+
*/
|
|
43
|
+
export declare function clearAgentState(binary: string, cwd: string, agentId: string): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Escape a string for safe shell usage (when shell is unavoidable)
|
|
46
|
+
*/
|
|
47
|
+
export declare function shellEscape(str: string): string;
|
|
48
|
+
//# sourceMappingURL=aide-client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AAM,CAS/C"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform-agnostic aide binary discovery and state operations.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from src/lib/hook-utils.ts. Both Claude Code hooks and
|
|
5
|
+
* OpenCode plugin use this module for binary discovery and state management.
|
|
6
|
+
*
|
|
7
|
+
* Key difference from hook-utils.ts: accepts explicit binary path and
|
|
8
|
+
* platform-specific options instead of relying on CLAUDE_PLUGIN_ROOT.
|
|
9
|
+
*/
|
|
10
|
+
import { execSync, execFileSync } from "child_process";
|
|
11
|
+
import { existsSync, realpathSync } from "fs";
|
|
12
|
+
import { join } from "path";
|
|
13
|
+
/**
|
|
14
|
+
* Find the aide binary — platform-agnostic implementation.
|
|
15
|
+
*
|
|
16
|
+
* Search order:
|
|
17
|
+
* 1. pluginRoot/bin/aide (if pluginRoot provided)
|
|
18
|
+
* 2. cwd/.aide/bin/aide (project-local install)
|
|
19
|
+
* 3. Each path in additionalPaths
|
|
20
|
+
* 4. PATH fallback (system-wide install)
|
|
21
|
+
*/
|
|
22
|
+
export function findAideBinary(opts = {}) {
|
|
23
|
+
const { cwd, additionalPaths = [] } = opts;
|
|
24
|
+
let { pluginRoot } = opts;
|
|
25
|
+
// Resolve symlinks on pluginRoot
|
|
26
|
+
if (pluginRoot) {
|
|
27
|
+
try {
|
|
28
|
+
pluginRoot = realpathSync(pluginRoot);
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
// Keep original if realpath fails
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
// 1. Plugin root bin/
|
|
35
|
+
if (pluginRoot) {
|
|
36
|
+
const pluginBinary = join(pluginRoot, "bin", "aide");
|
|
37
|
+
if (existsSync(pluginBinary)) {
|
|
38
|
+
return pluginBinary;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
// 2. Project-local .aide/bin/
|
|
42
|
+
if (cwd) {
|
|
43
|
+
const projectBinary = join(cwd, ".aide", "bin", "aide");
|
|
44
|
+
if (existsSync(projectBinary)) {
|
|
45
|
+
return projectBinary;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// 3. Additional paths
|
|
49
|
+
for (const searchPath of additionalPaths) {
|
|
50
|
+
const binary = join(searchPath, "aide");
|
|
51
|
+
if (existsSync(binary)) {
|
|
52
|
+
return binary;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
// 4. PATH fallback
|
|
56
|
+
try {
|
|
57
|
+
const result = execSync("which aide", { stdio: "pipe", timeout: 2000 })
|
|
58
|
+
.toString()
|
|
59
|
+
.trim();
|
|
60
|
+
if (result)
|
|
61
|
+
return result;
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
// Not in PATH
|
|
65
|
+
}
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Run an aide command and return stdout, or null on failure.
|
|
70
|
+
*/
|
|
71
|
+
export function runAide(binary, cwd, args, options) {
|
|
72
|
+
try {
|
|
73
|
+
const env = options?.env
|
|
74
|
+
? { ...process.env, ...options.env }
|
|
75
|
+
: process.env;
|
|
76
|
+
return execFileSync(binary, args, {
|
|
77
|
+
cwd,
|
|
78
|
+
encoding: "utf-8",
|
|
79
|
+
timeout: options?.timeout ?? 10000,
|
|
80
|
+
env,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Set state in aide (global or per-agent)
|
|
89
|
+
*/
|
|
90
|
+
export function setState(binary, cwd, key, value, agentId) {
|
|
91
|
+
try {
|
|
92
|
+
const args = ["state", "set", key, value];
|
|
93
|
+
if (agentId)
|
|
94
|
+
args.push(`--agent=${agentId}`);
|
|
95
|
+
execFileSync(binary, args, { cwd, stdio: "pipe", timeout: 5000 });
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Get state from aide
|
|
104
|
+
*/
|
|
105
|
+
export function getState(binary, cwd, key, agentId) {
|
|
106
|
+
try {
|
|
107
|
+
const args = ["state", "get", key];
|
|
108
|
+
if (agentId)
|
|
109
|
+
args.push(`--agent=${agentId}`);
|
|
110
|
+
const output = execFileSync(binary, args, {
|
|
111
|
+
cwd,
|
|
112
|
+
encoding: "utf-8",
|
|
113
|
+
timeout: 5000,
|
|
114
|
+
});
|
|
115
|
+
const match = output.match(/=\s*(.+)$/m);
|
|
116
|
+
return match ? match[1].trim() : null;
|
|
117
|
+
}
|
|
118
|
+
catch {
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Delete a state key from aide
|
|
124
|
+
*/
|
|
125
|
+
export function deleteState(binary, cwd, key, agentId) {
|
|
126
|
+
try {
|
|
127
|
+
const fullKey = agentId ? `agent:${agentId}:${key}` : key;
|
|
128
|
+
execFileSync(binary, ["state", "delete", fullKey], {
|
|
129
|
+
cwd,
|
|
130
|
+
stdio: "pipe",
|
|
131
|
+
});
|
|
132
|
+
return true;
|
|
133
|
+
}
|
|
134
|
+
catch {
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Clear all state for an agent
|
|
140
|
+
*/
|
|
141
|
+
export function clearAgentState(binary, cwd, agentId) {
|
|
142
|
+
try {
|
|
143
|
+
execFileSync(binary, ["state", "clear", `--agent=${agentId}`], {
|
|
144
|
+
cwd,
|
|
145
|
+
stdio: "pipe",
|
|
146
|
+
});
|
|
147
|
+
return true;
|
|
148
|
+
}
|
|
149
|
+
catch {
|
|
150
|
+
return false;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Escape a string for safe shell usage (when shell is unavoidable)
|
|
155
|
+
*/
|
|
156
|
+
export function shellEscape(str) {
|
|
157
|
+
return str
|
|
158
|
+
.replace(/\\/g, "\\\\")
|
|
159
|
+
.replace(/"/g, '\\"')
|
|
160
|
+
.replace(/\$/g, "\\$")
|
|
161
|
+
.replace(/`/g, "\\`")
|
|
162
|
+
.replace(/!/g, "\\!")
|
|
163
|
+
.replace(/\n/g, " ")
|
|
164
|
+
.slice(0, 1000);
|
|
165
|
+
}
|
|
166
|
+
//# sourceMappingURL=aide-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aide-client.js","sourceRoot":"","sources":["../../src/core/aide-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAAC,OAA0B,EAAE;IACzD,MAAM,EAAE,GAAG,EAAE,eAAe,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC;IAC3C,IAAI,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAE1B,iCAAiC;IACjC,IAAI,UAAU,EAAE,CAAC;QACf,IAAI,CAAC;YACH,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;QACxC,CAAC;QAAC,MAAM,CAAC;YACP,kCAAkC;QACpC,CAAC;IACH,CAAC;IAED,sBAAsB;IACtB,IAAI,UAAU,EAAE,CAAC;QACf,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACrD,IAAI,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;YAC7B,OAAO,YAAY,CAAC;QACtB,CAAC;IACH,CAAC;IAED,8BAA8B;IAC9B,IAAI,GAAG,EAAE,CAAC;QACR,MAAM,aAAa,GAAG,IAAI,CAAC,GAA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OAAO,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;QAC1D,YAAY,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE;YACjD,GAAG;YACH,KAAK,EAAE,MAAM;SACd,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAC7B,MAAc,EACd,GAAW,EACX,OAAe;IAEf,IAAI,CAAC;QACH,YAAY,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,OAAO,EAAE,CAAC,EAAE;YAC7D,GAAG;YACH,KAAK,EAAE,MAAM;SACd,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,GAAW;IACrC,OAAO,GAAG;SACP,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cleanup logic — platform-agnostic.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from src/hooks/agent-cleanup.ts and src/hooks/session-end.ts.
|
|
5
|
+
* Handles agent state cleanup and session end operations.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Clean up agent-specific state when an agent stops
|
|
9
|
+
*/
|
|
10
|
+
export declare function cleanupAgent(binary: string, cwd: string, agentId: string): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Clean up session state and record session end
|
|
13
|
+
*/
|
|
14
|
+
export declare function cleanupSession(binary: string, cwd: string, sessionId: string, duration?: number): void;
|
|
15
|
+
//# sourceMappingURL=cleanup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cleanup.d.ts","sourceRoot":"","sources":["../../src/core/cleanup.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;GAEG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,GACd,OAAO,CAET;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,MAAM,GAChB,IAAI,CAiCN"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cleanup logic — platform-agnostic.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from src/hooks/agent-cleanup.ts and src/hooks/session-end.ts.
|
|
5
|
+
* Handles agent state cleanup and session end operations.
|
|
6
|
+
*/
|
|
7
|
+
import { clearAgentState, deleteState, setState, runAide } from "./aide-client.js";
|
|
8
|
+
/**
|
|
9
|
+
* Clean up agent-specific state when an agent stops
|
|
10
|
+
*/
|
|
11
|
+
export function cleanupAgent(binary, cwd, agentId) {
|
|
12
|
+
return clearAgentState(binary, cwd, agentId);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Clean up session state and record session end
|
|
16
|
+
*/
|
|
17
|
+
export function cleanupSession(binary, cwd, sessionId, duration) {
|
|
18
|
+
// Record session end
|
|
19
|
+
const durationStr = duration ? ` (${Math.round(duration / 1000)}s)` : "";
|
|
20
|
+
runAide(binary, cwd, [
|
|
21
|
+
"message",
|
|
22
|
+
"send",
|
|
23
|
+
`Session ${sessionId} ended${durationStr}`,
|
|
24
|
+
"--from=system",
|
|
25
|
+
"--type=system",
|
|
26
|
+
]);
|
|
27
|
+
// Clear transient state for this session/agent
|
|
28
|
+
clearAgentState(binary, cwd, sessionId);
|
|
29
|
+
// Clear global session state
|
|
30
|
+
const globalSessionKeys = [
|
|
31
|
+
"mode",
|
|
32
|
+
"startedAt",
|
|
33
|
+
"modelTier",
|
|
34
|
+
"agentCount",
|
|
35
|
+
"toolCalls",
|
|
36
|
+
"lastToolUse",
|
|
37
|
+
"lastTool",
|
|
38
|
+
];
|
|
39
|
+
for (const key of globalSessionKeys) {
|
|
40
|
+
deleteState(binary, cwd, key);
|
|
41
|
+
}
|
|
42
|
+
// Record session metrics
|
|
43
|
+
if (duration) {
|
|
44
|
+
setState(binary, cwd, "last_session_duration", String(duration));
|
|
45
|
+
}
|
|
46
|
+
setState(binary, cwd, "last_session_end", new Date().toISOString());
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=cleanup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cleanup.js","sourceRoot":"","sources":["../../src/core/cleanup.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEnF;;GAEG;AACH,MAAM,UAAU,YAAY,CAC1B,MAAc,EACd,GAAW,EACX,OAAe;IAEf,OAAO,eAAe,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;AAC/C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAC5B,MAAc,EACd,GAAW,EACX,SAAiB,EACjB,QAAiB;IAEjB,qBAAqB;IACrB,MAAM,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IACzE,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE;QACnB,SAAS;QACT,MAAM;QACN,WAAW,SAAS,SAAS,WAAW,EAAE;QAC1C,eAAe;QACf,eAAe;KAChB,CAAC,CAAC;IAEH,+CAA+C;IAC/C,eAAe,CAAC,MAAM,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;IAExC,6BAA6B;IAC7B,MAAM,iBAAiB,GAAG;QACxB,MAAM;QACN,WAAW;QACX,WAAW;QACX,YAAY;QACZ,WAAW;QACX,aAAa;QACb,UAAU;KACX,CAAC;IACF,KAAK,MAAM,GAAG,IAAI,iBAAiB,EAAE,CAAC;QACpC,WAAW,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAChC,CAAC;IAED,yBAAyB;IACzB,IAAI,QAAQ,EAAE,CAAC;QACb,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE,uBAAuB,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IACnE,CAAC;IACD,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE,kBAAkB,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;AACtE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core module — platform-agnostic aide logic.
|
|
3
|
+
*
|
|
4
|
+
* This module contains shared business logic used by both
|
|
5
|
+
* Claude Code hooks (src/hooks/) and the OpenCode plugin (src/opencode/).
|
|
6
|
+
*/
|
|
7
|
+
export * from "./types.js";
|
|
8
|
+
export * from "./aide-client.js";
|
|
9
|
+
export * from "./session-init.js";
|
|
10
|
+
export * from "./skill-matcher.js";
|
|
11
|
+
export * from "./tool-tracking.js";
|
|
12
|
+
export * from "./persistence-logic.js";
|
|
13
|
+
export * from "./session-summary-logic.js";
|
|
14
|
+
export * from "./pre-compact-logic.js";
|
|
15
|
+
export * from "./cleanup.js";
|
|
16
|
+
export * from "./mcp-sync.js";
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core module — platform-agnostic aide logic.
|
|
3
|
+
*
|
|
4
|
+
* This module contains shared business logic used by both
|
|
5
|
+
* Claude Code hooks (src/hooks/) and the OpenCode plugin (src/opencode/).
|
|
6
|
+
*/
|
|
7
|
+
export * from "./types.js";
|
|
8
|
+
export * from "./aide-client.js";
|
|
9
|
+
export * from "./session-init.js";
|
|
10
|
+
export * from "./skill-matcher.js";
|
|
11
|
+
export * from "./tool-tracking.js";
|
|
12
|
+
export * from "./persistence-logic.js";
|
|
13
|
+
export * from "./session-summary-logic.js";
|
|
14
|
+
export * from "./pre-compact-logic.js";
|
|
15
|
+
export * from "./cleanup.js";
|
|
16
|
+
export * from "./mcp-sync.js";
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Sync — cross-assistant MCP server configuration synchronization.
|
|
3
|
+
*
|
|
4
|
+
* Reads MCP server definitions from a canonical aide config file and
|
|
5
|
+
* all known assistant config formats, merges them, and writes the result
|
|
6
|
+
* back to the current assistant's config files.
|
|
7
|
+
*
|
|
8
|
+
* Supports:
|
|
9
|
+
* - Claude Code: ~/.mcp.json (user), .mcp.json (project)
|
|
10
|
+
* - OpenCode: ~/.config/opencode/opencode.json (user), ./opencode.json (project)
|
|
11
|
+
* - Aide canonical: ~/.aide/config/mcp.json (user), .aide/config/mcp.json (project)
|
|
12
|
+
*
|
|
13
|
+
* Uses a journal to detect intentional deletions from the aide canonical file,
|
|
14
|
+
* preventing re-import of removed servers from assistant configs.
|
|
15
|
+
*/
|
|
16
|
+
/** Platform identifier for the current assistant. */
|
|
17
|
+
export type McpPlatform = "claude-code" | "opencode";
|
|
18
|
+
/** Scope level for config files. */
|
|
19
|
+
export type McpScope = "user" | "project";
|
|
20
|
+
/**
|
|
21
|
+
* Canonical (aide-internal) MCP server definition.
|
|
22
|
+
* Superset of all fields from Claude Code and OpenCode formats.
|
|
23
|
+
*/
|
|
24
|
+
export interface CanonicalMcpServer {
|
|
25
|
+
/** Display/config name */
|
|
26
|
+
name: string;
|
|
27
|
+
/** "local" (stdio) or "remote" (http/sse) */
|
|
28
|
+
type: "local" | "remote";
|
|
29
|
+
/** Command to run (for local servers) */
|
|
30
|
+
command?: string;
|
|
31
|
+
/** Arguments (for local servers) */
|
|
32
|
+
args?: string[];
|
|
33
|
+
/** URL (for remote servers) */
|
|
34
|
+
url?: string;
|
|
35
|
+
/** Environment variables */
|
|
36
|
+
env?: Record<string, string>;
|
|
37
|
+
/** HTTP headers (for remote servers) */
|
|
38
|
+
headers?: Record<string, string>;
|
|
39
|
+
/** Whether the server is enabled (defaults to true) */
|
|
40
|
+
enabled?: boolean;
|
|
41
|
+
}
|
|
42
|
+
/** The aide canonical MCP config file format. */
|
|
43
|
+
export interface AideMcpConfig {
|
|
44
|
+
mcpServers: Record<string, Omit<CanonicalMcpServer, "name">>;
|
|
45
|
+
}
|
|
46
|
+
/** Journal tracking server presence across sync runs. */
|
|
47
|
+
export interface McpSyncJournal {
|
|
48
|
+
/** Chronological entries of known server sets */
|
|
49
|
+
entries: Array<{
|
|
50
|
+
ts: string;
|
|
51
|
+
servers: string[];
|
|
52
|
+
}>;
|
|
53
|
+
/** Server names intentionally removed from aide canonical config */
|
|
54
|
+
removed: string[];
|
|
55
|
+
}
|
|
56
|
+
/** Result of a sync operation. */
|
|
57
|
+
export interface McpSyncResult {
|
|
58
|
+
/** Number of servers written to the current assistant's config */
|
|
59
|
+
serversWritten: number;
|
|
60
|
+
/** Number of new servers imported from other sources */
|
|
61
|
+
imported: number;
|
|
62
|
+
/** Number of servers skipped (in removed list) */
|
|
63
|
+
skipped: number;
|
|
64
|
+
/** Whether any config files were modified */
|
|
65
|
+
modified: boolean;
|
|
66
|
+
/** Servers that were written */
|
|
67
|
+
serverNames: string[];
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Run MCP sync at both user and project scope levels.
|
|
71
|
+
*
|
|
72
|
+
* Call this during session-start. It reads MCP server definitions from
|
|
73
|
+
* the aide canonical config and all known assistant configs, merges them,
|
|
74
|
+
* handles intentional deletions via a journal, and writes the result to
|
|
75
|
+
* both the aide canonical config and the current assistant's config files.
|
|
76
|
+
*
|
|
77
|
+
* @param platform - The current assistant platform ("claude-code" or "opencode")
|
|
78
|
+
* @param cwd - The project working directory
|
|
79
|
+
* @returns Combined sync results for both user and project scopes
|
|
80
|
+
*/
|
|
81
|
+
export declare function syncMcpServers(platform: McpPlatform, cwd: string): {
|
|
82
|
+
user: McpSyncResult;
|
|
83
|
+
project: McpSyncResult;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Get the list of currently synced MCP servers (for display/logging).
|
|
87
|
+
*/
|
|
88
|
+
export declare function listSyncedServers(cwd: string): {
|
|
89
|
+
user: string[];
|
|
90
|
+
project: string[];
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Get the current removed (blocked) server names.
|
|
94
|
+
*/
|
|
95
|
+
export declare function getRemovedServers(cwd: string): {
|
|
96
|
+
user: string[];
|
|
97
|
+
project: string[];
|
|
98
|
+
};
|
|
99
|
+
//# sourceMappingURL=mcp-sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-sync.d.ts","sourceRoot":"","sources":["../../src/core/mcp-sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAgBH,qDAAqD;AACrD,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,UAAU,CAAC;AAErD,oCAAoC;AACpC,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAE1C;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAC;IACzB,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,+BAA+B;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,uDAAuD;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,iDAAiD;AACjD,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE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