@oh-my-pi/pi-agent-core 15.10.10 → 15.10.11

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 CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [15.10.11] - 2026-06-10
6
+
7
+ ### Changed
8
+
9
+ - Editorial pass over the compaction prompts: fixed garbled grammar and missing articles, RFC-keyed prohibitions, deduped restated instructions; parsed markers (`<read-files>`/`<modified-files>`/`<previous-summary>`) and all output-format headings left byte-identical
10
+ - Catalog imports moved to the new `@oh-my-pi/pi-catalog` package: subpath imports (`calculateCost`, Codex wire constants) plus catalog values previously taken from the `@oh-my-pi/pi-ai` root (`getBundledModel`, `clampThinkingLevelForModel`), which pi-ai no longer re-exports; type-only `Model`/`Api`/`Effort` imports from pi-ai are unchanged
11
+
5
12
  ## [15.10.8] - 2026-06-09
6
13
  ### Added
7
14
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-agent-core",
4
- "version": "15.10.10",
4
+ "version": "15.10.11",
5
5
  "description": "General-purpose agent with transport abstraction, state management, and attachment support",
6
6
  "homepage": "https://omp.sh",
7
7
  "author": "Can Boluk",
@@ -35,9 +35,10 @@
35
35
  "fmt": "biome format --write ."
36
36
  },
37
37
  "dependencies": {
38
- "@oh-my-pi/pi-ai": "15.10.10",
39
- "@oh-my-pi/pi-natives": "15.10.10",
40
- "@oh-my-pi/pi-utils": "15.10.10",
38
+ "@oh-my-pi/pi-ai": "15.10.11",
39
+ "@oh-my-pi/pi-catalog": "15.10.11",
40
+ "@oh-my-pi/pi-natives": "15.10.11",
41
+ "@oh-my-pi/pi-utils": "15.10.11",
41
42
  "@opentelemetry/api": "^1.9.1"
42
43
  },
43
44
  "devDependencies": {
package/src/agent.ts CHANGED
@@ -9,7 +9,6 @@ import {
9
9
  type CursorExecHandlers,
10
10
  type CursorToolResultHandler,
11
11
  type Effort,
12
- getBundledModel,
13
12
  type ImageContent,
14
13
  type Message,
15
14
  type Model,
@@ -22,6 +21,7 @@ import {
22
21
  type ToolChoice,
23
22
  type ToolResultMessage,
24
23
  } from "@oh-my-pi/pi-ai";
24
+ import { getBundledModel } from "@oh-my-pi/pi-catalog/models";
25
25
  import { abortReasonText, agentLoop, agentLoopContinue } from "./agent-loop";
26
26
  import type { AppendOnlyContextManager } from "./append-only-context";
27
27
  import type { HarmonyAuditEvent } from "./harmony-leak";
@@ -7,7 +7,6 @@
7
7
 
8
8
  import {
9
9
  type AssistantMessage,
10
- clampThinkingLevelForModel,
11
10
  Effort,
12
11
  type FetchImpl,
13
12
  type Message,
@@ -15,6 +14,7 @@ import {
15
14
  type Model,
16
15
  type Usage,
17
16
  } from "@oh-my-pi/pi-ai";
17
+ import { clampThinkingLevelForModel } from "@oh-my-pi/pi-catalog/model-thinking";
18
18
  import { countTokens } from "@oh-my-pi/pi-natives";
19
19
  import { logger, prompt } from "@oh-my-pi/pi-utils";
20
20
  import { type AgentTelemetry, instrumentedCompleteSimple } from "../telemetry";
@@ -539,10 +539,11 @@ function effortFromThinkingLevel(level: ThinkingLevel): Effort {
539
539
  * - Explicit effort → respect user choice → clamped per model.
540
540
  *
541
541
  * The clamp routes through `clampThinkingLevelForModel`, which returns
542
- * `undefined` for models with `compat.supportsReasoningEffort: false`
543
- * (e.g. `xai-oauth/grok-build`). That `undefined` then flows through to the
544
- * openai-responses mapper where `modelOmitsReasoningEffort` short-circuits
545
- * the wire param — no `requireSupportedEffort` throw.
542
+ * `undefined` for reasoning models without a thinking config — the build-time
543
+ * encoding of `compat.supportsReasoningEffort: false` (e.g.
544
+ * `xai-oauth/grok-build`). That `undefined` then flows through to the
545
+ * openai-responses mapper, which omits the wire param — no
546
+ * `requireSupportedEffort` throw.
546
547
  */
547
548
  function resolveCompactionEffort(model: Model, level: ThinkingLevel | undefined): Effort | undefined {
548
549
  if (level === ThinkingLevel.Off) return undefined;
@@ -12,12 +12,6 @@
12
12
  * with `{ summary, shortSummary? }`.
13
13
  */
14
14
 
15
- import {
16
- CODEX_BASE_URL,
17
- getCodexAccountId,
18
- OPENAI_HEADER_VALUES,
19
- OPENAI_HEADERS,
20
- } from "@oh-my-pi/pi-ai/providers/openai-codex/constants";
21
15
  import { parseTextSignature } from "@oh-my-pi/pi-ai/providers/openai-responses-shared";
22
16
  import { transformMessages } from "@oh-my-pi/pi-ai/providers/transform-messages";
23
17
  import type { AssistantMessage, FetchImpl, Message, Model } from "@oh-my-pi/pi-ai/types";
@@ -26,6 +20,12 @@ import {
26
20
  getOpenAIResponsesHistoryPayload,
27
21
  normalizeResponsesToolCallId,
28
22
  } from "@oh-my-pi/pi-ai/utils";
23
+ import {
24
+ CODEX_BASE_URL,
25
+ getCodexAccountId,
26
+ OPENAI_HEADER_VALUES,
27
+ OPENAI_HEADERS,
28
+ } from "@oh-my-pi/pi-catalog/wire/codex";
29
29
  import { logger } from "@oh-my-pi/pi-utils";
30
30
 
31
31
  // ============================================================================
@@ -4,7 +4,7 @@ You MUST use EXACT format:
4
4
 
5
5
  ## Goal
6
6
 
7
- [What user trying to accomplish in this branch?]
7
+ [What is the user trying to accomplish in this branch?]
8
8
 
9
9
  ## Constraints & Preferences
10
10
  - [Constraints, preferences, requirements mentioned]
@@ -1,4 +1,4 @@
1
- Another language model started to solve this problem and produced a summary of its thinking process. You also have access to the state of the tools that were used by that language model. You MUST use this to build on the work that has already been done and NEVER duplicate work. Here is the summary produced by the other language model; you MUST use the information in this summary to assist with your own analysis:
1
+ Another language model started to solve this problem and produced a summary of its thinking process. You also have access to the state of the tools that model used. You MUST build on the work already done and NEVER duplicate it. Here is that summary:
2
2
 
3
3
  <summary>
4
4
  {{summary}}
@@ -1,6 +1,6 @@
1
- You MUST summarize the conversation above into a structured context checkpoint handoff summary for another LLM to resume task.
1
+ You MUST summarize the conversation above into a structured handoff summary for another LLM to resume the task.
2
2
 
3
- IMPORTANT: If conversation ends with unanswered question to user or imperative/request awaiting user response (e.g., "Please run command and paste output"), you MUST preserve that exact question/request.
3
+ IMPORTANT: If the conversation ends with an unanswered question or a request awaiting user response (e.g., "Please run command and paste output"), you MUST preserve that exact question/request.
4
4
 
5
5
  You MUST use this format (sections can be omitted if not applicable):
6
6
 
@@ -1,13 +1,13 @@
1
- You MUST incorporate new messages above into the existing handoff summary in <previous-summary> tags, used by another LLM to resume task.
1
+ You MUST incorporate the new messages above into the existing handoff summary in <previous-summary> tags, used by another LLM to resume the task.
2
2
  RULES:
3
- - MUST preserve all information from previous summary
3
+ - MUST preserve all information from the previous summary
4
4
  - MUST add new progress, decisions, and context from new messages
5
5
  - MUST update Progress: move items from "In Progress" to "Done" when completed
6
6
  - MUST update "Next Steps" based on what was accomplished
7
7
  - MUST preserve exact file paths, function names, and error messages
8
8
  - You MAY remove anything no longer relevant
9
9
 
10
- IMPORTANT: If new messages end with unanswered question or request to user, you MUST add it to Critical Context (replacing any previous pending question if answered).
10
+ IMPORTANT: If the new messages end with an unanswered question or request to the user, you MUST add it to Critical Context (replacing any previous pending question if answered).
11
11
 
12
12
  You MUST use this format (omit sections if not applicable):
13
13
 
@@ -1,3 +1,3 @@
1
1
  Summarize conversations between users and AI coding assistants. Produce structured summaries in the exact specified format.
2
2
 
3
- Do NOT continue the conversation. Do NOT respond to questions in the conversation. Output ONLY the structured summary.
3
+ NEVER continue the conversation. NEVER respond to questions in it. Output ONLY the structured summary.
package/src/proxy.ts CHANGED
@@ -13,8 +13,8 @@ import {
13
13
  type StopReason,
14
14
  type ToolCall,
15
15
  } from "@oh-my-pi/pi-ai";
16
- import { calculateCost } from "@oh-my-pi/pi-ai/models";
17
16
  import { parseStreamingJson } from "@oh-my-pi/pi-ai/utils/json-parse";
17
+ import { calculateCost } from "@oh-my-pi/pi-catalog/models";
18
18
  import { readSseJson } from "@oh-my-pi/pi-utils";
19
19
 
20
20
  // Event stream adapter for proxy SSE events