algomath-extract 1.0.12 → 1.0.13

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/bin/install.js CHANGED
@@ -368,6 +368,20 @@ execSync(`sudo chown -R $(whoami) "${parentDir}"`, { stdio: 'inherit' });
368
368
  needsElevated = !isWritable(commandDir);
369
369
  }
370
370
 
371
+ // Clean old algo-*.md files first (to remove outdated commands)
372
+ const existingFiles = fs.readdirSync(commandDir).filter(f => f.startsWith('algo-') && f.endsWith('.md'));
373
+ for (const oldFile of existingFiles) {
374
+ const oldPath = path.join(commandDir, oldFile);
375
+ try {
376
+ fs.unlinkSync(oldPath);
377
+ } catch (e) {
378
+ // If can't delete, try with sudo
379
+ if (!isWindows) {
380
+ execSync(`sudo rm -f "${oldPath}"`, { stdio: 'pipe' });
381
+ }
382
+ }
383
+ }
384
+
371
385
  // Copy command files
372
386
  const sourceDir = path.join(__dirname, '..', 'commands');
373
387
  const files = fs.readdirSync(sourceDir).filter(f => f.endsWith('.md'));
@@ -4,6 +4,7 @@ argument-hint: "[file-path] [--auto] [--step] [--name <name>]"
4
4
  tools:
5
5
  read: true
6
6
  write: true
7
+ Bash: true
7
8
  ---
8
9
 
9
10
  <objective>
@@ -11,10 +12,17 @@ Extract algorithm from PDF or text file using LLM-powered parsing.
11
12
  Supports automatic extraction or step-by-step with review points.
12
13
  </objective>
13
14
 
14
- <execution_context>
15
- @/home/milgraph/Projects/algo_framework/src/extraction/pdf_processor.py
16
- @/home/milgraph/Projects/algo_framework/src/extraction/llm_extractor.py
17
- </execution_context>
15
+ <execution>
16
+ Execute the extraction by running the Node.js wrapper:
17
+ ```bash
18
+ npx algoextract "$@"
19
+ ```
20
+ This will:
21
+ 1. Parse the provided file or arguments
22
+ 2. Extract algorithm steps using LLM
23
+ 3. Save the structured algorithm to .algomath/algorithms/
24
+ 4. Display the extraction summary
25
+ </execution>
18
26
 
19
27
  <process>
20
28
  Execute extraction workflow:
@@ -11,10 +11,6 @@ Generate executable Python code from structured algorithm steps.
11
11
  Supports template-based generation (fast, reliable) or LLM-enhanced (for complex expressions).
12
12
  </objective>
13
13
 
14
- <execution_context>
15
- @/home/milgraph/Projects/algo_framework/src/generation/code_generator.py
16
- @/home/milgraph/Projects/algo_framework/src/generation/llm_generator.py
17
- </execution_context>
18
14
 
19
15
  <process>
20
16
  Execute code generation workflow:
@@ -10,9 +10,6 @@ tools:
10
10
  Display help information, available commands, and usage examples.
11
11
  </objective>
12
12
 
13
- <execution_context>
14
- @/home/milgraph/Projects/algo_framework/README.md
15
- </execution_context>
16
13
 
17
14
  <process>
18
15
  Display help:
@@ -10,9 +10,6 @@ tools:
10
10
  Display list of all saved algorithms with their status and basic info.
11
11
  </objective>
12
12
 
13
- <execution_context>
14
- @/home/milgraph/Projects/algo_framework/src/cli/commands.py
15
- </execution_context>
16
13
 
17
14
  <process>
18
15
  List algorithms:
@@ -11,9 +11,6 @@ Execute generated Python code in a safe sandboxed environment.
11
11
  Captures stdout, stderr, and execution results.
12
12
  </objective>
13
13
 
14
- <execution_context>
15
- @/home/milgraph/Projects/algo_framework/src/execution/sandbox.py
16
- </execution_context>
17
14
 
18
15
  <process>
19
16
  Execute code in sandbox:
@@ -11,9 +11,6 @@ Display current algorithm state, progress, and available next steps.
11
11
  Shows workflow state, completion status, and suggestions.
12
12
  </objective>
13
13
 
14
- <execution_context>
15
- @/home/milgraph/Projects/algo_framework/src/cli/commands.py
16
- </execution_context>
17
14
 
18
15
  <process>
19
16
  Display status:
@@ -11,11 +11,6 @@ Verify execution results, compare to expected values, explain algorithm behavior
11
11
  and identify potential edge cases.
12
12
  </objective>
13
13
 
14
- <execution_context>
15
- @/home/milgraph/Projects/algo_framework/src/verification/checker.py
16
- @/home/milgraph/Projects/algo_framework/src/verification/explainer.py
17
- @/home/milgraph/Projects/algo_framework/src/verification/edge_cases.py
18
- </execution_context>
19
14
 
20
15
  <process>
21
16
  Execute verification workflow:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "algomath-extract",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "AlgoMath Framework - Transform AI assistants into reliable mathematical problem-solving environments",
5
5
  "main": "index.js",
6
6
  "bin": {