@hienlh/ppm 0.13.94 → 0.13.95

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
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.13.95] - 2026-06-06
4
+
5
+ ### Fixed
6
+ - **1M context toggle now actually enables 1M**: The 0.13.94 toggle only forwarded the `context-1m-2025-08-07` beta header, which the current CLI ignores for newer models — `/context` still showed 200k on Opus 4.8. Two changes make it work: (1) the bundled `@anthropic-ai/claude-agent-sdk` is now synced to the pinned `0.3.146` (its CLI v2.1.146 recognizes `opus-4-8`; node_modules had drifted to `0.2.81`); (2) when the toggle is on, PPM appends a `[1m]` suffix to the model name — the CLI's GA mechanism for a 1M window — which it strips before the API call. Verified end-to-end: `contextWindow=1000000` on an entitled Team account (`claude-agent-sdk.ts`). Requires a Max/Team/Enterprise account and a supported model; others will error.
7
+
3
8
  ## [0.13.94] - 2026-06-06
4
9
 
5
10
  ### Added
@@ -71,4 +71,4 @@ This skill covers the `ppm` CLI, its HTTP API, and its config DB. It does **not*
71
71
  - Third-party extensions (inspect via `ppm ext list`).
72
72
  - The Claude Agent SDK internals (separate skill).
73
73
 
74
- <!-- Generated for PPM v0.13.94 at build time. Re-run `ppm export skill --install` to refresh. -->
74
+ <!-- Generated for PPM v0.13.95 at build time. Re-run `ppm export skill --install` to refresh. -->
@@ -206,4 +206,4 @@ _Base URL: `http://localhost:8080` (default; override via `ppm config set port <
206
206
  - `ws://<host>/ws/terminal` — PTY terminal multiplexer
207
207
  - `ws://<host>/ws/extensions` — extension host channel
208
208
 
209
- <!-- Generated from src/server/routes/ for PPM v0.13.94 -->
209
+ <!-- Generated from src/server/routes/ for PPM v0.13.95 -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hienlh/ppm",
3
- "version": "0.13.94",
3
+ "version": "0.13.95",
4
4
  "description": "Personal Project Manager — mobile-first web IDE with AI assistance",
5
5
  "author": "hienlh",
6
6
  "license": "MIT",
@@ -833,6 +833,15 @@ export class ClaudeAgentSdkProvider implements AIProvider {
833
833
  console.log(`[sdk] session=${sessionId} mcpServers: ${Object.keys(mcpServers).join(", ")}`);
834
834
  }
835
835
 
836
+ // 1M context (GA): the CLI enables a 1M window when the model name carries a
837
+ // [1m] suffix. The suffix is stripped before the API call. Requires an entitled
838
+ // account (Max/Team/Enterprise) and a supported model; otherwise the API errors.
839
+ const baseModel = opts?.model ?? providerConfig.model;
840
+ const resolvedModel =
841
+ baseModel && providerConfig.context_1m && !/\[1m\]$/i.test(baseModel)
842
+ ? `${baseModel}[1m]`
843
+ : baseModel;
844
+
836
845
  const queryOptions: Record<string, any> = {
837
846
  // On Windows, child_process.spawn("bun") fails with ENOENT — force node
838
847
  ...(process.platform === "win32" && { executable: "node" }),
@@ -849,7 +858,7 @@ export class ClaudeAgentSdkProvider implements AIProvider {
849
858
  ...(hasMcp && { mcpServers }),
850
859
  permissionMode,
851
860
  allowDangerouslySkipPermissions: isBypass,
852
- ...((opts?.model ?? providerConfig.model) && { model: opts?.model ?? providerConfig.model }),
861
+ ...(resolvedModel && { model: resolvedModel }),
853
862
  ...(providerConfig.effort && { effort: providerConfig.effort }),
854
863
  maxTurns: providerConfig.max_turns ?? 1000,
855
864
  ...(providerConfig.max_budget_usd && { maxBudgetUsd: providerConfig.max_budget_usd }),
package/test-tool.mjs CHANGED
@@ -1,5 +1,10 @@
1
1
  import { tmpdir } from "node:os";
2
2
  import { ClaudeAgentSdkProvider } from "./src/providers/claude-agent-sdk.ts";
3
+ import { configService } from "./src/services/config.service.ts";
4
+
5
+ // Load real config from SQLite (provider reads model/context_1m from here).
6
+ // Without this, configService falls back to DEFAULT_CONFIG (sonnet-4-6, no 1M).
7
+ configService.load();
3
8
 
4
9
  // Remove CLAUDECODE to avoid nested session error
5
10
  delete process.env.CLAUDECODE;