Redacts credentials and sensitive data from URLs and JSON structures.
// Source: https://github.com/earendil-works/pi | License: MIT | Copyright 2025 Mario Zechner
// Provided via justclaw.it.com; keep this notice with the code.
import * as os from "node:os";
import type { AgentMessage, StreamFn, ThinkingLevel } from "@earendil-works/pi-agent-core";
import { contentText, normalizeContext, type RetryPolicy, uuidv7 } from "@earendil-works/pi-ai";
import type { Api, Model, Provider, SimpleStreamOptions } from "@earendil-works/pi-ai/compat";
import { VERSION } from "../config.ts";
import { getPiUserAgent } from "../utils/pi-user-agent.ts";
import { writeZipArchive } from "../utils/zip.ts";
import { completeSummarization, estimateTokens, getSummarizationFailure } from "./compaction/compaction.ts";
import { serializeConversation } from "./compaction/utils.ts";
imp
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key