chore: pin dependencies and use native TypeScript
This commit is contained in:
@@ -2,7 +2,7 @@ import type { AgentTool } from "@earendil-works/pi-agent-core";
|
||||
import { fauxAssistantMessage, fauxToolCall } from "@earendil-works/pi-ai";
|
||||
import { Type } from "typebox";
|
||||
import { afterEach, describe, expect, it } from "vitest";
|
||||
import { createHarness, type Harness } from "../harness.js";
|
||||
import { createHarness, type Harness } from "../harness.ts";
|
||||
|
||||
function createEchoTool(): AgentTool {
|
||||
return {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { fauxAssistantMessage, fauxToolCall } from "@earendil-works/pi-ai";
|
||||
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
||||
import { Type } from "typebox";
|
||||
import { afterEach, describe, expect, it } from "vitest";
|
||||
import { createHarness, getAssistantTexts, getUserTexts, type Harness } from "../harness.js";
|
||||
import { createHarness, getAssistantTexts, getUserTexts, type Harness } from "../harness.ts";
|
||||
|
||||
describe("issue #2023 queued slash-command follow-up", () => {
|
||||
const harnesses: Harness[] = [];
|
||||
|
||||
@@ -8,9 +8,9 @@ import {
|
||||
createAgentSessionFromServices,
|
||||
createAgentSessionRuntime,
|
||||
createAgentSessionServices,
|
||||
} from "../../../src/core/agent-session-runtime.js";
|
||||
import { AuthStorage } from "../../../src/core/auth-storage.js";
|
||||
import { SessionManager } from "../../../src/core/session-manager.js";
|
||||
} from "../../../src/core/agent-session-runtime.ts";
|
||||
import { AuthStorage } from "../../../src/core/auth-storage.ts";
|
||||
import { SessionManager } from "../../../src/core/session-manager.ts";
|
||||
|
||||
describe("issue #2753 reload stale resource settings", () => {
|
||||
const cleanups: Array<() => void> = [];
|
||||
|
||||
@@ -2,7 +2,7 @@ import { mkdirSync, rmSync, writeFileSync } from "node:fs";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
||||
import { DefaultResourceLoader } from "../../../src/core/resource-loader.js";
|
||||
import { DefaultResourceLoader } from "../../../src/core/resource-loader.ts";
|
||||
|
||||
describe("issue #2781 skill collision precedence: user skills should override package skills", () => {
|
||||
let tempDir: string;
|
||||
|
||||
@@ -39,7 +39,7 @@ describe("issue #2791 fs.watch error event crashes process", () => {
|
||||
});
|
||||
|
||||
it("process should survive an error event on the theme FSWatcher", () => {
|
||||
const themeModulePath = join(__dirname, "../../../src/modes/interactive/theme/theme.js").replace(/\\/g, "/");
|
||||
const themeModulePath = join(__dirname, "../../../src/modes/interactive/theme/theme.ts").replace(/\\/g, "/");
|
||||
const agentDir = join(tempRoot, "agent").replace(/\\/g, "/");
|
||||
|
||||
// Script that sets up the watcher and emits a synthetic error on it.
|
||||
@@ -87,7 +87,7 @@ process.exit(0);
|
||||
let stderr = "";
|
||||
let exitCode: number;
|
||||
try {
|
||||
_stdout = execFileSync("npx", ["tsx", scriptPath], {
|
||||
_stdout = execFileSync(process.execPath, [scriptPath], {
|
||||
timeout: 10000,
|
||||
encoding: "utf-8",
|
||||
env: { ...process.env, PI_CODING_AGENT_DIR: agentDir },
|
||||
|
||||
@@ -4,10 +4,10 @@ import { join } from "node:path";
|
||||
import { getModel } from "@earendil-works/pi-ai";
|
||||
import { Type } from "typebox";
|
||||
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
||||
import { DefaultResourceLoader } from "../../../src/core/resource-loader.js";
|
||||
import { createAgentSession } from "../../../src/core/sdk.js";
|
||||
import { SessionManager } from "../../../src/core/session-manager.js";
|
||||
import { SettingsManager } from "../../../src/core/settings-manager.js";
|
||||
import { DefaultResourceLoader } from "../../../src/core/resource-loader.ts";
|
||||
import { createAgentSession } from "../../../src/core/sdk.ts";
|
||||
import { SessionManager } from "../../../src/core/session-manager.ts";
|
||||
import { SettingsManager } from "../../../src/core/settings-manager.ts";
|
||||
|
||||
describe("regression #2835: tool allowlists filter extension tools", () => {
|
||||
let tempDir: string;
|
||||
|
||||
@@ -3,16 +3,16 @@ import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import { fauxAssistantMessage, registerFauxProvider } from "@earendil-works/pi-ai";
|
||||
import { afterEach, describe, expect, it } from "vitest";
|
||||
import type { AgentSession } from "../../../src/core/agent-session.js";
|
||||
import type { AgentSession } from "../../../src/core/agent-session.ts";
|
||||
import {
|
||||
type CreateAgentSessionRuntimeFactory,
|
||||
createAgentSessionFromServices,
|
||||
createAgentSessionRuntime,
|
||||
createAgentSessionServices,
|
||||
} from "../../../src/core/agent-session-runtime.js";
|
||||
import { AuthStorage } from "../../../src/core/auth-storage.js";
|
||||
import { SessionManager } from "../../../src/core/session-manager.js";
|
||||
import type { ExtensionAPI, ExtensionCommandContext, ExtensionFactory } from "../../../src/index.js";
|
||||
} from "../../../src/core/agent-session-runtime.ts";
|
||||
import { AuthStorage } from "../../../src/core/auth-storage.ts";
|
||||
import { SessionManager } from "../../../src/core/session-manager.ts";
|
||||
import type { ExtensionAPI, ExtensionCommandContext, ExtensionFactory } from "../../../src/index.ts";
|
||||
|
||||
function getText(message: AgentSession["messages"][number]): string {
|
||||
if (!("content" in message)) {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { setKeybindings, type TUI } from "@earendil-works/pi-tui";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||
import { KeybindingsManager } from "../../../src/core/keybindings.js";
|
||||
import { ModelSelectorComponent } from "../../../src/modes/interactive/components/model-selector.js";
|
||||
import { ScopedModelsSelectorComponent } from "../../../src/modes/interactive/components/scoped-models-selector.js";
|
||||
import { initTheme } from "../../../src/modes/interactive/theme/theme.js";
|
||||
import { stripAnsi } from "../../../src/utils/ansi.js";
|
||||
import { createHarness, type Harness } from "../harness.js";
|
||||
import { KeybindingsManager } from "../../../src/core/keybindings.ts";
|
||||
import { ModelSelectorComponent } from "../../../src/modes/interactive/components/model-selector.ts";
|
||||
import { ScopedModelsSelectorComponent } from "../../../src/modes/interactive/components/scoped-models-selector.ts";
|
||||
import { initTheme } from "../../../src/modes/interactive/theme/theme.ts";
|
||||
import { stripAnsi } from "../../../src/utils/ansi.ts";
|
||||
import { createHarness, type Harness } from "../harness.ts";
|
||||
|
||||
function createFakeTui(): TUI {
|
||||
return {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
||||
import { createFindToolDefinition } from "../../../src/core/tools/find.js";
|
||||
import { createFindToolDefinition } from "../../../src/core/tools/find.ts";
|
||||
|
||||
/**
|
||||
* Regression test for https://github.com/earendil-works/pi-mono/issues/3302
|
||||
|
||||
@@ -2,7 +2,7 @@ import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
||||
import { createFindToolDefinition } from "../../../src/core/tools/find.js";
|
||||
import { createFindToolDefinition } from "../../../src/core/tools/find.ts";
|
||||
|
||||
/**
|
||||
* Regression test for https://github.com/earendil-works/pi-mono/issues/3303
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { fauxAssistantMessage } from "@earendil-works/pi-ai";
|
||||
import { afterEach, describe, expect, it } from "vitest";
|
||||
import { createHarness, getAssistantTexts, type Harness } from "../harness.js";
|
||||
import { createHarness, getAssistantTexts, type Harness } from "../harness.ts";
|
||||
|
||||
describe("issue #3317 network connection lost retry", () => {
|
||||
const harnesses: Harness[] = [];
|
||||
|
||||
@@ -7,11 +7,11 @@ import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
||||
import {
|
||||
createAgentSessionFromServices,
|
||||
createAgentSessionServices,
|
||||
} from "../../../src/core/agent-session-services.js";
|
||||
import { DefaultResourceLoader } from "../../../src/core/resource-loader.js";
|
||||
import { createAgentSession } from "../../../src/core/sdk.js";
|
||||
import { SessionManager } from "../../../src/core/session-manager.js";
|
||||
import { SettingsManager } from "../../../src/core/settings-manager.js";
|
||||
} from "../../../src/core/agent-session-services.ts";
|
||||
import { DefaultResourceLoader } from "../../../src/core/resource-loader.ts";
|
||||
import { createAgentSession } from "../../../src/core/sdk.ts";
|
||||
import { SessionManager } from "../../../src/core/session-manager.ts";
|
||||
import { SettingsManager } from "../../../src/core/settings-manager.ts";
|
||||
|
||||
describe("regression #3592: no-builtin-tools keeps extension tools enabled", () => {
|
||||
let tempDir: string;
|
||||
|
||||
@@ -2,8 +2,8 @@ import { existsSync, mkdirSync, rmSync } from "node:fs";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
||||
import { DefaultResourceLoader } from "../../../src/core/resource-loader.js";
|
||||
import { SettingsManager } from "../../../src/core/settings-manager.js";
|
||||
import { DefaultResourceLoader } from "../../../src/core/resource-loader.ts";
|
||||
import { SettingsManager } from "../../../src/core/settings-manager.ts";
|
||||
|
||||
describe("regression #3616: in-memory settings survive reload", () => {
|
||||
let tempDir: string;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { afterEach, describe, expect, it } from "vitest";
|
||||
import type { ExtensionAPI } from "../../../src/index.js";
|
||||
import { createHarness, type Harness } from "../harness.js";
|
||||
import type { ExtensionAPI } from "../../../src/index.ts";
|
||||
import { createHarness, type Harness } from "../harness.ts";
|
||||
|
||||
describe("regression #3686: session name changes emit an event", () => {
|
||||
const harnesses: Harness[] = [];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { afterEach, describe, expect, it } from "vitest";
|
||||
import { assistantMsg, userMsg } from "../../utilities.js";
|
||||
import { createHarness, type Harness } from "../harness.js";
|
||||
import { assistantMsg, userMsg } from "../../utilities.ts";
|
||||
import { createHarness, type Harness } from "../harness.ts";
|
||||
|
||||
describe("issue #3688 tree cancellation compaction state", () => {
|
||||
const harnesses: Harness[] = [];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { fauxAssistantMessage } from "@earendil-works/pi-ai";
|
||||
import { afterEach, describe, expect, it } from "vitest";
|
||||
import { createHarness, type Harness } from "../harness.js";
|
||||
import { createHarness, type Harness } from "../harness.ts";
|
||||
|
||||
describe("regression #3982: message_end cost override", () => {
|
||||
const harnesses: Harness[] = [];
|
||||
|
||||
@@ -2,12 +2,12 @@ import type { AgentMessage } from "@earendil-works/pi-agent-core";
|
||||
import type { AssistantMessage, ToolResultMessage, Usage } from "@earendil-works/pi-ai";
|
||||
import { Container, Text, type TUI } from "@earendil-works/pi-tui";
|
||||
import { beforeAll, describe, expect, test, vi } from "vitest";
|
||||
import type { AgentSessionEvent } from "../../../src/core/agent-session.js";
|
||||
import type { SessionContext } from "../../../src/core/session-manager.js";
|
||||
import type { ToolExecutionComponent } from "../../../src/modes/interactive/components/tool-execution.js";
|
||||
import { InteractiveMode } from "../../../src/modes/interactive/interactive-mode.js";
|
||||
import { initTheme } from "../../../src/modes/interactive/theme/theme.js";
|
||||
import { stripAnsi } from "../../../src/utils/ansi.js";
|
||||
import type { AgentSessionEvent } from "../../../src/core/agent-session.ts";
|
||||
import type { SessionContext } from "../../../src/core/session-manager.ts";
|
||||
import type { ToolExecutionComponent } from "../../../src/modes/interactive/components/tool-execution.ts";
|
||||
import { InteractiveMode } from "../../../src/modes/interactive/interactive-mode.ts";
|
||||
import { initTheme } from "../../../src/modes/interactive/theme/theme.ts";
|
||||
import { stripAnsi } from "../../../src/utils/ansi.ts";
|
||||
|
||||
const TOOL_CALL_ID = "tool-4167";
|
||||
const TOOL_NAME = "slow_tool";
|
||||
|
||||
Reference in New Issue
Block a user