Skip to content

Commit 06fe78e

Browse files
committed
refactor: trim pi helper exports
1 parent 1e4f511 commit 06fe78e

4 files changed

Lines changed: 6 additions & 8 deletions

File tree

src/agents/pi-auth-credentials.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { normalizeOptionalString } from "../shared/string-coerce.js";
22
import type { AuthProfileCredential, AuthProfileStore } from "./auth-profiles.js";
33
import { normalizeProviderId } from "./provider-id.js";
44

5-
export type PiApiKeyCredential = { type: "api_key"; key: string };
6-
export type PiOAuthCredential = {
5+
type PiApiKeyCredential = { type: "api_key"; key: string };
6+
type PiOAuthCredential = {
77
type: "oauth";
88
access: string;
99
refresh: string;
@@ -13,7 +13,7 @@ export type PiOAuthCredential = {
1313
export type PiCredential = PiApiKeyCredential | PiOAuthCredential;
1414
export type PiCredentialMap = Record<string, PiCredential>;
1515

16-
export function convertAuthProfileCredentialToPi(cred: AuthProfileCredential): PiCredential | null {
16+
function convertAuthProfileCredentialToPi(cred: AuthProfileCredential): PiCredential | null {
1717
if (cred.type === "api_key") {
1818
const key = normalizeOptionalString(cred.key) ?? "";
1919
if (!key) {

src/agents/pi-bundle-mcp-names.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function sanitizeServerName(raw: string, usedNames: Set<string>): string
3030
return candidate;
3131
}
3232

33-
export function sanitizeToolName(raw: string): string {
33+
function sanitizeToolName(raw: string): string {
3434
return sanitizeToolFragment(raw, "tool");
3535
}
3636

src/agents/pi-embedded-subscribe.tools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ export function filterToolResultMediaUrls(
325325
* returns base64 image data but no file path; those need a different delivery
326326
* path like saving to a temp file).
327327
*/
328-
export type ToolResultMediaArtifact = {
328+
type ToolResultMediaArtifact = {
329329
mediaUrls: string[];
330330
audioAsVoice?: boolean;
331331
trustedLocalMedia?: boolean;

src/agents/pi-settings.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,7 @@ export function applyPiCompactionSettingsFromConfig(params: {
123123
}
124124

125125
/** Decide whether Pi's internal auto-compaction should be disabled for this run. */
126-
export function shouldDisablePiAutoCompaction(params: {
127-
contextEngineInfo?: ContextEngineInfo;
128-
}): boolean {
126+
function shouldDisablePiAutoCompaction(params: { contextEngineInfo?: ContextEngineInfo }): boolean {
129127
return params.contextEngineInfo?.ownsCompaction === true;
130128
}
131129

0 commit comments

Comments
 (0)