@yemi33/minions 0.1.2315 → 0.1.2316

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/engine/meeting.js CHANGED
@@ -231,18 +231,14 @@ function resolveMeetingContributionContent(output, structuredCompletion) {
231
231
  return resolveStructuredMeetingContent(structuredCompletion);
232
232
  }
233
233
 
234
- function truncateMeetingContext(text, maxBytes, label) {
235
- return shared.truncateTextBytes(text, maxBytes, `\n\n_...${label} truncated — review the meeting transcript if needed._`);
236
- }
237
-
238
234
  function formatMeetingContributions(entries, agents, emptyText, label, maxBytes) {
239
235
  const pairs = Object.entries(typeof entries === 'object' && entries ? entries : {});
240
236
  if (pairs.length === 0) return emptyText;
241
237
  const perEntryBytes = Math.max(1024, Math.floor(maxBytes / Math.max(1, pairs.length)));
242
238
  const combined = pairs.map(([agent, value]) =>
243
- `### ${agents[agent]?.name || agent}\n\n${truncateMeetingContext(value?.content || emptyText, perEntryBytes, `${label} entry`)}`
239
+ `### ${agents[agent]?.name || agent}\n\n${shared.truncateTextBytes(value?.content || emptyText, perEntryBytes, `\n\n_...${label} entry truncated — review the meeting transcript if needed._`)}`
244
240
  ).join('\n\n---\n\n');
245
- return truncateMeetingContext(combined, maxBytes, label);
241
+ return shared.truncateTextBytes(combined, maxBytes, `\n\n_...${label} truncated — review the meeting transcript if needed._`);
246
242
  }
247
243
 
248
244
  function stripMeetingSummaryMarkdown(text) {
@@ -542,10 +538,10 @@ function discoverMeetingWork(config) {
542
538
  const key = `${concludePrefix}${concluder}`;
543
539
  if (activeKeys.has(key)) continue;
544
540
 
545
- const humanNotes = truncateMeetingContext(
541
+ const humanNotes = shared.truncateTextBytes(
546
542
  (Array.isArray(meeting.humanNotes) ? meeting.humanNotes : []).map(n => '- ' + n).join('\n'),
547
543
  ENGINE_DEFAULTS.maxMeetingHumanNotesBytes,
548
- 'human meeting notes'
544
+ '\n\n_...human meeting notes truncated — review the meeting transcript if needed._'
549
545
  );
550
546
  const allFindings = formatMeetingContributions(
551
547
  meeting.findings,
@@ -605,10 +601,10 @@ function discoverMeetingWork(config) {
605
601
  const key = `meeting-${meeting.id}-r${round}-${agentId}`;
606
602
  if (activeKeys.has(key)) continue;
607
603
 
608
- const humanNotes = truncateMeetingContext(
604
+ const humanNotes = shared.truncateTextBytes(
609
605
  (meeting.humanNotes || []).map(n => '- ' + n).join('\n'),
610
606
  ENGINE_DEFAULTS.maxMeetingHumanNotesBytes,
611
- 'human meeting notes'
607
+ '\n\n_...human meeting notes truncated — review the meeting transcript if needed._'
612
608
  );
613
609
  const vars = {
614
610
  agent_name: agents[agentId]?.name || agentId,
@@ -26,10 +26,6 @@ const NOTES_INBOX_DIR = path.join(MINIONS_DIR, 'notes', 'inbox');
26
26
  const NOTES_ARCHIVE_DIR = path.join(MINIONS_DIR, 'notes', 'archive');
27
27
  const CONFIG_PATH = path.join(MINIONS_DIR, 'config.json');
28
28
 
29
- function truncatePipelineContext(text, maxBytes, label) {
30
- return shared.truncateTextBytes(text, maxBytes, `\n\n_...${label} truncated — inspect the upstream artifacts if needed._`);
31
- }
32
-
33
29
  // ── Pipeline CRUD ────────────────────────────────────────────────────────────
34
30
 
35
31
  function getPipelines() {
@@ -619,10 +615,10 @@ async function executePlanStage(stage, stageState, run, config, pipeline = {}) {
619
615
  try {
620
616
  const mtg = safeJson(path.join(MEETINGS_DIR, mid + '.json'));
621
617
  if (mtg) {
622
- const transcript = truncatePipelineContext(
618
+ const transcript = shared.truncateTextBytes(
623
619
  (mtg.transcript || []).map(formatTranscriptEntry).join('\n\n---\n\n'),
624
620
  ENGINE_DEFAULTS.maxPipelineMeetingContextBytes,
625
- `meeting transcript for ${mtg.title || mid}`
621
+ `\n\n_...meeting transcript for ${mtg.title || mid} truncated — inspect the upstream artifacts if needed._`
626
622
  );
627
623
  meetingContext += '# Meeting: ' + (mtg.title || mid) + '\n\n**Agenda:** ' + (mtg.agenda || '') + '\n\n' + transcript + '\n\n';
628
624
  }
@@ -633,15 +629,15 @@ async function executePlanStage(stage, stageState, run, config, pipeline = {}) {
633
629
  for (const depId of stage.dependsOn) {
634
630
  const depStage = run.stages[depId];
635
631
  if (depStage?.output && !depStage.artifacts?.meetings?.length) {
636
- meetingContext += '## From: ' + depId + '\n\n' + truncatePipelineContext(
632
+ meetingContext += '## From: ' + depId + '\n\n' + shared.truncateTextBytes(
637
633
  depStage.output,
638
634
  ENGINE_DEFAULTS.maxPipelineMeetingContextBytes,
639
- `pipeline stage output from ${depId}`
635
+ `\n\n_...pipeline stage output from ${depId} truncated — inspect the upstream artifacts if needed._`
640
636
  ) + '\n\n';
641
637
  }
642
638
  }
643
639
  }
644
- meetingContext = truncatePipelineContext(meetingContext, ENGINE_DEFAULTS.maxPipelineMeetingContextBytes, 'pipeline meeting context');
640
+ meetingContext = shared.truncateTextBytes(meetingContext, ENGINE_DEFAULTS.maxPipelineMeetingContextBytes, '\n\n_...pipeline meeting context truncated — inspect the upstream artifacts if needed._');
645
641
 
646
642
  // Use LLM to generate a structured plan (same approach as dashboard "Create Plan from Meeting" button)
647
643
  let content = '';
@@ -1259,7 +1255,7 @@ module.exports = {
1259
1255
  getPipelineRuns, getActiveRun, startRun, updateRunStage, upsertRunStage, completeRun,
1260
1256
  discoverPipelineWork,
1261
1257
  evaluateCondition, // exported for testing
1262
- truncatePipelineContext, executeTaskStage, executePlanStage, executeScheduleStage, executeApiStage, executeMeetingStage, executeMergePrsStage, isStageComplete, resolveTemplate, // exported for testing
1258
+ executeTaskStage, executePlanStage, executeScheduleStage, executeApiStage, executeMeetingStage, executeMergePrsStage, isStageComplete, resolveTemplate, // exported for testing
1263
1259
  _resolvePipelineProjects, // exported for testing
1264
1260
  _findMeetingsInRun, _findExistingPlanForMeeting, _findExistingPrdForPlan, _canonicalPlanName, // exported for testing
1265
1261
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.2315",
3
+ "version": "0.1.2316",
4
4
  "description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
5
5
  "bin": {
6
6
  "minions": "bin/minions.js"