Repository Analysis

earendil-works/pi

AI agent toolkit: coding agent CLI, unified LLM API, TUI & web UI libraries, Slack bot, vLLM pods

1.4 Likely human-written View on GitHub
1.4
Adjusted Score
1.4
Raw Score
100%
Time Factor
2026-05-30
Last Push
57,748
Stars
TypeScript
Language
225,820
Lines of Code
751
Files
276
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 1MEDIUM 0LOW 275

Pattern Findings

276 matches across 6 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers227 hits · 232 pts
SeverityFileLineSnippet
LOW…s/coding-agent/test/sdk-codex-cache-probe-tool-loop.ts173function createMinimalResourceLoader(systemPrompt: string): ResourceLoader {
LOW…s/coding-agent/test/sdk-codex-cache-probe-tool-loop.ts198function getWebSocketStatsSnapshot(sessionId: string): WebSocketStatsSnapshot {
LOWpackages/coding-agent/test/utilities.ts184export async function createTestExtensionsResult(
LOW…ages/coding-agent/test/interactive-mode-status.test.ts225 function createShowLoadedResourcesThis(options: {
LOW…coding-agent/test/session-selector-path-delete.test.ts52function createSymlinkedSessionPaths(): {
LOWpackages/coding-agent/test/test-harness.ts364function createHarnessWithResourceLoader(
LOWpackages/coding-agent/test/test-harness.ts441export async function createHarnessWithExtensions(options: HarnessOptions = {}): Promise<Harness> {
LOW…ages/coding-agent/test/bash-close-hang-windows.test.ts13function createInheritedStdioCommand(pidFile: string): string {
LOW…te/regressions/2781-skill-collision-precedence.test.ts55 function createSettingsWithPackage(pkgDir: string, scope: "user" | "project"): void {
LOW…sions/4167-thinking-toggle-pending-tool-render.test.ts56function createFakeInteractiveModeThis(): RenderSessionContextThis {
LOW…sions/4167-thinking-toggle-pending-tool-render.test.ts79function createAssistantToolCallMessage(): AssistantMessage {
LOW…agent/examples/extensions/github-issue-autocomplete.ts91function createIssueAutocompleteProvider(
LOW…xamples/extensions/custom-provider-gitlab-duo/index.ts210function invalidateDirectAccessToken() {
LOW…es/coding-agent/examples/extensions/subagent/agents.ts85function findNearestProjectAgentsDir(cwd: string): string | null {
LOWpackages/coding-agent/src/main.ts74function collectSettingsDiagnostics(
LOWpackages/coding-agent/src/main.ts148async function findLocalSessionByExactId(
LOWpackages/coding-agent/src/main.ts439async function promptForMissingSessionCwd(
LOWpackages/coding-agent/src/migrations.ts83function migrateLegacyEnvVarString(value: string): string | undefined {
LOWpackages/coding-agent/src/migrations.ts117function migrateAuthJsonConfigValues(agentDir: string): ConfigValueMigration[] {
LOWpackages/coding-agent/src/migrations.ts143function migrateModelsJsonConfigValues(agentDir: string): ConfigValueMigration[] {
LOWpackages/coding-agent/src/migrations.ts190function migrateExplicitEnvVarConfigValues(): void {
LOWpackages/coding-agent/src/migrations.ts215export function migrateSessionsFromAgentRoot(): void {
LOWpackages/coding-agent/src/migrations.ts288function migrateKeybindingsConfigFile(): void {
LOWpackages/coding-agent/src/migrations.ts353function checkDeprecatedExtensionDirs(baseDir: string, label: string): string[] {
LOWpackages/coding-agent/src/package-manager-cli.ts295function updateTargetIncludesExtensions(target: UpdateTarget): boolean {
LOWpackages/coding-agent/src/package-manager-cli.ts299function printSelfUpdateUnavailable(npmCommand?: string[], updatePackageName = PACKAGE_NAME): void {
LOWpackages/coding-agent/src/package-manager-cli.ts382function prepareWindowsNpmSelfUpdate(): void {
LOWpackages/coding-agent/src/config.ts53function makeSelfUpdateCommandStep(command: string, args: string[]): SelfUpdateCommandStep {
LOWpackages/coding-agent/src/config.ts103function getSelfUpdateCommandForMethod(
LOWpackages/coding-agent/src/config.ts228function normalizeExistingPathForComparison(path: string, resolveSymlinks: boolean): string | undefined {
LOWpackages/coding-agent/src/config.ts247function getPathComparisonCandidates(path: string): string[] {
LOWpackages/coding-agent/src/config.ts281function isManagedByGlobalPackageManager(method: InstallMethod, packageName: string, npmCommand?: string[]): boolean {
LOWpackages/coding-agent/src/config.ts305export function getSelfUpdateUnavailableInstruction(
LOWpackages/coding-agent/src/config.ts438export function getBundledInteractiveAssetPath(name: string): string {
LOWpackages/coding-agent/src/core/output-guard.ts95export async function waitForRawStdoutBackpressure(): Promise<void> {
LOWpackages/coding-agent/src/core/model-resolver.ts73export function findExactModelReferenceMatch(
LOWpackages/coding-agent/src/core/resolve-config-value.ts81function parseConfigValueReference(config: string): ConfigValueReference {
LOWpackages/coding-agent/src/core/resolve-config-value.ts122export function getConfigValueEnvVarNames(config: string): string[] {
LOWpackages/coding-agent/src/core/resolve-config-value.ts127export function getMissingConfigValueEnvVarNames(config: string): string[] {
LOWpackages/coding-agent/src/core/resolve-config-value.ts139export function isLegacyEnvVarNameConfigValue(config: string): boolean {
LOWpackages/coding-agent/src/core/resolve-config-value.ts158function executeWithConfiguredShell(command: string): { executed: boolean; value: string | undefined } {
LOWpackages/coding-agent/src/core/resolve-config-value.ts224export function resolveConfigValueUncached(config: string): string | undefined {
LOWpackages/coding-agent/src/core/resolve-config-value.ts232export function resolveConfigValueOrThrow(config: string, description: string): string {
LOWpackages/coding-agent/src/core/messages.ts100export function createBranchSummaryMessage(summary: string, fromId: string, timestamp: string): BranchSummaryMessage {
LOWpackages/coding-agent/src/core/messages.ts109export function createCompactionSummaryMessage(
LOWpackages/coding-agent/src/core/source-info.ts24export function createSyntheticSourceInfo(
LOWpackages/coding-agent/src/core/bash-executor.ts50export async function executeBashWithOperations(
LOWpackages/coding-agent/src/core/agent-session-runtime.ts393export async function createAgentSessionRuntime(
LOWpackages/coding-agent/src/core/session-cwd.ts14export function getMissingSessionCwdIssue(
LOWpackages/coding-agent/src/core/session-cwd.ts35export function formatMissingSessionCwdError(issue: SessionCwdIssue): string {
LOWpackages/coding-agent/src/core/session-cwd.ts40export function formatMissingSessionCwdPrompt(issue: SessionCwdIssue): string {
LOWpackages/coding-agent/src/core/telemetry.ts8export function isInstallTelemetryEnabled(
LOWpackages/coding-agent/src/core/session-manager.ts673async function buildSessionInfosWithConcurrency(
LOW…ckages/coding-agent/src/core/agent-session-services.ts131export async function createAgentSessionServices(
LOW…ckages/coding-agent/src/core/agent-session-services.ts181export async function createAgentSessionFromServices(
LOWpackages/coding-agent/src/core/skills.ts173function loadSkillsFromDirInternal(
LOWpackages/coding-agent/src/core/footer-data-provider.ts62function resolveBranchWithGitAsync(repoDir: string): Promise<string | null> {
LOWpackages/coding-agent/src/core/package-manager.ts422function collectAncestorAgentsSkillDirs(startDir: string): string[] {
LOWpackages/coding-agent/src/core/package-manager.ts557function collectAutoExtensionEntries(dir: string): string[] {
LOWpackages/coding-agent/src/core/model-registry.ts239function migrateLegacyRegisterProviderConfigValue(providerName: string, field: string, value: string): string {
167 more matches not shown…
Fake / Example Data28 hits · 40 pts
SeverityFileLineSnippet
LOWpackages/coding-agent/test/git-update.test.ts32 git(["config", "--local", "user.email", "test@test.com"], repoDir);
LOWpackages/coding-agent/test/git-update.test.ts106 git(["config", "--local", "user.email", "test@test.com"], installedDir);
LOWpackages/coding-agent/test/git-update.test.ts295 git(["config", "--local", "user.email", "test@test.com"], installedDir);
LOWpackages/tui/test/markdown.test.ts1209 assert.ok(joinedPlain.includes("user@example.com"), "Should contain email");
LOWpackages/tui/test/editor.test.ts962 const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30);
LOWpackages/tui/test/editor.test.ts962 const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30);
LOWpackages/tui/test/editor.test.ts965 assert.strictEqual(chunks[0]!.text, "Lorem ipsum dolor sit ");
LOWpackages/tui/test/editor.test.ts970 const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30);
LOWpackages/tui/test/editor.test.ts970 const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30);
LOWpackages/tui/test/editor.test.ts973 assert.strictEqual(chunks[0]!.text, "Lorem ipsum dolor sit ");
LOWpackages/tui/test/editor.test.ts978 const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30);
LOWpackages/tui/test/editor.test.ts978 const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30);
LOWpackages/tui/test/editor.test.ts981 assert.strictEqual(chunks[0]!.text, "Lorem ipsum dolor sit ");
LOWpackages/tui/test/editor.test.ts987 const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30);
LOWpackages/tui/test/editor.test.ts987 const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30);
LOWpackages/tui/test/editor.test.ts990 assert.strictEqual(chunks[0]!.text, "Lorem ipsum dolor sit ");
LOWpackages/tui/test/editor.test.ts996 const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30);
LOWpackages/tui/test/editor.test.ts996 const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30);
LOWpackages/tui/test/editor.test.ts999 assert.strictEqual(chunks[0]!.text, "Lorem ipsum dolor sit ");
LOWpackages/tui/test/editor.test.ts1005 const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30);
LOWpackages/tui/test/editor.test.ts1005 const chunks = wordWrapLine("Lorem ipsum dolor sit amet, consectetur", 30);
LOWpackages/tui/test/editor.test.ts1008 assert.strictEqual(chunks[0]!.text, "Lorem ipsum dolor sit ");
LOWpackages/tui/src/components/markdown.ts515 // For mailto: links strip the prefix (autolinked emails use text="foo@bar.com"
LOWpackages/ai/test/total-tokens.test.ts42 "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna a
LOWpackages/ai/test/total-tokens.test.ts42 "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna a
LOWpackages/ai/test/context-overflow.test.ts29// Lorem ipsum paragraph for realistic token estimation
LOWpackages/ai/test/context-overflow.test.ts30const LOREM_IPSUM = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore
LOWpackages/ai/test/context-overflow.test.ts30const LOREM_IPSUM = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore
Verbosity Indicators13 hits · 25 pts
SeverityFileLineSnippet
LOWpackages/coding-agent/src/core/package-manager.ts727 // Step 1: Apply includes (or all if no includes)
LOWpackages/coding-agent/src/core/package-manager.ts735 // Step 2: Apply excludes
LOWpackages/coding-agent/src/core/package-manager.ts740 // Step 3: Force-include (add back from allPaths, overriding exclusions)
LOWpackages/coding-agent/src/core/package-manager.ts749 // Step 4: Force-exclude (remove even if included or force-included)
LOWpackages/ai/test/tool-call-without-result.test.ts34 // Step 1: Create context with the calculate tool
LOWpackages/ai/test/tool-call-without-result.test.ts41 // Step 2: Ask the LLM to make a tool call
LOWpackages/ai/test/tool-call-without-result.test.ts48 // Step 3: Get the assistant's response (should contain a tool call)
LOWpackages/ai/test/tool-call-without-result.test.ts62 // Step 4: Send a user message WITHOUT providing tool result
LOWpackages/ai/test/tool-call-without-result.test.ts70 // Step 5: The fix should filter out the orphaned tool call, and the request should succeed
LOWpackages/ai/test/tool-call-id-normalization.test.ts52 // Step 1: Generate tool call with github-copilot
LOWpackages/ai/test/tool-call-id-normalization.test.ts91 // Step 2: Complete with openrouter (uses openai-completions API)
LOWpackages/ai/test/tool-call-id-normalization.test.ts122 // Step 1: Generate tool call with github-copilot
LOWpackages/ai/test/tool-call-id-normalization.test.ts154 // Step 2: Complete with openai-codex (uses openai-codex-responses API)
Over-Commented Block6 hits · 6 pts
SeverityFileLineSnippet
LOWscripts/build-binaries.sh1#!/usr/bin/env bash
LOWpackages/coding-agent/test/path-utils.test.ts81 // é = e + combining acute accent (U+0301)
LOWpackages/coding-agent/test/tree-selector.test.ts361 // user-2
LOWpackages/coding-agent/docs/compaction.md281 // preparation.messagesToSummarize - messages to summarize
LOWpackages/coding-agent/docs/extensions.md461});
LOWpackages/coding-agent/examples/sdk/11-sessions.ts41 });
Magic Placeholder Names1 hit · 5 pts
SeverityFileLineSnippet
HIGHpackages/ai/README.md1082 apiKey: 'your-api-key'
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOWscripts/build-binaries.sh6# Usage: