Rename @sf-run/* → @singularity-forge/* package scope

- All 373 source files updated
- Package.json scopes in all workspace packages
- Loader workspace symlink dir updated
- RpcClient import unified from pi-coding-agent (fixes type mismatch)
- Scripts, configs, flake.nix updated
- Workspace symlinks rebuilt
This commit is contained in:
ace-pm 2026-04-15 22:56:33 +02:00
parent e07204c782
commit f92ee8d64c
No known key found for this signature in database
388 changed files with 670 additions and 671 deletions

View file

@ -39,7 +39,7 @@
echo " rustc: $(command -v rustc)"
echo ""
echo "Build native addon:"
echo " bun run --filter @sf-run/native build:native"
echo " bun run --filter @singularity-forge/native build:native"
'';
};
});

View file

@ -41,11 +41,11 @@
},
"packageManager": "npm@10.9.3",
"scripts": {
"build:pi-tui": "bun run --filter @sf-run/pi-tui build",
"build:pi-ai": "bun run --filter @sf-run/pi-ai build",
"build:pi-agent-core": "bun run --filter @sf-run/pi-agent-core build",
"build:pi-coding-agent": "bun run --filter @sf-run/pi-coding-agent build",
"build:native-pkg": "bun run --filter @sf-run/native build",
"build:pi-tui": "bun run --filter @singularity-forge/pi-tui build",
"build:pi-ai": "bun run --filter @singularity-forge/pi-ai build",
"build:pi-agent-core": "bun run --filter @singularity-forge/pi-agent-core build",
"build:pi-coding-agent": "bun run --filter @singularity-forge/pi-coding-agent build",
"build:native-pkg": "bun run --filter @singularity-forge/native build",
"build:rpc-client": "bun run --filter @singularity-forge/rpc-client build",
"build:pi": "npm run build:native-pkg && npm run build:pi-tui && npm run build:pi-ai && npm run build:pi-agent-core && npm run build:pi-coding-agent",
"build:mcp-server": "bun run --filter @singularity-forge/mcp-server build",

View file

@ -1,5 +1,5 @@
{
"name": "@sf-run/native",
"name": "@singularity-forge/native",
"version": "2.74.0",
"description": "Native Rust bindings for sf-run — high-performance native modules via N-API",
"type": "commonjs",

View file

@ -35,7 +35,7 @@ for (const candidate of candidates) {
if (!native) {
console.error(
"Native addon not found. Run `npm run build:native -w @sf-run/native` first.",
"Native addon not found. Run `npm run build:native -w @singularity-forge/native` first.",
);
process.exit(1);
}

View file

@ -28,7 +28,7 @@ for (const candidate of candidates) {
}
if (!native) {
console.error("Native addon not found. Run `npm run build:native -w @sf-run/native` first.");
console.error("Native addon not found. Run `npm run build:native -w @singularity-forge/native` first.");
process.exit(1);
}

View file

@ -37,7 +37,7 @@ for (const candidate of candidates) {
if (!native) {
console.error(
"Native addon not found. Run `npm run build:native -w @sf-run/native` first.",
"Native addon not found. Run `npm run build:native -w @singularity-forge/native` first.",
);
process.exit(1);
}

View file

@ -28,7 +28,7 @@ for (const candidate of candidates) {
}
if (!native) {
console.error("Native addon not found. Run `npm run build:native -w @sf-run/native` first.");
console.error("Native addon not found. Run `npm run build:native -w @singularity-forge/native` first.");
process.exit(1);
}

View file

@ -26,7 +26,7 @@ for (const candidate of candidates) {
}
if (!native) {
console.error("Native addon not found. Run `npm run build:native -w @sf-run/native` first.");
console.error("Native addon not found. Run `npm run build:native -w @singularity-forge/native` first.");
process.exit(1);
}

View file

@ -25,7 +25,7 @@ for (const candidate of candidates) {
}
if (!native) {
console.error("Native addon not found. Run `npm run build:native -w @sf-run/native` first.");
console.error("Native addon not found. Run `npm run build:native -w @singularity-forge/native` first.");
process.exit(1);
}

View file

@ -26,7 +26,7 @@ for (const candidate of candidates) {
}
if (!native) {
console.error("Native addon not found. Run 'npm run build:native -w @sf-run/native' first.");
console.error("Native addon not found. Run 'npm run build:native -w @singularity-forge/native' first.");
process.exit(1);
}

View file

@ -25,7 +25,7 @@ for (const candidate of candidates) {
}
if (!native) {
console.error("Native addon not found. Run `npm run build:native -w @sf-run/native` first.");
console.error("Native addon not found. Run `npm run build:native -w @singularity-forge/native` first.");
process.exit(1);
}

View file

@ -1,5 +1,5 @@
/**
* Tests that the @sf-run/native package.json is correctly configured
* Tests that the @singularity-forge/native package.json is correctly configured
* for Node.js module resolution (ESM/CJS compatibility).
*
* Regression test for #2861: "type": "module" + "import"-only export
@ -17,7 +17,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
const pkgPath = path.resolve(__dirname, "..", "..", "package.json");
const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
describe("@sf-run/native module compatibility (#2861)", () => {
describe("@singularity-forge/native module compatibility (#2861)", () => {
test("package.json must not declare type: module (compiled output is CJS-compatible)", () => {
// The compiled output uses createRequire() to load .node addons.
// Declaring "type": "module" forces Node.js to treat .js files as ESM,

View file

@ -27,7 +27,7 @@ for (const candidate of candidates) {
}
if (!native) {
console.error("Native addon not found. Run `npm run build:native -w @sf-run/native` first.");
console.error("Native addon not found. Run `npm run build:native -w @singularity-forge/native` first.");
process.exit(1);
}

View file

@ -35,7 +35,7 @@ for (const candidate of candidates) {
if (!native) {
console.error(
"Native addon not found. Run `npm run build:native -w @sf-run/native` first.",
"Native addon not found. Run `npm run build:native -w @singularity-forge/native` first.",
);
process.exit(1);
}

View file

@ -26,7 +26,7 @@ for (const candidate of candidates) {
}
if (!native) {
console.error("Native addon not found. Run `npm run build:native -w @sf-run/native` first.");
console.error("Native addon not found. Run `npm run build:native -w @singularity-forge/native` first.");
process.exit(1);
}

View file

@ -1,6 +1,6 @@
import { describe, it } from "node:test";
import assert from "node:assert/strict";
import { xxHash32, xxHash32Fallback } from "@sf-run/native/xxhash";
import { xxHash32, xxHash32Fallback } from "@singularity-forge/native/xxhash";
/**
* Reference values computed from the pure-JS xxHash32 implementation

View file

@ -1,5 +1,5 @@
/**
* @sf-run/native High-performance Rust modules exposed via N-API.
* @singularity-forge/native High-performance Rust modules exposed via N-API.
*
* Modules:
* - clipboard: native clipboard access (text + image)

View file

@ -1,5 +1,5 @@
{
"name": "@sf-run/pi-agent-core",
"name": "@singularity-forge/pi-agent-core",
"version": "2.74.0",
"description": "General-purpose agent core (vendored from pi-mono)",
"type": "module",

View file

@ -9,8 +9,8 @@ import { fileURLToPath } from "node:url";
import { Type } from "@sinclair/typebox";
import { agentLoop, MAX_CONSECUTIVE_VALIDATION_FAILURES } from "./agent-loop.js";
import type { AgentContext, AgentLoopConfig, AgentTool, AgentEvent, AgentMessage } from "./types.js";
import { AssistantMessageEventStream, EventStream } from "@sf-run/pi-ai";
import type { AssistantMessage, AssistantMessageEvent, Model } from "@sf-run/pi-ai";
import { AssistantMessageEventStream, EventStream } from "@singularity-forge/pi-ai";
import type { AssistantMessage, AssistantMessageEvent, Model } from "@singularity-forge/pi-ai";
const __dirname = dirname(fileURLToPath(import.meta.url));

View file

@ -10,7 +10,7 @@ import {
streamSimple,
type ToolResultMessage,
validateToolArguments,
} from "@sf-run/pi-ai";
} from "@singularity-forge/pi-ai";
import type {
AgentContext,
AgentEvent,

View file

@ -9,7 +9,7 @@ import { readFileSync } from "node:fs";
import { join, dirname } from "node:path";
import { fileURLToPath } from "node:url";
import { Agent } from "./agent.ts";
import { getModel, type AssistantMessageEventStream } from "@sf-run/pi-ai";
import { getModel, type AssistantMessageEventStream } from "@singularity-forge/pi-ai";
const __dirname = dirname(fileURLToPath(import.meta.url));

View file

@ -13,7 +13,7 @@ import {
type TextContent,
type ThinkingBudgets,
type Transport,
} from "@sf-run/pi-ai";
} from "@singularity-forge/pi-ai";
import { agentLoop, agentLoopContinue, ZERO_USAGE } from "./agent-loop.js";
import type {
AgentContext,

View file

@ -14,7 +14,7 @@ import {
type SimpleStreamOptions,
type StopReason,
type ToolCall,
} from "@sf-run/pi-ai";
} from "@singularity-forge/pi-ai";
import { ZERO_USAGE } from "./agent-loop.js";
// Create stream class matching ProxyMessageEventStream

View file

@ -9,7 +9,7 @@ import type {
TextContent,
Tool,
ToolResultMessage,
} from "@sf-run/pi-ai";
} from "@singularity-forge/pi-ai";
import type { Static, TSchema } from "@sinclair/typebox";
/** Stream function - can return sync or Promise for async config lookup */

View file

@ -1,5 +1,5 @@
{
"name": "@sf-run/pi-ai",
"name": "@singularity-forge/pi-ai",
"version": "2.74.0",
"description": "Unified LLM API (vendored from pi-mono)",
"type": "module",

View file

@ -64,7 +64,7 @@ async function main(): Promise<void> {
if (!command || command === "help" || command === "--help" || command === "-h") {
const providerList = PROVIDERS.map((p) => ` ${p.id.padEnd(20)} ${p.name}`).join("\n");
console.log(`Usage: npx @sf-run/pi-ai <command> [provider]
console.log(`Usage: npx @singularity-forge/pi-ai <command> [provider]
Commands:
login [provider] Login to an OAuth provider
@ -74,9 +74,9 @@ Providers:
${providerList}
Examples:
npx @sf-run/pi-ai login # interactive provider selection
npx @sf-run/pi-ai login anthropic # login to specific provider
npx @sf-run/pi-ai list # list providers
npx @singularity-forge/pi-ai login # interactive provider selection
npx @singularity-forge/pi-ai login anthropic # login to specific provider
npx @singularity-forge/pi-ai list # list providers
`);
return;
}
@ -113,7 +113,7 @@ Examples:
if (!PROVIDERS.some((p) => p.id === provider)) {
console.error(`Unknown provider: ${provider}`);
console.error(`Use 'npx @sf-run/pi-ai list' to see available providers`);
console.error(`Use 'npx @singularity-forge/pi-ai list' to see available providers`);
process.exit(1);
}
@ -123,7 +123,7 @@ Examples:
}
console.error(`Unknown command: ${command}`);
console.error(`Use 'npx @sf-run/pi-ai --help' for usage`);
console.error(`Use 'npx @singularity-forge/pi-ai --help' for usage`);
process.exit(1);
}

View file

@ -1,4 +1,4 @@
import { parseStreamingJson as nativeParseStreamingJson } from "@sf-run/native";
import { parseStreamingJson as nativeParseStreamingJson } from "@singularity-forge/native";
import { hasXmlParameterTags, hasYamlBulletLists, repairToolJson } from "./repair-tool-json.js";
/**

View file

@ -1,5 +1,5 @@
{
"name": "@sf-run/pi-coding-agent",
"name": "@singularity-forge/pi-coding-agent",
"version": "2.74.0",
"description": "Coding agent CLI (vendored from pi-mono)",
"type": "module",

View file

@ -7,8 +7,8 @@
*/
process.title = "pi";
import { setBedrockProviderModule } from "@sf-run/pi-ai";
import { bedrockProviderModule } from "@sf-run/pi-ai/bedrock-provider";
import { setBedrockProviderModule } from "@singularity-forge/pi-ai";
import { bedrockProviderModule } from "@singularity-forge/pi-ai/bedrock-provider";
import { EnvHttpProxyAgent, setGlobalDispatcher } from "undici";
import { main } from "./main.js";

View file

@ -2,7 +2,7 @@
* CLI argument parsing and help display
*/
import type { ThinkingLevel } from "@sf-run/pi-agent-core";
import type { ThinkingLevel } from "@singularity-forge/pi-agent-core";
import chalk from "chalk";
import { APP_NAME, CONFIG_DIR_NAME, ENV_AGENT_DIR } from "../config.js";
import { allTools, type ToolName } from "../core/tools/index.js";

View file

@ -2,7 +2,7 @@
* TUI config selector for `pi config` command
*/
import { ProcessTerminal, TUI } from "@sf-run/pi-tui";
import { ProcessTerminal, TUI } from "@singularity-forge/pi-tui";
import type { ResolvedPaths } from "../core/package-manager.js";
import type { SettingsManager } from "../core/settings-manager.js";
import { ConfigSelectorComponent } from "../modes/interactive/components/config-selector.js";

View file

@ -3,7 +3,7 @@
*/
import { access, readFile, stat } from "node:fs/promises";
import type { ImageContent } from "@sf-run/pi-ai";
import type { ImageContent } from "@singularity-forge/pi-ai";
import chalk from "chalk";
import { resolve } from "path";
import { resolveReadPath } from "../core/tools/path-utils.js";

View file

@ -2,8 +2,8 @@
* List available models with optional fuzzy search and discovery support
*/
import type { Api, Model } from "@sf-run/pi-ai";
import { fuzzyFilter } from "@sf-run/pi-tui";
import type { Api, Model } from "@singularity-forge/pi-ai";
import { fuzzyFilter } from "@singularity-forge/pi-tui";
import type { ModelRegistry } from "../core/model-registry.js";
export interface ListModelsOptions {

View file

@ -2,7 +2,7 @@
* TUI session selector for --resume flag
*/
import { ProcessTerminal, TUI } from "@sf-run/pi-tui";
import { ProcessTerminal, TUI } from "@singularity-forge/pi-tui";
import { KeybindingsManager } from "../core/keybindings.js";
import type { SessionInfo, SessionListProgress } from "../core/session-manager.js";
import { SessionSelectorComponent } from "../modes/interactive/components/session-selector.js";

View file

@ -4,7 +4,7 @@ import { tmpdir } from "node:os";
import { join } from "node:path";
import { afterEach, beforeEach, describe, it } from "node:test";
import { Agent } from "@sf-run/pi-agent-core";
import { Agent } from "@singularity-forge/pi-agent-core";
import { Type } from "@sinclair/typebox";
import type { ToolDefinition } from "./extensions/types.js";
import { AgentSession } from "./agent-session.js";

View file

@ -22,9 +22,9 @@ import type {
AgentState,
AgentTool,
ThinkingLevel,
} from "@sf-run/pi-agent-core";
import type { AssistantMessage, ImageContent, Message, Model, TextContent } from "@sf-run/pi-ai";
import { modelsAreEqual, resetApiProviders, supportsXhigh } from "@sf-run/pi-ai";
} from "@singularity-forge/pi-agent-core";
import type { AssistantMessage, ImageContent, Message, Model, TextContent } from "@singularity-forge/pi-ai";
import { modelsAreEqual, resetApiProviders, supportsXhigh } from "@singularity-forge/pi-ai";
import { Type } from "@sinclair/typebox";
import { getDocsPath } from "../config.js";
import { getErrorMessage } from "../utils/error.js";
@ -305,7 +305,7 @@ export class AgentSession {
// Whether model changes should write defaultProvider/defaultModel to settings.json.
// Defaults to false — callers must explicitly opt into persistence. This is the
// safe default for SDK consumers: a third party building on @sf-run/pi-coding-agent
// safe default for SDK consumers: a third party building on @singularity-forge/pi-coding-agent
// should not silently mutate the user's global settings just by switching models.
// Interactive CLI entry points (sf wrapper's interactive branch and pi main's
// isInteractive branch) explicitly set this to true so user model picks still

View file

@ -14,8 +14,8 @@ import {
type OAuthCredentials,
type OAuthLoginCallbacks,
type OAuthProviderId,
} from "@sf-run/pi-ai";
import { getOAuthApiKey, getOAuthProvider, getOAuthProviders } from "@sf-run/pi-ai/oauth";
} from "@singularity-forge/pi-ai";
import { getOAuthApiKey, getOAuthProvider, getOAuthProviders } from "@singularity-forge/pi-ai/oauth";
import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
import { dirname, join } from "path";
import { getAgentDir } from "../config.js";

View file

@ -29,7 +29,7 @@ function registerTempCleanup(): void {
}
});
}
import { processStreamChunk, type StreamState } from "@sf-run/native";
import { processStreamChunk, type StreamState } from "@singularity-forge/native";
import { getShellConfig, getShellEnv, killProcessTree, sanitizeCommand } from "../utils/shell.js";
import type { BashOperations } from "./tools/bash.js";
import { DEFAULT_MAX_BYTES, truncateTail } from "./tools/truncate.js";

View file

@ -97,7 +97,7 @@ function createHost() {
test("chat-controller renders content blocks in content[] index order (tool-first stream)", async () => {
// ToolExecutionComponent uses the global theme singleton.
// Install a minimal no-op theme implementation for this unit test.
(globalThis as any)[Symbol.for("@sf-run/pi-coding-agent:theme")] = {
(globalThis as any)[Symbol.for("@singularity-forge/pi-coding-agent:theme")] = {
fg: (_key: string, text: string) => text,
bg: (_key: string, text: string) => text,
bold: (text: string) => text,
@ -166,7 +166,7 @@ test("chat-controller renders content blocks in content[] index order (tool-firs
});
test("chat-controller renders serverToolUse before trailing text matching content[] index order", async () => {
(globalThis as any)[Symbol.for("@sf-run/pi-coding-agent:theme")] = {
(globalThis as any)[Symbol.for("@singularity-forge/pi-coding-agent:theme")] = {
fg: (_key: string, text: string) => text,
bg: (_key: string, text: string) => text,
bold: (text: string) => text,
@ -235,7 +235,7 @@ test("chat-controller renders serverToolUse before trailing text matching conten
});
test("chat-controller keeps pre-tool prose visible until post-tool prose arrives, then prunes it", async () => {
(globalThis as any)[Symbol.for("@sf-run/pi-coding-agent:theme")] = {
(globalThis as any)[Symbol.for("@singularity-forge/pi-coding-agent:theme")] = {
fg: (_key: string, text: string) => text,
bg: (_key: string, text: string) => text,
bold: (text: string) => text,
@ -326,7 +326,7 @@ test("chat-controller keeps pre-tool prose visible until post-tool prose arrives
});
test("chat-controller keeps pre-tool thinking visible for claude-code MCP turns without post-tool prose", async () => {
(globalThis as any)[Symbol.for("@sf-run/pi-coding-agent:theme")] = {
(globalThis as any)[Symbol.for("@singularity-forge/pi-coding-agent:theme")] = {
fg: (_key: string, text: string) => text,
bg: (_key: string, text: string) => text,
bold: (text: string) => text,
@ -393,7 +393,7 @@ test("chat-controller keeps pre-tool thinking visible for claude-code MCP turns
});
test("chat-controller prunes orphaned provisional text after claude-code sub-turn shrink when MCP tools appear", async () => {
(globalThis as any)[Symbol.for("@sf-run/pi-coding-agent:theme")] = {
(globalThis as any)[Symbol.for("@singularity-forge/pi-coding-agent:theme")] = {
fg: (_key: string, text: string) => text,
bg: (_key: string, text: string) => text,
bold: (text: string) => text,
@ -494,7 +494,7 @@ test("chat-controller prunes orphaned provisional text after claude-code sub-tur
});
test("chat-controller pins latest assistant text above editor when tool calls are present", async () => {
(globalThis as any)[Symbol.for("@sf-run/pi-coding-agent:theme")] = {
(globalThis as any)[Symbol.for("@singularity-forge/pi-coding-agent:theme")] = {
fg: (_key: string, text: string) => text,
bg: (_key: string, text: string) => text,
bold: (text: string) => text,
@ -548,7 +548,7 @@ test("chat-controller pins latest assistant text above editor when tool calls ar
});
test("chat-controller clears pinned zone when a new assistant message starts", async () => {
(globalThis as any)[Symbol.for("@sf-run/pi-coding-agent:theme")] = {
(globalThis as any)[Symbol.for("@singularity-forge/pi-coding-agent:theme")] = {
fg: (_key: string, text: string) => text,
bg: (_key: string, text: string) => text,
bold: (text: string) => text,
@ -598,7 +598,7 @@ test("chat-controller clears pinned zone when a new assistant message starts", a
});
test("chat-controller clears pinned zone when the agent turn ends", async () => {
(globalThis as any)[Symbol.for("@sf-run/pi-coding-agent:theme")] = {
(globalThis as any)[Symbol.for("@singularity-forge/pi-coding-agent:theme")] = {
fg: (_key: string, text: string) => text,
bg: (_key: string, text: string) => text,
bold: (text: string) => text,
@ -646,7 +646,7 @@ test("chat-controller clears pinned zone when the agent turn ends", async () =>
});
test("chat-controller clears pinned zone when assistant message ends", async () => {
(globalThis as any)[Symbol.for("@sf-run/pi-coding-agent:theme")] = {
(globalThis as any)[Symbol.for("@singularity-forge/pi-coding-agent:theme")] = {
fg: (_key: string, text: string) => text,
bg: (_key: string, text: string) => text,
bold: (text: string) => text,
@ -696,7 +696,7 @@ test("chat-controller clears pinned zone when assistant message ends", async ()
});
test("chat-controller does not pin when there are no tool calls", async () => {
(globalThis as any)[Symbol.for("@sf-run/pi-coding-agent:theme")] = {
(globalThis as any)[Symbol.for("@singularity-forge/pi-coding-agent:theme")] = {
fg: (_key: string, text: string) => text,
bg: (_key: string, text: string) => text,
bold: (text: string) => text,
@ -731,7 +731,7 @@ test("chat-controller does not pin when there are no tool calls", async () => {
// Expected chatContainer order: textRun(A), toolExec(T1), textRun(B), toolExec(T2), textRun(C)
// Each AssistantMessageComponent must render ONLY its own text — no duplication after message_end.
test("chat-controller renders interleaved text and tool blocks in content[] index order (#4144)", async () => {
(globalThis as any)[Symbol.for("@sf-run/pi-coding-agent:theme")] = {
(globalThis as any)[Symbol.for("@singularity-forge/pi-coding-agent:theme")] = {
fg: (_key: string, text: string) => text,
bg: (_key: string, text: string) => text,
bold: (text: string) => text,
@ -844,7 +844,7 @@ test("chat-controller renders interleaved text and tool blocks in content[] inde
});
test("chat-controller does not duplicate text when content is [text, tool, text] (interleaved stream)", async () => {
(globalThis as any)[Symbol.for("@sf-run/pi-coding-agent:theme")] = {
(globalThis as any)[Symbol.for("@singularity-forge/pi-coding-agent:theme")] = {
fg: (_key: string, text: string) => text,
bg: (_key: string, text: string) => text,
bold: (text: string) => text,
@ -924,7 +924,7 @@ test("chat-controller does not duplicate text when content is [text, tool, text]
// sub-turn children must stay frozen; new sub-turn segments must append after
// them, and the pinned "Latest Output" mirror must re-evaluate for the new sub-turn.
test("chat-controller freezes prior sub-turn and appends new segments when content shrinks", async () => {
(globalThis as any)[Symbol.for("@sf-run/pi-coding-agent:theme")] = {
(globalThis as any)[Symbol.for("@singularity-forge/pi-coding-agent:theme")] = {
fg: (_key: string, text: string) => text,
bg: (_key: string, text: string) => text,
bold: (text: string) => text,
@ -1026,7 +1026,7 @@ test("chat-controller freezes prior sub-turn and appends new segments when conte
// pinned "Latest Output" mirror can display text from the new sub-turn instead
// of staying frozen on a stale snapshot (the "bottom green stays" symptom).
test("chat-controller updates pinned zone after sub-turn shrink", async () => {
(globalThis as any)[Symbol.for("@sf-run/pi-coding-agent:theme")] = {
(globalThis as any)[Symbol.for("@singularity-forge/pi-coding-agent:theme")] = {
fg: (_key: string, text: string) => text,
bg: (_key: string, text: string) => text,
bold: (text: string) => text,

View file

@ -9,9 +9,9 @@
* - Branch summarization abort coordination
*/
import type { Agent } from "@sf-run/pi-agent-core";
import type { AssistantMessage, Model } from "@sf-run/pi-ai";
import { isContextOverflow } from "@sf-run/pi-ai";
import type { Agent } from "@singularity-forge/pi-agent-core";
import type { AssistantMessage, Model } from "@singularity-forge/pi-ai";
import { isContextOverflow } from "@singularity-forge/pi-ai";
import {
type CompactionResult,
calculateContextTokens,

View file

@ -1,7 +1,7 @@
import assert from "node:assert/strict";
import test from "node:test";
import type { Message } from "@sf-run/pi-ai";
import type { Message } from "@singularity-forge/pi-ai";
import { serializeConversation } from "./compaction/index.js";

View file

@ -5,9 +5,9 @@
* a summary of the branch being left so context isn't lost.
*/
import type { AgentMessage } from "@sf-run/pi-agent-core";
import type { Model } from "@sf-run/pi-ai";
import { completeSimple } from "@sf-run/pi-ai";
import type { AgentMessage } from "@singularity-forge/pi-agent-core";
import type { Model } from "@singularity-forge/pi-ai";
import { completeSimple } from "@singularity-forge/pi-ai";
import { COMPACTION_RESERVE_TOKENS } from "../constants.js";
import { convertToLlm } from "../messages.js";
import type { ReadonlySessionManager, SessionEntry } from "../session-manager.js";

View file

@ -6,8 +6,8 @@
import assert from "node:assert/strict";
import { describe, it, mock } from "node:test";
import type { AgentMessage } from "@sf-run/pi-agent-core";
import type { Model, AssistantMessage } from "@sf-run/pi-ai";
import type { AgentMessage } from "@singularity-forge/pi-agent-core";
import type { Model, AssistantMessage } from "@singularity-forge/pi-ai";
import { generateSummary, estimateTokens, chunkMessages } from "./compaction.js";

View file

@ -5,9 +5,9 @@
* and after compaction the session is reloaded.
*/
import type { AgentMessage } from "@sf-run/pi-agent-core";
import type { AssistantMessage, Model, Usage } from "@sf-run/pi-ai";
import { completeSimple } from "@sf-run/pi-ai";
import type { AgentMessage } from "@singularity-forge/pi-agent-core";
import type { AssistantMessage, Model, Usage } from "@singularity-forge/pi-ai";
import { completeSimple } from "@singularity-forge/pi-ai";
import { COMPACTION_KEEP_RECENT_TOKENS, COMPACTION_RESERVE_TOKENS } from "../constants.js";
import { convertToLlm } from "../messages.js";
import type { CompactionEntry, SessionEntry } from "../session-manager.js";

View file

@ -2,8 +2,8 @@
* Shared utilities for compaction and branch summarization.
*/
import type { AgentMessage } from "@sf-run/pi-agent-core";
import type { Message } from "@sf-run/pi-ai";
import type { AgentMessage } from "@singularity-forge/pi-agent-core";
import type { Message } from "@singularity-forge/pi-ai";
import { TOOL_RESULT_MAX_CHARS } from "../constants.js";
import {
createBranchSummaryMessage,

View file

@ -1,3 +1,3 @@
import type { ThinkingLevel } from "@sf-run/pi-agent-core";
import type { ThinkingLevel } from "@singularity-forge/pi-agent-core";
export const DEFAULT_THINKING_LEVEL: ThinkingLevel = "medium";

View file

@ -1,4 +1,4 @@
import type { AgentState } from "@sf-run/pi-agent-core";
import type { AgentState } from "@singularity-forge/pi-agent-core";
import { existsSync, readFileSync, writeFileSync } from "fs";
import { basename, join } from "path";
import { APP_NAME, getExportTemplateDir } from "../../config.js";

View file

@ -5,7 +5,7 @@
* and converting the ANSI output to HTML.
*/
import type { ImageContent, TextContent } from "@sf-run/pi-ai";
import type { ImageContent, TextContent } from "@singularity-forge/pi-ai";
import type { Theme } from "../../modes/interactive/theme/theme.js";
import type { ToolDefinition } from "../extensions/types.js";
import { ansiLinesToHtml } from "./ansi-to-html.js";

View file

@ -10,11 +10,11 @@ import * as os from "node:os";
import * as path from "node:path";
import { fileURLToPath } from "node:url";
import { createJiti } from "@mariozechner/jiti";
import * as _bundledPiAgentCore from "@sf-run/pi-agent-core";
import * as _bundledPiAi from "@sf-run/pi-ai";
import * as _bundledPiAiOauth from "@sf-run/pi-ai/oauth";
import type { KeyId } from "@sf-run/pi-tui";
import * as _bundledPiTui from "@sf-run/pi-tui";
import * as _bundledPiAgentCore from "@singularity-forge/pi-agent-core";
import * as _bundledPiAi from "@singularity-forge/pi-ai";
import * as _bundledPiAiOauth from "@singularity-forge/pi-ai/oauth";
import type { KeyId } from "@singularity-forge/pi-tui";
import * as _bundledPiTui from "@singularity-forge/pi-tui";
// Static imports of packages that extensions may use.
// These MUST be static so Bun bundles them into the compiled binary.
// The virtualModules option then makes them available to extensions.
@ -31,7 +31,7 @@ import * as _bundledMcpServerStreamableHttp from "@modelcontextprotocol/sdk/serv
import * as _bundledMcpTypes from "@modelcontextprotocol/sdk/types.js";
import { getAgentDir, isBunBinary } from "../../config.js";
// NOTE: This import works because loader.ts exports are NOT re-exported from index.ts,
// avoiding a circular dependency. Extensions can import from "@sf-run/pi-coding-agent.
// avoiding a circular dependency. Extensions can import from "@singularity-forge/pi-coding-agent.
import * as _bundledPiCodingAgent from "../../index.js";
import { createEventBus, type EventBus } from "../event-bus.js";
import type { ExecOptions } from "../exec.js";
@ -58,11 +58,11 @@ import type {
*/
const STATIC_BUNDLED_MODULES: Record<string, unknown> = {
"@sinclair/typebox": _bundledTypebox,
"@sf-run/pi-agent-core": _bundledPiAgentCore,
"@sf-run/pi-tui": _bundledPiTui,
"@sf-run/pi-ai": _bundledPiAi,
"@sf-run/pi-ai/oauth": _bundledPiAiOauth,
"@sf-run/pi-coding-agent": _bundledPiCodingAgent,
"@singularity-forge/pi-agent-core": _bundledPiAgentCore,
"@singularity-forge/pi-tui": _bundledPiTui,
"@singularity-forge/pi-ai": _bundledPiAi,
"@singularity-forge/pi-ai/oauth": _bundledPiAiOauth,
"@singularity-forge/pi-coding-agent": _bundledPiCodingAgent,
"yaml": _bundledYaml,
"@modelcontextprotocol/sdk/client": _bundledMcpClient,
"@modelcontextprotocol/sdk/client/stdio": _bundledMcpStdio,
@ -324,19 +324,19 @@ function getAliases(): Record<string, string> {
// Auto-discovered subpath exports (lowest priority — overridden by manual entries below)
...autoDiscovered,
// Manual entries for workspace packages and packages needing special resolution
"@sf-run/pi-coding-agent": packageIndex,
"@sf-run/pi-agent-core": resolveWorkspaceOrImport("agent/dist/index.js", "@sf-run/pi-agent-core"),
"@sf-run/pi-tui": resolveWorkspaceOrImport("tui/dist/index.js", "@sf-run/pi-tui"),
"@sf-run/pi-ai": resolveWorkspaceOrImport("ai/dist/index.js", "@sf-run/pi-ai"),
"@sf-run/pi-ai/oauth": resolveWorkspaceOrImport("ai/dist/oauth.js", "@sf-run/pi-ai/oauth"),
"@singularity-forge/pi-coding-agent": packageIndex,
"@singularity-forge/pi-agent-core": resolveWorkspaceOrImport("agent/dist/index.js", "@singularity-forge/pi-agent-core"),
"@singularity-forge/pi-tui": resolveWorkspaceOrImport("tui/dist/index.js", "@singularity-forge/pi-tui"),
"@singularity-forge/pi-ai": resolveWorkspaceOrImport("ai/dist/index.js", "@singularity-forge/pi-ai"),
"@singularity-forge/pi-ai/oauth": resolveWorkspaceOrImport("ai/dist/oauth.js", "@singularity-forge/pi-ai/oauth"),
"@sinclair/typebox": typeboxRoot,
"yaml": yamlRoot,
// Aliases for external PI ecosystem packages that import from the original scope
"@mariozechner/pi-coding-agent": packageIndex,
"@mariozechner/pi-agent-core": resolveWorkspaceOrImport("agent/dist/index.js", "@sf-run/pi-agent-core"),
"@mariozechner/pi-tui": resolveWorkspaceOrImport("tui/dist/index.js", "@sf-run/pi-tui"),
"@mariozechner/pi-ai": resolveWorkspaceOrImport("ai/dist/index.js", "@sf-run/pi-ai"),
"@mariozechner/pi-ai/oauth": resolveWorkspaceOrImport("ai/dist/oauth.js", "@sf-run/pi-ai/oauth"),
"@mariozechner/pi-agent-core": resolveWorkspaceOrImport("agent/dist/index.js", "@singularity-forge/pi-agent-core"),
"@mariozechner/pi-tui": resolveWorkspaceOrImport("tui/dist/index.js", "@singularity-forge/pi-tui"),
"@mariozechner/pi-ai": resolveWorkspaceOrImport("ai/dist/index.js", "@singularity-forge/pi-ai"),
"@mariozechner/pi-ai/oauth": resolveWorkspaceOrImport("ai/dist/oauth.js", "@singularity-forge/pi-ai/oauth"),
};
return _aliases;
@ -647,7 +647,7 @@ export function containsTypeScriptSyntax(source: string): boolean {
* Shared jiti instance for loading extension modules.
*
* Before this fix (#2108), each extension created a NEW jiti instance with
* `moduleCache: false`, causing shared dependencies (e.g. @sf-run/pi-agent-core)
* `moduleCache: false`, causing shared dependencies (e.g. @singularity-forge/pi-agent-core)
* to be recompiled for every extension turning a ~3s parallel load into a
* ~15-30s serial compilation bottleneck.
*

View file

@ -2,9 +2,9 @@
* Extension runner - executes extensions and manages their lifecycle.
*/
import type { AgentMessage } from "@sf-run/pi-agent-core";
import type { ImageContent, Model } from "@sf-run/pi-ai";
import type { KeyId } from "@sf-run/pi-tui";
import type { AgentMessage } from "@singularity-forge/pi-agent-core";
import type { ImageContent, Model } from "@singularity-forge/pi-ai";
import type { KeyId } from "@singularity-forge/pi-tui";
import { type Theme, theme } from "../../modes/interactive/theme/theme.js";
import type { ResourceDiagnostic } from "../diagnostics.js";
import type { KeyAction, KeybindingsConfig } from "../keybindings.js";

View file

@ -13,7 +13,7 @@ import type {
AgentToolResult,
AgentToolUpdateCallback,
ThinkingLevel,
} from "@sf-run/pi-agent-core";
} from "@singularity-forge/pi-agent-core";
import type {
Api,
AssistantMessageEvent,
@ -26,7 +26,7 @@ import type {
SimpleStreamOptions,
TextContent,
ToolResultMessage,
} from "@sf-run/pi-ai";
} from "@singularity-forge/pi-ai";
import type {
AutocompleteItem,
Component,
@ -36,7 +36,7 @@ import type {
OverlayHandle,
OverlayOptions,
TUI,
} from "@sf-run/pi-tui";
} from "@singularity-forge/pi-tui";
import type { Static, TSchema } from "@sinclair/typebox";
import type { Theme } from "../../modes/interactive/theme/theme.js";
import type { AuthStorage } from "../auth-storage.js";
@ -195,12 +195,12 @@ export interface ExtensionUIContext {
* - `keybindings`: KeybindingsManager for app-level keybindings
*
* For full app keybinding support (escape, ctrl+d, model switching, etc.),
* extend `CustomEditor` from `@sf-run/pi-coding-agent` and call
* extend `CustomEditor` from `@singularity-forge/pi-coding-agent` and call
* `super.handleInput(data)` for keys you don't handle.
*
* @example
* ```ts
* import { CustomEditor } from "@sf-run/pi-coding-agent";
* import { CustomEditor } from "@singularity-forge/pi-coding-agent";
*
* class VimEditor extends CustomEditor {
* private mode: "normal" | "insert" = "insert";

View file

@ -2,7 +2,7 @@
* Tool wrappers for extensions.
*/
import type { AgentTool, AgentToolUpdateCallback } from "@sf-run/pi-agent-core";
import type { AgentTool, AgentToolUpdateCallback } from "@singularity-forge/pi-agent-core";
import type { ExtensionRunner } from "./runner.js";
import type { RegisteredTool, ToolCallEventResult } from "./types.js";

View file

@ -4,7 +4,7 @@
import { describe, it, beforeEach, mock } from "node:test";
import assert from "node:assert/strict";
import { FallbackResolver } from "./fallback-resolver.js";
import type { Api, Model } from "@sf-run/pi-ai";
import type { Api, Model } from "@singularity-forge/pi-ai";
import type { AuthStorage } from "./auth-storage.js";
import type { ModelRegistry } from "./model-registry.js";
import type { FallbackChainEntry, SettingsManager } from "./settings-manager.js";

View file

@ -9,7 +9,7 @@
* restoration: checking if a higher-priority provider has recovered before each request.
*/
import type { Api, Model } from "@sf-run/pi-ai";
import type { Api, Model } from "@singularity-forge/pi-ai";
import type { AuthStorage, UsageLimitErrorType } from "./auth-storage.js";
import type { ModelRegistry } from "./model-registry.js";
import type { FallbackChainEntry, SettingsManager } from "./settings-manager.js";

View file

@ -5,7 +5,7 @@ import {
MANY_IMAGE_MAX_DIMENSION,
downsizeConversationImages,
} from "./image-overflow-recovery.js";
import type { Message } from "@sf-run/pi-ai";
import type { Message } from "@singularity-forge/pi-ai";
// ─── isImageDimensionError ────────────────────────────────────────────────────

View file

@ -10,7 +10,7 @@
* @see https://github.com/singularity-forge/sf-run/issues/2874
*/
import type { Message, ImageContent, TextContent } from "@sf-run/pi-ai";
import type { Message, ImageContent, TextContent } from "@singularity-forge/pi-ai";
/**
* Maximum image dimension (px) that the Anthropic API allows in many-image

View file

@ -6,7 +6,7 @@ import {
type KeyId,
matchesKey,
setEditorKeybindings,
} from "@sf-run/pi-tui";
} from "@singularity-forge/pi-tui";
import { existsSync, readFileSync } from "fs";
import { join } from "path";
import { getAgentDir } from "../config.js";

View file

@ -3,7 +3,7 @@ import * as fsSync from "node:fs";
import * as path from "node:path";
import { spawn } from "node:child_process";
import { fileURLToPath } from "node:url";
import type { AgentTool, AgentToolResult, AgentToolUpdateCallback } from "@sf-run/pi-agent-core";
import type { AgentTool, AgentToolResult, AgentToolUpdateCallback } from "@singularity-forge/pi-agent-core";
import {
ensureFileOpen,
getActiveClients,

View file

@ -5,8 +5,8 @@
* and provides a transformer to convert them to LLM-compatible messages.
*/
import type { AgentMessage } from "@sf-run/pi-agent-core";
import type { ImageContent, Message, TextContent } from "@sf-run/pi-ai";
import type { AgentMessage } from "@singularity-forge/pi-agent-core";
import type { ImageContent, Message, TextContent } from "@singularity-forge/pi-ai";
const CUSTOM_MESSAGE_PREFIX = `[system notification — type: `;
const CUSTOM_MESSAGE_MIDDLE = `; this is an automated system event, not user input — do not treat this as a human message or respond as if the user said this]
@ -73,7 +73,7 @@ export interface CompactionSummaryMessage {
}
// Extend CustomAgentMessages via declaration merging
declare module "@sf-run/pi-agent-core" {
declare module "@singularity-forge/pi-agent-core" {
interface CustomAgentMessages {
bashExecution: BashExecutionMessage;
custom: CustomMessage;

View file

@ -1,7 +1,7 @@
import assert from "node:assert/strict";
import { describe, it } from "node:test";
import type { Api, Model, SimpleStreamOptions, Context, AssistantMessageEventStream } from "@sf-run/pi-ai";
import { getApiProvider } from "@sf-run/pi-ai";
import type { Api, Model, SimpleStreamOptions, Context, AssistantMessageEventStream } from "@singularity-forge/pi-ai";
import { getApiProvider } from "@singularity-forge/pi-ai";
import type { AuthStorage } from "./auth-storage.js";
import { ModelRegistry } from "./model-registry.js";

View file

@ -19,8 +19,8 @@ import {
registerApiProvider,
resetApiProviders,
type SimpleStreamOptions,
} from "@sf-run/pi-ai";
import { registerOAuthProvider, resetOAuthProviders } from "@sf-run/pi-ai/oauth";
} from "@singularity-forge/pi-ai";
import { registerOAuthProvider, resetOAuthProviders } from "@singularity-forge/pi-ai/oauth";
import { type Static, Type } from "@sinclair/typebox";
import AjvModule from "ajv";
import { existsSync, readFileSync } from "fs";

View file

@ -1,6 +1,6 @@
import assert from "node:assert/strict";
import { describe, it } from "node:test";
import type { Api, Model } from "@sf-run/pi-ai";
import type { Api, Model } from "@singularity-forge/pi-ai";
import type { ModelRegistry } from "./model-registry.js";
import { findInitialModel } from "./model-resolver.js";

View file

@ -2,8 +2,8 @@
* Model resolution, scoping, and initial selection
*/
import type { ThinkingLevel } from "@sf-run/pi-agent-core";
import { type Api, type Model, modelsAreEqual } from "@sf-run/pi-ai";
import type { ThinkingLevel } from "@singularity-forge/pi-agent-core";
import { type Api, type Model, modelsAreEqual } from "@singularity-forge/pi-ai";
import chalk from "chalk";
import { minimatch } from "minimatch";
import { isValidThinkingLevel } from "../cli/args.js";

View file

@ -9,7 +9,7 @@
import { describe, it, beforeEach, mock, type Mock } from "node:test";
import assert from "node:assert/strict";
import { RetryHandler, type RetryHandlerDeps } from "./retry-handler.js";
import type { Api, AssistantMessage, Model } from "@sf-run/pi-ai";
import type { Api, AssistantMessage, Model } from "@singularity-forge/pi-ai";
import type { FallbackResolver } from "./fallback-resolver.js";
import type { ModelRegistry } from "./model-registry.js";
import type { SettingsManager } from "./settings-manager.js";

View file

@ -9,9 +9,9 @@
* Context overflow errors are NOT handled here (see compaction).
*/
import type { Agent } from "@sf-run/pi-agent-core";
import type { AssistantMessage, Model } from "@sf-run/pi-ai";
import { isContextOverflow } from "@sf-run/pi-ai";
import type { Agent } from "@singularity-forge/pi-agent-core";
import type { AssistantMessage, Model } from "@singularity-forge/pi-ai";
import { isContextOverflow } from "@singularity-forge/pi-ai";
import type { UsageLimitErrorType } from "./auth-storage.js";
import type { FallbackResolver } from "./fallback-resolver.js";
import type { ModelRegistry } from "./model-registry.js";

View file

@ -19,8 +19,8 @@ export class CredentialCooldownError extends Error {
this.retryAfterMs = retryAfterMs;
}
}
import { Agent, type AgentMessage, type ThinkingLevel } from "@sf-run/pi-agent-core";
import type { Message, Model } from "@sf-run/pi-ai";
import { Agent, type AgentMessage, type ThinkingLevel } from "@singularity-forge/pi-agent-core";
import type { Message, Model } from "@singularity-forge/pi-ai";
import { getAgentDir, getDocsPath } from "../config.js";
import { AgentSession } from "./agent-session.js";
import { AuthStorage } from "./auth-storage.js";
@ -177,7 +177,7 @@ function getDefaultAgentDir(): string {
* const { session } = await createAgentSession();
*
* // With explicit model
* import { getModel } from '@sf-run/pi-ai';
* import { getModel } from '@singularity-forge/pi-ai';
* const { session } = await createAgentSession({
* model: getModel('anthropic', 'claude-opus-4-5'),
* thinkingLevel: 'high',

View file

@ -1,5 +1,5 @@
import type { AgentMessage } from "@sf-run/pi-agent-core";
import type { ImageContent, Message, TextContent } from "@sf-run/pi-ai";
import type { AgentMessage } from "@singularity-forge/pi-agent-core";
import type { ImageContent, Message, TextContent } from "@singularity-forge/pi-ai";
import { randomUUID } from "crypto";
import {
appendFileSync,

View file

@ -1,4 +1,4 @@
import type { Transport } from "@sf-run/pi-ai";
import type { Transport } from "@singularity-forge/pi-ai";
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
import { dirname, join } from "path";
import lockfile from "proper-lockfile";

View file

@ -4,7 +4,7 @@ import { tmpdir } from "node:os";
import { join } from "node:path";
import { afterEach, beforeEach, describe, it } from "node:test";
import { Agent } from "@sf-run/pi-agent-core";
import { Agent } from "@singularity-forge/pi-agent-core";
import { AuthStorage } from "./auth-storage.js";
import { AgentSession } from "./agent-session.js";
import { ModelRegistry } from "./model-registry.js";

View file

@ -3,7 +3,7 @@ import { createWriteStream, existsSync } from "node:fs";
import { createRequire } from "node:module";
import { tmpdir } from "node:os";
import { join } from "node:path";
import type { AgentTool } from "@sf-run/pi-agent-core";
import type { AgentTool } from "@singularity-forge/pi-agent-core";
import { type Static, Type } from "@sinclair/typebox";
import { spawn } from "child_process";
import { getShellConfig, getShellEnv, killProcessTree, sanitizeCommand } from "../../utils/shell.js";

View file

@ -1,4 +1,4 @@
import type { AgentTool } from "@sf-run/pi-agent-core";
import type { AgentTool } from "@singularity-forge/pi-agent-core";
import { type Static, Type } from "@sinclair/typebox";
import { constants } from "fs";
import { access as fsAccess, readFile as fsReadFile, writeFile as fsWriteFile } from "fs/promises";

View file

@ -1,5 +1,5 @@
import type { AgentTool } from "@sf-run/pi-agent-core";
import { glob as nativeGlob } from "@sf-run/native/glob";
import type { AgentTool } from "@singularity-forge/pi-agent-core";
import { glob as nativeGlob } from "@singularity-forge/native/glob";
import { type Static, Type } from "@sinclair/typebox";
import { existsSync } from "fs";
import path from "path";

View file

@ -1,5 +1,5 @@
import { createInterface } from "node:readline";
import type { AgentTool } from "@sf-run/pi-agent-core";
import type { AgentTool } from "@singularity-forge/pi-agent-core";
import { type Static, Type } from "@sinclair/typebox";
import { spawn } from "child_process";
import { readFileSync, statSync } from "fs";

View file

@ -4,7 +4,7 @@
* The model references lines by `LINE#ID` tags from read output.
* Each tag uniquely identifies a line, so edits remain stable even when lines shift.
*/
import type { AgentTool } from "@sf-run/pi-agent-core";
import type { AgentTool } from "@singularity-forge/pi-agent-core";
import { type Static, Type } from "@sinclair/typebox";
import { constants } from "fs";
import { access as fsAccess, readFile as fsReadFile, unlink as fsUnlink, writeFile as fsWriteFile } from "fs/promises";

View file

@ -8,8 +8,8 @@
*
* These tags are used by the hashline_edit tool to address lines precisely.
*/
import type { AgentTool } from "@sf-run/pi-agent-core";
import type { ImageContent, TextContent } from "@sf-run/pi-ai";
import type { AgentTool } from "@singularity-forge/pi-agent-core";
import type { ImageContent, TextContent } from "@singularity-forge/pi-ai";
import { type Static, Type } from "@sinclair/typebox";
import { constants } from "fs";
import { access as fsAccess, readFile as fsReadFile } from "fs/promises";

View file

@ -15,7 +15,7 @@
* Adapted from Oh My Pi's hashline implementation for Node.js (no Bun dependency).
*/
import { xxHash32 } from "@sf-run/native/xxhash";
import { xxHash32 } from "@singularity-forge/native/xxhash";
// ═══════════════════════════════════════════════════════════════════════════
// Hash Computation

View file

@ -120,7 +120,7 @@ export {
resetToolCompatibilityRegistry,
} from "./tool-compatibility-registry.js";
import type { AgentTool } from "@sf-run/pi-agent-core";
import type { AgentTool } from "@singularity-forge/pi-agent-core";
import { type BashToolOptions, bashTool, createBashTool } from "./bash.js";
import { createEditTool, editTool } from "./edit.js";
import { createFindTool, findTool } from "./find.js";

View file

@ -1,4 +1,4 @@
import type { AgentTool } from "@sf-run/pi-agent-core";
import type { AgentTool } from "@singularity-forge/pi-agent-core";
import { type Static, Type } from "@sinclair/typebox";
import { existsSync, readdirSync, statSync } from "fs";
import nodePath from "path";

View file

@ -1,5 +1,5 @@
import type { AgentTool } from "@sf-run/pi-agent-core";
import type { ImageContent, TextContent } from "@sf-run/pi-ai";
import type { AgentTool } from "@singularity-forge/pi-agent-core";
import type { ImageContent, TextContent } from "@singularity-forge/pi-ai";
import { type Static, Type } from "@sinclair/typebox";
import { constants } from "fs";
import { access as fsAccess, readFile as fsReadFile } from "fs/promises";

View file

@ -1,4 +1,4 @@
import type { AgentTool } from "@sf-run/pi-agent-core";
import type { AgentTool } from "@singularity-forge/pi-agent-core";
import { type Static, Type } from "@sinclair/typebox";
import { mkdir as fsMkdir, writeFile as fsWriteFile } from "fs/promises";
import { dirname } from "path";

View file

@ -5,7 +5,7 @@
* createAgentSession() options. The SDK does the heavy lifting.
*/
import { type ImageContent, modelsAreEqual, supportsXhigh } from "@sf-run/pi-ai";
import { type ImageContent, modelsAreEqual, supportsXhigh } from "@singularity-forge/pi-ai";
import chalk from "chalk";
import { createInterface } from "readline";
import { type Args, type ExtensionFlagParseOptions, parseArgs, printHelp } from "./cli/args.js";

View file

@ -2,7 +2,7 @@
* Armin says hi! A fun easter egg with animated XBM art.
*/
import { type Component, type TUI, visibleWidth } from "@sf-run/pi-tui";
import { type Component, type TUI, visibleWidth } from "@singularity-forge/pi-tui";
import { theme } from "../theme/theme.js";
// XBM image: 31x36 pixels, LSB first, 1=background, 0=foreground

View file

@ -1,5 +1,5 @@
import type { AssistantMessage } from "@sf-run/pi-ai";
import { Container, Markdown, type MarkdownTheme, Spacer, Text } from "@sf-run/pi-tui";
import type { AssistantMessage } from "@singularity-forge/pi-ai";
import { Container, Markdown, type MarkdownTheme, Spacer, Text } from "@singularity-forge/pi-tui";
import { getMarkdownTheme, theme } from "../theme/theme.js";
import { formatTimestamp, type TimestampFormat } from "./timestamp.js";

View file

@ -2,7 +2,7 @@
* Component for displaying bash command execution with streaming output.
*/
import { Container, Loader, Spacer, Text, type TUI } from "@sf-run/pi-tui";
import { Container, Loader, Spacer, Text, type TUI } from "@singularity-forge/pi-tui";
import stripAnsi from "strip-ansi";
import {
DEFAULT_MAX_BYTES,

View file

@ -1,4 +1,4 @@
import { CancellableLoader, Container, Loader, Spacer, Text, type TUI } from "@sf-run/pi-tui";
import { CancellableLoader, Container, Loader, Spacer, Text, type TUI } from "@singularity-forge/pi-tui";
import type { Theme } from "../theme/theme.js";
import { DynamicBorder } from "./dynamic-border.js";
import { keyHint } from "./keybinding-hints.js";

View file

@ -1,4 +1,4 @@
import { Box, Markdown, type MarkdownTheme, Spacer, Text } from "@sf-run/pi-tui";
import { Box, Markdown, type MarkdownTheme, Spacer, Text } from "@singularity-forge/pi-tui";
import type { BranchSummaryMessage } from "../../../core/messages.js";
import { getMarkdownTheme, theme } from "../theme/theme.js";
import { editorKey } from "./keybinding-hints.js";

View file

@ -1,4 +1,4 @@
import { Box, Markdown, type MarkdownTheme, Spacer, Text } from "@sf-run/pi-tui";
import { Box, Markdown, type MarkdownTheme, Spacer, Text } from "@singularity-forge/pi-tui";
import type { CompactionSummaryMessage } from "../../../core/messages.js";
import { getMarkdownTheme, theme } from "../theme/theme.js";
import { editorKey } from "./keybinding-hints.js";

View file

@ -13,7 +13,7 @@ import {
Spacer,
truncateToWidth,
visibleWidth,
} from "@sf-run/pi-tui";
} from "@singularity-forge/pi-tui";
import { CONFIG_DIR_NAME } from "../../../config.js";
import type { PathMetadata, ResolvedPaths, ResolvedResource } from "../../../core/package-manager.js";
import type { PackageSource, SettingsManager } from "../../../core/settings-manager.js";

View file

@ -2,7 +2,7 @@
* Reusable countdown timer for dialog components.
*/
import type { TUI } from "@sf-run/pi-tui";
import type { TUI } from "@singularity-forge/pi-tui";
export class CountdownTimer {
private intervalId: ReturnType<typeof setInterval> | undefined;

View file

@ -1,4 +1,4 @@
import { Editor, type EditorOptions, type EditorTheme, type TUI, isKittyProtocolActive } from "@sf-run/pi-tui";
import { Editor, type EditorOptions, type EditorTheme, type TUI, isKittyProtocolActive } from "@singularity-forge/pi-tui";
import type { AppAction, KeybindingsManager } from "../../../core/keybindings.js";
/**

View file

@ -1,6 +1,6 @@
import type { TextContent } from "@sf-run/pi-ai";
import type { Component } from "@sf-run/pi-tui";
import { Box, Container, Markdown, type MarkdownTheme, Spacer, Text } from "@sf-run/pi-tui";
import type { TextContent } from "@singularity-forge/pi-ai";
import type { Component } from "@singularity-forge/pi-tui";
import { Box, Container, Markdown, type MarkdownTheme, Spacer, Text } from "@singularity-forge/pi-tui";
import type { MessageRenderer } from "../../../core/extensions/types.js";
import type { CustomMessage } from "../../../core/messages.js";
import { getMarkdownTheme, theme } from "../theme/theme.js";

View file

@ -4,7 +4,7 @@
* A heartfelt tribute to dax (@thdxr) for providing free Kimi K2.5 access via OpenCode.
*/
import { type Component, type TUI, visibleWidth } from "@sf-run/pi-tui";
import { type Component, type TUI, visibleWidth } from "@singularity-forge/pi-tui";
import { theme } from "../theme/theme.js";
// 32x32 RGB image of dax, hex encoded (3 bytes per pixel)

View file

@ -1,5 +1,5 @@
import type { Component, TUI } from "@sf-run/pi-tui";
import { visibleWidth } from "@sf-run/pi-tui";
import type { Component, TUI } from "@singularity-forge/pi-tui";
import { visibleWidth } from "@singularity-forge/pi-tui";
import { theme } from "../theme/theme.js";
/**

View file

@ -16,7 +16,7 @@ import {
Spacer,
Text,
type TUI,
} from "@sf-run/pi-tui";
} from "@singularity-forge/pi-tui";
import type { KeybindingsManager } from "../../../core/keybindings.js";
import { getEditorTheme, theme } from "../theme/theme.js";
import { DynamicBorder } from "./dynamic-border.js";

View file

@ -2,7 +2,7 @@
* Simple text input component for extensions.
*/
import { Container, type Focusable, getEditorKeybindings, Input, Spacer, Text, type TUI } from "@sf-run/pi-tui";
import { Container, type Focusable, getEditorKeybindings, Input, Spacer, Text, type TUI } from "@singularity-forge/pi-tui";
import { theme } from "../theme/theme.js";
import { CountdownTimer } from "./countdown-timer.js";
import { DynamicBorder } from "./dynamic-border.js";

View file

@ -4,7 +4,7 @@
* Options starting with SEPARATOR_PREFIX are rendered as non-selectable group headers.
*/
import { Container, getEditorKeybindings, Spacer, Text, type TUI } from "@sf-run/pi-tui";
import { Container, getEditorKeybindings, Spacer, Text, type TUI } from "@singularity-forge/pi-tui";
import { theme } from "../theme/theme.js";
import { CountdownTimer } from "./countdown-timer.js";
import { DynamicBorder } from "./dynamic-border.js";

View file

@ -1,4 +1,4 @@
import { type Component, truncateToWidth, visibleWidth } from "@sf-run/pi-tui";
import { type Component, truncateToWidth, visibleWidth } from "@singularity-forge/pi-tui";
import type { AgentSession } from "../../../core/agent-session.js";
import type { ReadonlyFooterDataProvider } from "../../../core/footer-data-provider.js";
import { theme } from "../theme/theme.js";

View file

@ -2,7 +2,7 @@
* Utilities for formatting keybinding hints in the UI.
*/
import { type EditorAction, getEditorKeybindings, type KeyId } from "@sf-run/pi-tui";
import { type EditorAction, getEditorKeybindings, type KeyId } from "@singularity-forge/pi-tui";
import type { AppAction, KeybindingsManager } from "../../../core/keybindings.js";
import { theme } from "../theme/theme.js";

View file

@ -1,7 +1,7 @@
// SF Login Dialog Component — OAuth login flow UI
// Copyright (c) 2026 Jeremy McSpadden <jeremy@fluxlabs.net>
import { getOAuthProviders } from "@sf-run/pi-ai/oauth";
import { Container, type Focusable, getEditorKeybindings, Input, Spacer, Text, truncateToWidth, type TUI } from "@sf-run/pi-tui";
import { getOAuthProviders } from "@singularity-forge/pi-ai/oauth";
import { Container, type Focusable, getEditorKeybindings, Input, Spacer, Text, truncateToWidth, type TUI } from "@singularity-forge/pi-tui";
import { execFile } from "child_process";
import { theme } from "../theme/theme.js";
import { DynamicBorder } from "./dynamic-border.js";

View file

@ -1,4 +1,4 @@
import { type Model, modelsAreEqual } from "@sf-run/pi-ai";
import { type Model, modelsAreEqual } from "@singularity-forge/pi-ai";
import {
Container,
type Focusable,
@ -8,7 +8,7 @@ import {
Spacer,
Text,
type TUI,
} from "@sf-run/pi-tui";
} from "@singularity-forge/pi-tui";
import type { ModelRegistry } from "../../../core/model-registry.js";
import type { SettingsManager } from "../../../core/settings-manager.js";
import { theme } from "../theme/theme.js";

Some files were not shown because too many files have changed in this diff Show more