openrune 0.1.2 → 0.1.3
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/.mcp.json +16 -0
- package/README.md +1 -1
- package/channel/rune-channel.ts +26 -7
- package/package.json +1 -1
package/.mcp.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"rune-channel": {
|
|
4
|
+
"command": "node",
|
|
5
|
+
"args": [
|
|
6
|
+
"/Users/gilhyun/IdeaProjects/Rune/dist/rune-channel.js"
|
|
7
|
+
],
|
|
8
|
+
"env": {
|
|
9
|
+
"RUNE_FOLDER_PATH": "/Users/gilhyun/IdeaProjects/Rune",
|
|
10
|
+
"RUNE_CHANNEL_PORT": "51234",
|
|
11
|
+
"RUNE_AGENT_ROLE": "General assistant",
|
|
12
|
+
"RUNE_FILE_PATH": "/Users/gilhyun/IdeaProjects/Rune/Rune.rune"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<h1 align="center">Rune</h1>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
<strong>File-based AI Agent Desktop App</strong><br/>
|
|
8
|
+
<strong>File-based AI Agent Desktop App for Claude Code</strong><br/>
|
|
9
9
|
Drop a <code>.rune</code> file in any folder. Double-click to open. Chat with your AI agent.
|
|
10
10
|
</p>
|
|
11
11
|
|
package/channel/rune-channel.ts
CHANGED
|
@@ -50,15 +50,34 @@ function buildSessionContext(): string {
|
|
|
50
50
|
rune.memory.forEach((m, i) => parts.push(`${i + 1}. ${m}`))
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
// History
|
|
53
|
+
// History: last 50 messages, recent 10 in full detail
|
|
54
54
|
if (rune.history && rune.history.length > 0) {
|
|
55
|
-
const
|
|
56
|
-
|
|
55
|
+
const TOTAL_LIMIT = 50
|
|
56
|
+
const FULL_DETAIL_COUNT = 10
|
|
57
|
+
const recent = rune.history.slice(-TOTAL_LIMIT)
|
|
58
|
+
const olderMessages = recent.slice(0, -FULL_DETAIL_COUNT)
|
|
59
|
+
const recentMessages = recent.slice(-FULL_DETAIL_COUNT)
|
|
60
|
+
|
|
61
|
+
parts.push('\n## Conversation History')
|
|
57
62
|
parts.push(`(${rune.history.length} total messages, showing last ${recent.length})`)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
parts.push(
|
|
63
|
+
|
|
64
|
+
// Older messages: summarized (truncated to 500 chars)
|
|
65
|
+
if (olderMessages.length > 0) {
|
|
66
|
+
parts.push('\n### Earlier Context')
|
|
67
|
+
for (const msg of olderMessages) {
|
|
68
|
+
const who = msg.role === 'user' ? 'User' : 'You'
|
|
69
|
+
const text = msg.text.length > 500 ? msg.text.slice(0, 500) + '...' : msg.text
|
|
70
|
+
parts.push(`- **${who}**: ${text}`)
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Recent messages: full text (no truncation)
|
|
75
|
+
if (recentMessages.length > 0) {
|
|
76
|
+
parts.push('\n### Recent Messages (Full Detail)')
|
|
77
|
+
for (const msg of recentMessages) {
|
|
78
|
+
const who = msg.role === 'user' ? 'User' : 'You'
|
|
79
|
+
parts.push(`- **${who}**: ${msg.text}`)
|
|
80
|
+
}
|
|
62
81
|
}
|
|
63
82
|
}
|
|
64
83
|
|