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 +14 -0
- package/commands/algo-extract.md +12 -4
- package/commands/algo-generate.md +0 -4
- package/commands/algo-help.md +0 -3
- package/commands/algo-list.md +0 -3
- package/commands/algo-run.md +0 -3
- package/commands/algo-status.md +0 -3
- package/commands/algo-verify.md +0 -5
- package/package.json +1 -1
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'));
|
package/commands/algo-extract.md
CHANGED
|
@@ -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
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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:
|
package/commands/algo-help.md
CHANGED
package/commands/algo-list.md
CHANGED
package/commands/algo-run.md
CHANGED
|
@@ -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:
|
package/commands/algo-status.md
CHANGED
|
@@ -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:
|
package/commands/algo-verify.md
CHANGED
|
@@ -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:
|