@geekbeer/minion 2.50.2 → 2.51.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.
@@ -176,6 +176,7 @@ async function workflowRoutes(fastify, opts) {
176
176
  pipeline_skill_names: pipelineSkillNames,
177
177
  content: workflow.content || '',
178
178
  project_id: effectiveProjectId,
179
+ ...(workflow.pipeline_steps?.length > 0 && { pipeline_steps: workflow.pipeline_steps }),
179
180
  }),
180
181
  })
181
182
 
@@ -244,6 +245,10 @@ async function workflowRoutes(fastify, opts) {
244
245
  const updatedWorkflows = await workflowStore.upsertByName({
245
246
  name: workflow.name,
246
247
  pipeline_skill_names: workflow.pipeline_skill_names,
248
+ pipeline_steps: (workflow.pipeline || []).map(step => ({
249
+ assigned_role: step.assigned_role,
250
+ requires_review: step.requires_review || false,
251
+ })),
247
252
  content: workflow.content || '',
248
253
  project_id: workflow.project_id || null,
249
254
  })
@@ -82,7 +82,7 @@ async function findByName(name) {
82
82
  * Upsert a workflow by name.
83
83
  * If exists: updates definition only (preserves schedule/local state).
84
84
  * If new: creates with inactive schedule.
85
- * @param {object} workflowData - { name, pipeline_skill_names, content, project_id }
85
+ * @param {object} workflowData - { name, pipeline_skill_names, pipeline_steps, content, project_id }
86
86
  * @returns {Promise<Array>} Updated workflows array
87
87
  */
88
88
  async function upsertByName(workflowData) {
@@ -99,11 +99,15 @@ async function upsertByName(workflowData) {
99
99
  if (workflowData.project_id !== undefined) {
100
100
  workflows[index].project_id = workflowData.project_id
101
101
  }
102
+ if (workflowData.pipeline_steps !== undefined) {
103
+ workflows[index].pipeline_steps = workflowData.pipeline_steps
104
+ }
102
105
  } else {
103
106
  workflows.push({
104
107
  id: crypto.randomUUID(),
105
108
  name: workflowData.name,
106
109
  pipeline_skill_names: workflowData.pipeline_skill_names,
110
+ pipeline_steps: workflowData.pipeline_steps || [],
107
111
  content: workflowData.content || '',
108
112
  project_id: workflowData.project_id || null,
109
113
  cron_expression: '',
@@ -22,9 +22,8 @@ const path = require('path')
22
22
  const { verifyToken } = require('../../core/lib/auth')
23
23
  const { config } = require('../../core/config')
24
24
  const chatStore = require('../../core/stores/chat-store')
25
- const memoryStore = require('../../core/stores/memory-store')
26
- const dailyLogStore = require('../../core/stores/daily-log-store')
27
25
  const { runEndOfDay } = require('../../core/lib/end-of-day')
26
+ const { DATA_DIR } = require('../../core/lib/platform')
28
27
 
29
28
  /** @type {import('child_process').ChildProcess | null} */
30
29
  let activeChatChild = null
@@ -205,21 +204,24 @@ async function chatRoutes(fastify) {
205
204
  async function buildContextPrefix(message, context, sessionId) {
206
205
  const parts = []
207
206
 
208
- // Inject memory + daily logs on new sessions only (not on --resume)
207
+ // Tell the LLM where to find memory and daily logs (content is NOT injected)
209
208
  if (!sessionId) {
210
- try {
211
- const memorySnippet = await memoryStore.getContextSnippet(2000)
212
- const dailyLogSnippet = await dailyLogStore.getContextSnippet(3, 1500)
213
-
214
- if (memorySnippet) {
215
- parts.push('[ミニオンメモリ(長期記憶)]', memorySnippet, '')
216
- }
217
- if (dailyLogSnippet) {
218
- parts.push('[最近のデイリーログ]', dailyLogSnippet, '')
219
- }
220
- } catch (err) {
221
- console.error('[Chat] Failed to load memory/daily-log context:', err.message)
222
- }
209
+ const memoryDir = require('path').join(DATA_DIR, 'memory')
210
+ const dailyLogDir = require('path').join(DATA_DIR, 'daily-logs')
211
+ parts.push(
212
+ '[長期記憶・デイリーログについて]',
213
+ 'あなたには長期記憶(メモリ)とデイリーログがあります。内容は毎回読み込まれません。',
214
+ '必要なときだけ以下のファイルを読んで参照してください:',
215
+ `- メモリ索引: ${memoryDir}/MEMORY.md(概要一覧。詳細は個別の .md ファイルを読む)`,
216
+ `- デイリーログ: ${dailyLogDir}/YYYY-MM-DD.md(日付別の作業記録)`,
217
+ '',
218
+ '参照すべきタイミング:',
219
+ '- 過去の作業や決定事項を思い出す必要があるとき',
220
+ '- ユーザーの好みやフィードバックを確認したいとき',
221
+ '- 以前の作業の続きをするとき',
222
+ '- わからないことがあり、過去に記録した情報が役立ちそうなとき',
223
+ ''
224
+ )
223
225
  }
224
226
 
225
227
  if (context) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geekbeer/minion",
3
- "version": "2.50.2",
3
+ "version": "2.51.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": {
@@ -18,9 +18,7 @@ const path = require('path')
18
18
  const { verifyToken } = require('../../core/lib/auth')
19
19
  const { config } = require('../../core/config')
20
20
  const chatStore = require('../../core/stores/chat-store')
21
- const memoryStore = require('../../core/stores/memory-store')
22
- const dailyLogStore = require('../../core/stores/daily-log-store')
23
- const { buildExtendedPath } = require('../../core/lib/platform')
21
+ const { buildExtendedPath, DATA_DIR } = require('../../core/lib/platform')
24
22
  const { runEndOfDay } = require('../../core/lib/end-of-day')
25
23
 
26
24
  let activeChatChild = null
@@ -168,21 +166,24 @@ async function chatRoutes(fastify) {
168
166
  async function buildContextPrefix(message, context, sessionId) {
169
167
  const parts = []
170
168
 
171
- // Inject memory + daily logs on new sessions only (not on --resume)
169
+ // Tell the LLM where to find memory and daily logs (content is NOT injected)
172
170
  if (!sessionId) {
173
- try {
174
- const memorySnippet = await memoryStore.getContextSnippet(2000)
175
- const dailyLogSnippet = await dailyLogStore.getContextSnippet(3, 1500)
176
-
177
- if (memorySnippet) {
178
- parts.push('[ミニオンメモリ(長期記憶)]', memorySnippet, '')
179
- }
180
- if (dailyLogSnippet) {
181
- parts.push('[最近のデイリーログ]', dailyLogSnippet, '')
182
- }
183
- } catch (err) {
184
- console.error('[Chat] Failed to load memory/daily-log context:', err.message)
185
- }
171
+ const memoryDir = require('path').join(DATA_DIR, 'memory')
172
+ const dailyLogDir = require('path').join(DATA_DIR, 'daily-logs')
173
+ parts.push(
174
+ '[長期記憶・デイリーログについて]',
175
+ 'あなたには長期記憶(メモリ)とデイリーログがあります。内容は毎回読み込まれません。',
176
+ '必要なときだけ以下のファイルを読んで参照してください:',
177
+ `- メモリ索引: ${memoryDir}/MEMORY.md(概要一覧。詳細は個別の .md ファイルを読む)`,
178
+ `- デイリーログ: ${dailyLogDir}/YYYY-MM-DD.md(日付別の作業記録)`,
179
+ '',
180
+ '参照すべきタイミング:',
181
+ '- 過去の作業や決定事項を思い出す必要があるとき',
182
+ '- ユーザーの好みやフィードバックを確認したいとき',
183
+ '- 以前の作業の続きをするとき',
184
+ '- わからないことがあり、過去に記録した情報が役立ちそうなとき',
185
+ ''
186
+ )
186
187
  }
187
188
 
188
189
  if (context) {