@oh-my-pi/pi-coding-agent 16.1.4 → 16.1.6
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/CHANGELOG.md +13 -0
- package/dist/cli.js +2508 -2497
- package/dist/types/modes/interactive-mode.d.ts +1 -1
- package/dist/types/modes/loop-limit.d.ts +14 -1
- package/dist/types/modes/types.d.ts +1 -1
- package/dist/types/session/agent-session.d.ts +1 -3
- package/package.json +12 -12
- package/src/internal-urls/docs-index.generated.txt +1 -1
- package/src/modes/interactive-mode.ts +15 -9
- package/src/modes/loop-limit.ts +80 -28
- package/src/modes/types.ts +1 -1
- package/src/prompts/system/system-prompt.md +18 -7
- package/src/prompts/tools/task.md +31 -31
- package/src/session/agent-session.ts +5 -4
- package/src/slash-commands/builtin-registry.ts +5 -2
|
@@ -177,7 +177,7 @@ export declare class InteractiveMode implements InteractiveModeContext {
|
|
|
177
177
|
* user submits becomes the new loop prompt and resumes iteration.
|
|
178
178
|
*/
|
|
179
179
|
pauseLoop(): void;
|
|
180
|
-
handleLoopCommand(args?: string): Promise<
|
|
180
|
+
handleLoopCommand(args?: string): Promise<string | undefined>;
|
|
181
181
|
recordLocalSubmission(text: string, imageCount?: number): () => void;
|
|
182
182
|
withLocalSubmission<T>(text: string, fn: () => Promise<T>, options?: {
|
|
183
183
|
imageCount?: number;
|
|
@@ -14,7 +14,20 @@ export type LoopLimitRuntime = {
|
|
|
14
14
|
durationMs: number;
|
|
15
15
|
deadlineMs: number;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export interface ParsedLoopArgs {
|
|
18
|
+
/** Iteration/duration budget, when the user supplied a leading limit token. */
|
|
19
|
+
limit?: LoopLimitConfig;
|
|
20
|
+
/** Inline loop prompt: text after the limit, or the whole argument when no limit was given. */
|
|
21
|
+
prompt?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Parse `/loop` arguments into an optional leading limit plus an optional inline
|
|
25
|
+
* prompt. A token that *looks* like a limit (starts with a digit or sign) but
|
|
26
|
+
* fails to parse is a hard error; anything else is treated as prompt text, so
|
|
27
|
+
* plain prose after `/loop` keeps starting an unbounded loop instead of erroring
|
|
28
|
+
* (the pre-arg-parsing behavior). Returns the error message string on failure.
|
|
29
|
+
*/
|
|
30
|
+
export declare function parseLoopLimitArgs(args: string): ParsedLoopArgs | string;
|
|
18
31
|
export declare function createLoopLimitRuntime(config: LoopLimitConfig | undefined, nowMs?: number): LoopLimitRuntime | undefined;
|
|
19
32
|
export declare function consumeLoopLimitIteration(limit: LoopLimitRuntime | undefined, nowMs?: number): boolean;
|
|
20
33
|
export declare function isLoopDurationExpired(limit: LoopLimitRuntime | undefined, nowMs?: number): boolean;
|
|
@@ -339,7 +339,7 @@ export interface InteractiveModeContext {
|
|
|
339
339
|
handlePlanModeCommand(initialPrompt?: string): Promise<void>;
|
|
340
340
|
handleGoalModeCommand(rest?: string): Promise<void>;
|
|
341
341
|
handleGuidedGoalCommand(rest?: string): Promise<void>;
|
|
342
|
-
handleLoopCommand(args?: string): Promise<
|
|
342
|
+
handleLoopCommand(args?: string): Promise<string | undefined>;
|
|
343
343
|
disableLoopMode(): void;
|
|
344
344
|
pauseLoop(): void;
|
|
345
345
|
handlePlanApproval(details: PlanApprovalDetails): Promise<void>;
|
|
@@ -384,12 +384,10 @@ export declare class AgentSession {
|
|
|
384
384
|
get modelRegistry(): ModelRegistry;
|
|
385
385
|
get asyncJobManager(): AsyncJobManager | undefined;
|
|
386
386
|
getAgentId(): string | undefined;
|
|
387
|
-
/** Advance the tool-choice queue and return the next directive for the upcoming LLM call. */
|
|
388
|
-
nextToolChoice(): ToolChoice | undefined;
|
|
389
387
|
/**
|
|
390
388
|
* The per-turn tool-choice directive for the agent loop's `getToolChoice`. Priority:
|
|
391
389
|
* 1. a HARD forced choice from the queue (genuine forces: user-force, eager-todo, …) —
|
|
392
|
-
* consuming
|
|
390
|
+
* consuming (advances the queue generator);
|
|
393
391
|
* 2. else, when a non-forcing preview is pending, a {@link SoftToolRequirement} — a
|
|
394
392
|
* PEEK (advances/pops nothing), so the agent-loop injects the reminder once per head
|
|
395
393
|
* and escalates to a forced `resolve` only if the model declines. A compliant turn
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-coding-agent",
|
|
4
|
-
"version": "16.1.
|
|
4
|
+
"version": "16.1.6",
|
|
5
5
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -48,17 +48,17 @@
|
|
|
48
48
|
"@agentclientprotocol/sdk": "0.25.0",
|
|
49
49
|
"@babel/parser": "^7.29.7",
|
|
50
50
|
"@mozilla/readability": "^0.6.0",
|
|
51
|
-
"@oh-my-pi/hashline": "16.1.
|
|
52
|
-
"@oh-my-pi/omp-stats": "16.1.
|
|
53
|
-
"@oh-my-pi/pi-agent-core": "16.1.
|
|
54
|
-
"@oh-my-pi/pi-ai": "16.1.
|
|
55
|
-
"@oh-my-pi/pi-catalog": "16.1.
|
|
56
|
-
"@oh-my-pi/pi-mnemopi": "16.1.
|
|
57
|
-
"@oh-my-pi/pi-natives": "16.1.
|
|
58
|
-
"@oh-my-pi/pi-tui": "16.1.
|
|
59
|
-
"@oh-my-pi/pi-utils": "16.1.
|
|
60
|
-
"@oh-my-pi/pi-wire": "16.1.
|
|
61
|
-
"@oh-my-pi/snapcompact": "16.1.
|
|
51
|
+
"@oh-my-pi/hashline": "16.1.6",
|
|
52
|
+
"@oh-my-pi/omp-stats": "16.1.6",
|
|
53
|
+
"@oh-my-pi/pi-agent-core": "16.1.6",
|
|
54
|
+
"@oh-my-pi/pi-ai": "16.1.6",
|
|
55
|
+
"@oh-my-pi/pi-catalog": "16.1.6",
|
|
56
|
+
"@oh-my-pi/pi-mnemopi": "16.1.6",
|
|
57
|
+
"@oh-my-pi/pi-natives": "16.1.6",
|
|
58
|
+
"@oh-my-pi/pi-tui": "16.1.6",
|
|
59
|
+
"@oh-my-pi/pi-utils": "16.1.6",
|
|
60
|
+
"@oh-my-pi/pi-wire": "16.1.6",
|
|
61
|
+
"@oh-my-pi/snapcompact": "16.1.6",
|
|
62
62
|
"@opentelemetry/api": "^1.9.1",
|
|
63
63
|
"@opentelemetry/context-async-hooks": "^2.7.1",
|
|
64
64
|
"@opentelemetry/exporter-trace-otlp-proto": "^0.218.0",
|