@geekbeer/minion 3.49.0 → 3.49.1

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.
@@ -29,11 +29,25 @@ async function runEndOfDay({ workspaceId, runQuickLlmCall, clearSession = false
29
29
  throw new Error('workspaceId is required for end-of-day processing')
30
30
  }
31
31
 
32
- const today = new Date().toISOString().split('T')[0]
33
- const session = await chatStore.load(workspaceId)
32
+ // Use the system's local timezone so that `today` and the message-window
33
+ // boundaries match the cron schedule (which fires in local TZ).
34
+ const now = new Date()
35
+ const yyyy = now.getFullYear()
36
+ const mm = String(now.getMonth() + 1).padStart(2, '0')
37
+ const dd = String(now.getDate()).padStart(2, '0')
38
+ const today = `${yyyy}-${mm}-${dd}`
39
+ const dayStart = new Date(yyyy, now.getMonth(), now.getDate()).getTime()
40
+ const dayEnd = dayStart + 24 * 60 * 60 * 1000
34
41
 
35
- // No conversation record a stub so the idle day is still logged.
36
- if (!session || session.messages.length === 0) {
42
+ const session = await chatStore.load(workspaceId)
43
+ const todayMessages = (session?.messages || []).filter(
44
+ m => typeof m.timestamp === 'number' && m.timestamp >= dayStart && m.timestamp < dayEnd
45
+ )
46
+
47
+ // No conversation today — record a stub so the idle day is still logged.
48
+ // (Past messages may remain in the session; they are intentionally excluded
49
+ // from today's summary.)
50
+ if (todayMessages.length === 0) {
37
51
  const ws = workspaceId ? workspaceStore.getById(workspaceId) : null
38
52
  const wsLabel = ws ? `${ws.name}` : (workspaceId ? `workspace:${workspaceId}` : '未所属')
39
53
  const stub = `# ${today} (${wsLabel})\n\n本日、このワークスペースでの会話はありませんでした。`
@@ -42,8 +56,8 @@ async function runEndOfDay({ workspaceId, runQuickLlmCall, clearSession = false
42
56
  return { daily_log: today, memory_entries_added: 0, had_conversation: false }
43
57
  }
44
58
 
45
- // Build conversation text for summarization (last 50 messages)
46
- const messages = session.messages.slice(-50)
59
+ // Build conversation text for summarization (last 50 messages of today)
60
+ const messages = todayMessages.slice(-50)
47
61
  const conversationText = messages
48
62
  .map(m => `${m.role === 'user' ? 'ユーザー' : 'アシスタント'}: ${m.content.substring(0, 500)}`)
49
63
  .join('\n\n')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geekbeer/minion",
3
- "version": "3.49.0",
3
+ "version": "3.49.1",
4
4
  "description": "AI Agent runtime for Minion - manages status and skill deployment on VPS",
5
5
  "main": "linux/server.js",
6
6
  "bin": {