@openeryc/pi-coding-agent 0.75.58 → 0.75.59

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 (30) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/core/agent-session.d.ts +11 -1
  3. package/dist/core/agent-session.d.ts.map +1 -1
  4. package/dist/core/agent-session.js +32 -0
  5. package/dist/core/agent-session.js.map +1 -1
  6. package/dist/core/session-manager.d.ts +4 -0
  7. package/dist/core/session-manager.d.ts.map +1 -1
  8. package/dist/core/session-manager.js +19 -2
  9. package/dist/core/session-manager.js.map +1 -1
  10. package/dist/core/system-prompt.d.ts +2 -0
  11. package/dist/core/system-prompt.d.ts.map +1 -1
  12. package/dist/core/system-prompt.js +8 -1
  13. package/dist/core/system-prompt.js.map +1 -1
  14. package/dist/modes/interactive/goal-evaluator.d.ts +23 -0
  15. package/dist/modes/interactive/goal-evaluator.d.ts.map +1 -0
  16. package/dist/modes/interactive/goal-evaluator.js +68 -0
  17. package/dist/modes/interactive/goal-evaluator.js.map +1 -0
  18. package/dist/modes/interactive/interactive-mode.d.ts +6 -6
  19. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  20. package/dist/modes/interactive/interactive-mode.js +133 -79
  21. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  22. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  23. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  24. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  25. package/examples/extensions/sandbox/package-lock.json +2 -2
  26. package/examples/extensions/sandbox/package.json +1 -1
  27. package/examples/extensions/with-deps/package-lock.json +2 -2
  28. package/examples/extensions/with-deps/package.json +1 -1
  29. package/npm-shrinkwrap.json +12 -12
  30. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.75.59] - 2026-07-14
4
+
5
+ ### Added
6
+ - Claude Code-style `/goal` system: goal condition is injected into system prompt, evaluated each turn by an LLM evaluator, and the runner never stops until the condition is met or the user clears it.
7
+ - `/goal` status display showing condition, running time, turn count, token spend, and evaluator reason.
8
+ - `/goal clear` (and aliases `stop`/`off`/`reset`/`cancel`) to clear the active goal.
9
+ - Evaluator returns `nextDirection` when goal is not yet met, guiding the next turn with a concrete instruction.
10
+ - `clearSessionGoal()`, `getLastAssistantMessage()`, `appendGoalCleared()` APIs for programmatic goal management.
11
+
12
+ ### Changed
13
+ - `/goal` with a condition now immediately submits it as a user message (like Claude Code).
14
+ - Goal runner no longer pauses on duplicate output or error retry limits — it only stops when the evaluator confirms the condition is met.
15
+ - System prompt includes `<session_goal>` tag when a goal is active, so the model is always aware of it.
16
+ - Setting or clearing a goal rebuilds the system prompt immediately.
17
+ - Error retries are now infinite with a fixed 5s delay instead of exponential backoff with a 10-attempt cap.
18
+
19
+ ### Removed
20
+ - Duplicate-detection auto-pause from goal runner (relied on by the evaluator's nextDirection instead).
21
+
3
22
  ## [0.75.58] - 2026-07-12
4
23
 
5
24
  ### Added
@@ -13,7 +13,7 @@
13
13
  * Modes use this class and add their own I/O layer on top.
14
14
  */
15
15
  import type { Agent, AgentEvent, AgentMessage, AgentState, AgentTool, ThinkingLevel } from "@openeryc/pi-agent-core";
16
- import type { ImageContent, Model, TextContent } from "@openeryc/pi-ai";
16
+ import type { AssistantMessage, ImageContent, Model, TextContent } from "@openeryc/pi-ai";
17
17
  import { type BashResult } from "./bash-executor.ts";
18
18
  import { type CompactionResult } from "./compaction/index.ts";
19
19
  import { type ContextUsage, type ExtensionCommandContextActions, type ExtensionErrorListener, ExtensionRunner, type ExtensionUIContext, type InputSource, type ReplacedSessionContext, type SessionStartEvent, type ShutdownHandler, type ToolDefinition, type ToolInfo } from "./extensions/index.ts";
@@ -552,8 +552,14 @@ export declare class AgentSession {
552
552
  setSessionName(name: string): void;
553
553
  /**
554
554
  * Set a goal for the current session.
555
+ * Rebuilds system prompt so the goal is visible to the model.
555
556
  */
556
557
  setSessionGoal(goal: string): void;
558
+ /**
559
+ * Clear the current session goal.
560
+ * Rebuilds system prompt to remove the goal from the model's context.
561
+ */
562
+ clearSessionGoal(): void;
557
563
  /**
558
564
  * Navigate to a different node in the session tree.
559
565
  * Unlike fork() which creates a new session file, this stays in the same file.
@@ -603,6 +609,10 @@ export declare class AgentSession {
603
609
  * @returns The resolved output file path.
604
610
  */
605
611
  exportToJsonl(outputPath?: string): string;
612
+ /**
613
+ * Get the last assistant message with full content (including usage).
614
+ */
615
+ getLastAssistantMessage(): AssistantMessage | undefined;
606
616
  /**
607
617
  * Get text content of last assistant message.
608
618
  * Useful for /copy command.