@feniix/pi-code-reasoning 1.0.0 → 1.0.2

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.
Files changed (2) hide show
  1. package/extensions/index.ts +23 -3
  2. package/package.json +42 -42
@@ -52,6 +52,7 @@ interface CodeReasoningConfig {
52
52
 
53
53
  interface ThoughtTracker {
54
54
  add: (thought: ValidatedThoughtData) => void;
55
+ reset: () => void;
55
56
  ensureBranchIsValid: (branchFromThought?: number) => void;
56
57
  branches: () => string[];
57
58
  count: () => number;
@@ -275,6 +276,10 @@ function createThoughtTracker(): ThoughtTracker {
275
276
  },
276
277
  branches: () => Array.from(branches.keys()),
277
278
  count: () => thoughtHistory.length,
279
+ reset: () => {
280
+ thoughtHistory.length = 0;
281
+ branches.clear();
282
+ },
278
283
  };
279
284
  }
280
285
 
@@ -415,6 +420,23 @@ const codeReasoningParams = Type.Object(
415
420
  // Extension Entry Point
416
421
  // =============================================================================
417
422
 
423
+ export {
424
+ DEFAULT_CONFIG_FILE,
425
+ buildError,
426
+ buildSuccess,
427
+ createThoughtTracker,
428
+ formatToolOutput,
429
+ getExampleThought,
430
+ isRecord,
431
+ normalizeNumber,
432
+ parseConfig,
433
+ resolveConfigPath,
434
+ resolveEffectiveLimits,
435
+ splitParams,
436
+ toJsonString,
437
+ writeTempFile,
438
+ };
439
+
418
440
  export default function codeReasoning(pi: ExtensionAPI) {
419
441
  // Register CLI flags
420
442
  pi.registerFlag("--code-reasoning-config", {
@@ -618,9 +640,7 @@ KEY PARAMETERS:
618
640
  details: { status: "pending" },
619
641
  });
620
642
 
621
- // Create a new tracker (effectively resetting)
622
- // Note: We reassign the tracker reference - this clears the history
623
- // In a more sophisticated implementation, you'd track this differently
643
+ tracker.reset();
624
644
  return {
625
645
  content: [{ type: "text" as const, text: "Code reasoning session reset." }],
626
646
  isError: false,
package/package.json CHANGED
@@ -1,44 +1,44 @@
1
1
  {
2
- "name": "@feniix/pi-code-reasoning",
3
- "version": "1.0.0",
4
- "description": "Code Reasoning extension for pi — reflective problem-solving through sequential thinking with branching and revision support",
5
- "keywords": [
6
- "pi",
7
- "pi-package",
8
- "pi-extension",
9
- "pi-coding-agent",
10
- "ai",
11
- "code-reasoning",
12
- "sequential-thinking",
13
- "branching",
14
- "revision",
15
- "problem-solving"
16
- ],
17
- "type": "module",
18
- "files": [
19
- "extensions/",
20
- "README.md",
21
- "LICENSE"
22
- ],
23
- "pi": {
24
- "extensions": [
25
- "./extensions/index.ts"
26
- ]
27
- },
28
- "peerDependencies": {
29
- "@mariozechner/pi-ai": "*",
30
- "@mariozechner/pi-coding-agent": "*",
31
- "@sinclair/typebox": "*"
32
- },
33
- "repository": {
34
- "type": "git",
35
- "url": "git+https://github.com/feniix/pi-packages.git",
36
- "directory": "packages/pi-code-reasoning"
37
- },
38
- "author": "feniix",
39
- "license": "MIT",
40
- "bugs": {
41
- "url": "https://github.com/feniix/pi-packages/issues"
42
- },
43
- "homepage": "https://github.com/feniix/pi-packages/tree/main/packages/pi-code-reasoning#readme"
2
+ "name": "@feniix/pi-code-reasoning",
3
+ "version": "1.0.2",
4
+ "description": "Code Reasoning extension for pi — reflective problem-solving through sequential thinking with branching and revision support",
5
+ "keywords": [
6
+ "pi",
7
+ "pi-package",
8
+ "pi-extension",
9
+ "pi-coding-agent",
10
+ "ai",
11
+ "code-reasoning",
12
+ "sequential-thinking",
13
+ "branching",
14
+ "revision",
15
+ "problem-solving"
16
+ ],
17
+ "type": "module",
18
+ "files": [
19
+ "extensions/",
20
+ "README.md",
21
+ "LICENSE"
22
+ ],
23
+ "pi": {
24
+ "extensions": [
25
+ "./extensions/index.ts"
26
+ ]
27
+ },
28
+ "peerDependencies": {
29
+ "@mariozechner/pi-ai": "*",
30
+ "@mariozechner/pi-coding-agent": "*",
31
+ "@sinclair/typebox": "*"
32
+ },
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "git+https://github.com/feniix/pi-packages.git",
36
+ "directory": "packages/pi-code-reasoning"
37
+ },
38
+ "author": "feniix",
39
+ "license": "MIT",
40
+ "bugs": {
41
+ "url": "https://github.com/feniix/pi-packages/issues"
42
+ },
43
+ "homepage": "https://github.com/feniix/pi-packages/tree/main/packages/pi-code-reasoning#readme"
44
44
  }