@geminilight/mindos 0.6.0 → 0.6.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.
@@ -24,6 +24,7 @@ import { readSettings } from '@/lib/settings';
24
24
  import { MindOSError, apiError, ErrorCodes } from '@/lib/errors';
25
25
  import { metrics } from '@/lib/metrics';
26
26
  import { assertNotProtected } from '@/lib/core';
27
+ import { scanExtensionPaths } from '@/lib/pi-integration/extensions';
27
28
  import type { Message as FrontendMessage } from '@/lib/types';
28
29
 
29
30
  // ---------------------------------------------------------------------------
@@ -417,6 +418,7 @@ export async function POST(req: NextRequest) {
417
418
  path.join(projectRoot, 'skills'),
418
419
  path.join(getMindRoot(), '.skills'),
419
420
  ],
421
+ additionalExtensionPaths: scanExtensionPaths(),
420
422
  });
421
423
  await resourceLoader.reload();
422
424
 
@@ -1,6 +1,28 @@
1
+ import fs from 'fs';
2
+ import os from 'os';
1
3
  import path from 'path';
2
4
  import { DefaultResourceLoader, SettingsManager } from '@mariozechner/pi-coding-agent';
3
5
 
6
+ export function getMindosExtensionsDir(): string {
7
+ return path.join(os.homedir(), '.mindos', 'extensions');
8
+ }
9
+
10
+ /** Scan ~/.mindos/extensions/ for .ts files and index.ts in subdirs */
11
+ export function scanExtensionPaths(): string[] {
12
+ const dir = getMindosExtensionsDir();
13
+ if (!fs.existsSync(dir)) return [];
14
+ const paths: string[] = [];
15
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
16
+ if (entry.isFile() && entry.name.endsWith('.ts')) {
17
+ paths.push(path.join(dir, entry.name));
18
+ } else if (entry.isDirectory()) {
19
+ const indexPath = path.join(dir, entry.name, 'index.ts');
20
+ if (fs.existsSync(indexPath)) paths.push(indexPath);
21
+ }
22
+ }
23
+ return paths;
24
+ }
25
+
4
26
  export interface ExtensionSummary {
5
27
  name: string;
6
28
  path: string;
@@ -22,6 +44,7 @@ export async function getExtensionsList(
22
44
  systemPromptOverride: () => '',
23
45
  appendSystemPromptOverride: () => [],
24
46
  additionalSkillPaths: [],
47
+ additionalExtensionPaths: scanExtensionPaths(),
25
48
  });
26
49
 
27
50
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geminilight/mindos",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "MindOS — Human-Agent Collaborative Mind System. Local-first knowledge base that syncs your mind to all AI Agents via MCP.",
5
5
  "keywords": [
6
6
  "mindos",