@ccpocket/bridge 1.79.0 → 1.80.1

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/README.md CHANGED
@@ -214,7 +214,7 @@ make the Bedrock configuration reachable from the service environment:
214
214
  Register the Bridge as a user-level background service:
215
215
 
216
216
  ```bash
217
- npx @ccpocket/bridge@latest setup
217
+ npx @ccpocket/bridge@1 setup
218
218
  ```
219
219
 
220
220
  Setup supports macOS launchd and Linux systemd. It persists the Bridge settings
@@ -237,13 +237,13 @@ Example:
237
237
  ```bash
238
238
  BRIDGE_ALLOWED_DIRS="$HOME,/scratch/$USER" \
239
239
  BRIDGE_API_KEY=my-secret \
240
- npx @ccpocket/bridge@latest setup
240
+ npx @ccpocket/bridge@1 setup
241
241
  ```
242
242
 
243
243
  To persist the explicit subscription-authentication opt-in:
244
244
 
245
245
  ```bash
246
- BRIDGE_ALLOW_CLAUDE_OAUTH=1 npx @ccpocket/bridge@latest setup
246
+ BRIDGE_ALLOW_CLAUDE_OAUTH=1 npx @ccpocket/bridge@1 setup
247
247
  ```
248
248
 
249
249
  Custom gateway users can persist assist overrides in the same way:
@@ -251,7 +251,7 @@ Custom gateway users can persist assist overrides in the same way:
251
251
  ```bash
252
252
  BRIDGE_CODEX_ASSIST_MODEL=gpt-oss:20b-cloud \
253
253
  BRIDGE_CODEX_ASSIST_REASONING_EFFORT=none \
254
- npx @ccpocket/bridge@latest setup
254
+ npx @ccpocket/bridge@1 setup
255
255
  ```
256
256
 
257
257
  On Linux, setup gives standalone Codex installs priority by including
@@ -6,6 +6,7 @@ import { dirname, join } from "node:path";
6
6
  import { rm, writeFile } from "node:fs/promises";
7
7
  import { createCodexTransport, buildCodexSpawnSpec, } from "./codex-transport.js";
8
8
  import { codexCliJoinTarget } from "./codex-app-server-config.js";
9
+ import { normalizeCodexServiceTierForClient, normalizeCodexServiceTierForRpc, } from "./codex-service-tier.js";
9
10
  import { resolvePlatformPath } from "./path-utils.js";
10
11
  export { buildCodexSpawnSpec };
11
12
  const DEFAULT_CODEX_MODEL = "gpt-5.5";
@@ -186,7 +187,7 @@ export class CodexProcess extends EventEmitter {
186
187
  }
187
188
  /** Update Codex speed for the next turn without restarting the thread. */
188
189
  setServiceTier(serviceTier) {
189
- this._runtimeServiceTier = normalizeServiceTier(serviceTier);
190
+ this._runtimeServiceTier = normalizeCodexServiceTierForRpc(serviceTier);
190
191
  console.log(`[codex-process] Speed changed to: ${this.serviceTier}`);
191
192
  }
192
193
  /**
@@ -453,7 +454,7 @@ export class CodexProcess extends EventEmitter {
453
454
  this._runtimeServiceTier =
454
455
  options?.serviceTier === undefined
455
456
  ? undefined
456
- : normalizeServiceTier(options.serviceTier);
457
+ : normalizeCodexServiceTierForRpc(options.serviceTier);
457
458
  this._approvalPolicy = options?.approvalPolicy;
458
459
  this._approvalsReviewer =
459
460
  options?.approvalsReviewer === undefined
@@ -996,7 +997,7 @@ export class CodexProcess extends EventEmitter {
996
997
  if (requestedModel)
997
998
  threadParams.model = requestedModel;
998
999
  if (options?.serviceTier !== undefined) {
999
- threadParams.serviceTier = normalizeServiceTier(options.serviceTier);
1000
+ threadParams.serviceTier = normalizeCodexServiceTierForRpc(options.serviceTier);
1000
1001
  }
1001
1002
  if (requestedReasoningEffort) {
1002
1003
  // app-server applies reasoning effort on thread start via config overrides,
@@ -1094,7 +1095,7 @@ export class CodexProcess extends EventEmitter {
1094
1095
  : requestedReasoningEffort
1095
1096
  ? { modelReasoningEffort: requestedReasoningEffort }
1096
1097
  : {}),
1097
- serviceTier: normalizeServiceTierForClient(resolvedSettings.serviceTier ?? options?.serviceTier),
1098
+ serviceTier: normalizeCodexServiceTierForClient(resolvedSettings.serviceTier ?? options?.serviceTier),
1098
1099
  ...(resolvedSettings.networkAccessEnabled !== undefined
1099
1100
  ? { networkAccessEnabled: resolvedSettings.networkAccessEnabled }
1100
1101
  : {}),
@@ -2893,18 +2894,6 @@ function extractServiceTiers(raw) {
2893
2894
  }
2894
2895
  return tiers;
2895
2896
  }
2896
- function normalizeServiceTier(value) {
2897
- const normalized = value.trim();
2898
- return !normalized || normalized === "standard" || normalized === "default"
2899
- ? null
2900
- : normalized;
2901
- }
2902
- function normalizeServiceTierForClient(value) {
2903
- if (typeof value !== "string")
2904
- return "standard";
2905
- const normalized = value.trim();
2906
- return !normalized || normalized === "default" ? "standard" : normalized;
2907
- }
2908
2897
  function sanitizeCodexModel(value) {
2909
2898
  if (typeof value !== "string")
2910
2899
  return undefined;