pi-sessions 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- import { complete, type Message } from "@mariozechner/pi-ai";
2
- import type { ExtensionAPI, Theme } from "@mariozechner/pi-coding-agent";
3
- import { Text } from "@mariozechner/pi-tui";
4
- import { Type } from "@sinclair/typebox";
1
+ import { complete, type Message } from "@earendil-works/pi-ai";
2
+ import type { ExtensionAPI, Theme } from "@earendil-works/pi-coding-agent";
3
+ import { Text } from "@earendil-works/pi-tui";
4
+ import { Type } from "typebox";
5
5
  import { type RenderedSessionTree, renderSessionTreeMarkdown } from "./session-search/extract.js";
6
6
  import {
7
7
  getIndexStatus,
@@ -1,5 +1,5 @@
1
- import type { ExtensionCommandContext } from "@mariozechner/pi-coding-agent";
2
- import type { AutocompleteItem } from "@mariozechner/pi-tui";
1
+ import type { ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
2
+ import type { AutocompleteItem } from "@earendil-works/pi-tui";
3
3
 
4
4
  export const TITLE_USAGE = "Usage: /title [this|folder|pi] [-f]";
5
5
 
@@ -3,7 +3,7 @@ import {
3
3
  convertToLlm,
4
4
  type SessionEntry,
5
5
  serializeConversation,
6
- } from "@mariozechner/pi-coding-agent";
6
+ } from "@earendil-works/pi-coding-agent";
7
7
 
8
8
  export interface AutoTitleContext {
9
9
  cwd: string | undefined;
@@ -1,4 +1,4 @@
1
- import { buildSessionContext, type ExtensionContext } from "@mariozechner/pi-coding-agent";
1
+ import { buildSessionContext, type ExtensionContext } from "@earendil-works/pi-coding-agent";
2
2
  import type { AutoTitleSettings } from "../shared/settings.js";
3
3
  import {
4
4
  type AutoTitleMode,
@@ -1,5 +1,5 @@
1
- import type { Api, Model } from "@mariozechner/pi-ai";
2
- import type { ExtensionContext } from "@mariozechner/pi-coding-agent";
1
+ import type { Api, Model } from "@earendil-works/pi-ai";
2
+ import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
3
3
  import { ModelReference } from "../shared/settings.js";
4
4
 
5
5
  const DEFAULT_AUTO_TITLE_FALLBACK_MODELS: readonly ModelReference[] = [
@@ -4,14 +4,14 @@ import {
4
4
  type Model,
5
5
  type TextContent,
6
6
  type UserMessage,
7
- } from "@mariozechner/pi-ai";
7
+ } from "@earendil-works/pi-ai";
8
8
  import type {
9
9
  ExtensionAPI,
10
10
  ExtensionCommandContext,
11
11
  ExtensionContext,
12
12
  SessionInfo,
13
- } from "@mariozechner/pi-coding-agent";
14
- import { SessionManager } from "@mariozechner/pi-coding-agent";
13
+ } from "@earendil-works/pi-coding-agent";
14
+ import { SessionManager } from "@earendil-works/pi-coding-agent";
15
15
  import type { RetitleMode, RetitleScope } from "./command.js";
16
16
  import { type AutoTitleContext, buildAutoTitleContext } from "./context.js";
17
17
  import type {
@@ -1,5 +1,5 @@
1
- import type { SessionEntry } from "@mariozechner/pi-coding-agent";
2
- import { type Static, Type } from "@sinclair/typebox";
1
+ import type { SessionEntry } from "@earendil-works/pi-coding-agent";
2
+ import { type Static, Type } from "typebox";
3
3
  import { safeParseTypeBoxValue } from "../shared/typebox.js";
4
4
 
5
5
  export const AUTO_TITLE_STATE_CUSTOM_TYPE = "pi-sessions.auto-title";
@@ -1,12 +1,12 @@
1
- import type { Api, Model } from "@mariozechner/pi-ai";
1
+ import type { Api, Model } from "@earendil-works/pi-ai";
2
2
  import {
3
3
  copyToClipboard,
4
4
  type ExtensionAPI,
5
5
  type ExtensionCommandContext,
6
6
  type Theme,
7
- } from "@mariozechner/pi-coding-agent";
8
- import type { Focusable, TUI } from "@mariozechner/pi-tui";
9
- import { matchesKey, truncateToWidth, visibleWidth } from "@mariozechner/pi-tui";
7
+ } from "@earendil-works/pi-coding-agent";
8
+ import type { Focusable, TUI } from "@earendil-works/pi-tui";
9
+ import { matchesKey, truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
10
10
  import type { RetitleCommandOutcome, RetitleMode, RetitleScope } from "./command.js";
11
11
  import {
12
12
  type AutoRetitleStatus,
@@ -1,11 +1,11 @@
1
- import type { Api, Model } from "@mariozechner/pi-ai";
1
+ import type { Api, Model } from "@earendil-works/pi-ai";
2
2
  import type {
3
3
  ExtensionAPI,
4
4
  ExtensionCommandContext,
5
5
  ExtensionContext,
6
6
  SessionStartEvent,
7
7
  TurnEndEvent,
8
- } from "@mariozechner/pi-coding-agent";
8
+ } from "@earendil-works/pi-coding-agent";
9
9
  import {
10
10
  createSessionAutoTitleCommandHandler,
11
11
  getRetitleArgumentCompletions,
@@ -6,14 +6,14 @@ import {
6
6
  type ThinkingContent,
7
7
  type Tool,
8
8
  type ToolCall,
9
- } from "@mariozechner/pi-ai";
10
- import type { ExtensionContext } from "@mariozechner/pi-coding-agent";
9
+ } from "@earendil-works/pi-ai";
10
+ import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
11
11
  import {
12
12
  buildSessionContext,
13
13
  convertToLlm,
14
14
  serializeConversation,
15
- } from "@mariozechner/pi-coding-agent";
16
- import { type Static, Type } from "@sinclair/typebox";
15
+ } from "@earendil-works/pi-coding-agent";
16
+ import { type Static, Type } from "typebox";
17
17
  import { parseTypeBoxValue } from "../shared/typebox.js";
18
18
 
19
19
  const MAX_RELEVANT_FILES = 12;
@@ -1,6 +1,6 @@
1
1
  import { Buffer } from "node:buffer";
2
- import type { CustomEntry, SessionEntry } from "@mariozechner/pi-coding-agent";
3
- import { type Static, Type } from "@sinclair/typebox";
2
+ import type { CustomEntry, SessionEntry } from "@earendil-works/pi-coding-agent";
3
+ import { type Static, Type } from "typebox";
4
4
  import { safeParseTypeBoxValue } from "../shared/typebox.js";
5
5
 
6
6
  export const HANDOFF_METADATA_CUSTOM_TYPE = "pi-sessions.handoff";
@@ -1,4 +1,4 @@
1
- import type { ExtensionContext, KeybindingsManager, Theme } from "@mariozechner/pi-coding-agent";
1
+ import type { ExtensionContext, KeybindingsManager, Theme } from "@earendil-works/pi-coding-agent";
2
2
  import {
3
3
  type Focusable,
4
4
  Input,
@@ -7,7 +7,7 @@ import {
7
7
  type TUI,
8
8
  truncateToWidth,
9
9
  visibleWidth,
10
- } from "@mariozechner/pi-tui";
10
+ } from "@earendil-works/pi-tui";
11
11
  import {
12
12
  stripSearchSnippetMarkers,
13
13
  transformSearchSnippetMatches,
@@ -2,15 +2,15 @@ import type {
2
2
  ExtensionCommandContext,
3
3
  ExtensionUIContext,
4
4
  Theme,
5
- } from "@mariozechner/pi-coding-agent";
6
- import type { Component } from "@mariozechner/pi-tui";
5
+ } from "@earendil-works/pi-coding-agent";
6
+ import type { Component } from "@earendil-works/pi-tui";
7
7
  import {
8
8
  Key,
9
9
  matchesKey,
10
10
  truncateToWidth,
11
11
  visibleWidth,
12
12
  wrapTextWithAnsi,
13
- } from "@mariozechner/pi-tui";
13
+ } from "@earendil-works/pi-tui";
14
14
 
15
15
  const PREVIEW_TIMEOUT_MS = 8_000;
16
16
  const PREVIEW_BODY_LINE_LIMIT = 16;
@@ -6,7 +6,7 @@ import {
6
6
  type ExtensionAPI,
7
7
  type ExtensionCommandContext,
8
8
  type SessionHeader,
9
- } from "@mariozechner/pi-coding-agent";
9
+ } from "@earendil-works/pi-coding-agent";
10
10
  import { HANDOFF_BOOTSTRAP_ENV } from "./metadata.js";
11
11
 
12
12
  const GHOSTTY_MACOS_ONLY_MESSAGE = "Split handoff currently supports Ghostty on macOS only.";
@@ -1,6 +1,6 @@
1
- import type { ExtensionAPI, ExtensionCommandContext } from "@mariozechner/pi-coding-agent";
2
- import { buildSessionContext } from "@mariozechner/pi-coding-agent";
3
- import { Key, matchesKey } from "@mariozechner/pi-tui";
1
+ import type { ExtensionAPI, ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
2
+ import { buildSessionContext } from "@earendil-works/pi-coding-agent";
3
+ import { Key, matchesKey } from "@earendil-works/pi-tui";
4
4
  import { generateHandoffDraft, type HandoffDraftResult } from "./session-handoff/extract.js";
5
5
  import {
6
6
  createHandoffBootstrap,
@@ -1,4 +1,4 @@
1
- import type { ExtensionAPI, ExtensionContext } from "@mariozechner/pi-coding-agent";
1
+ import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
2
2
  import { HANDOFF_BOOTSTRAP_ENV, parseHandoffBootstrap } from "./session-handoff/metadata.js";
3
3
  import { createSessionHookController } from "./session-search/hooks.js";
4
4
  import { loadSettings } from "./shared/settings.js";
@@ -3,8 +3,8 @@ import {
3
3
  type ExtensionAPI,
4
4
  type ExtensionCommandContext,
5
5
  type Theme,
6
- } from "@mariozechner/pi-coding-agent";
7
- import { type Focusable, matchesKey, visibleWidth } from "@mariozechner/pi-tui";
6
+ } from "@earendil-works/pi-coding-agent";
7
+ import { type Focusable, matchesKey, visibleWidth } from "@earendil-works/pi-tui";
8
8
  import { type ReindexResult, rebuildSessionIndex } from "./session-search/reindex.js";
9
9
  import { getIndexStatus, type SessionIndexStatus } from "./shared/session-index/index.js";
10
10
  import { loadSettings } from "./shared/settings.js";
@@ -1,15 +1,15 @@
1
1
  import { existsSync, readdirSync, readFileSync } from "node:fs";
2
2
  import path from "node:path";
3
- import type { AgentMessage } from "@mariozechner/pi-agent-core";
4
- import type { AssistantMessage, ToolCall, ToolResultMessage } from "@mariozechner/pi-ai";
3
+ import type { AgentMessage } from "@earendil-works/pi-agent-core";
4
+ import type { AssistantMessage, ToolCall, ToolResultMessage } from "@earendil-works/pi-ai";
5
5
  import {
6
6
  type CustomEntry,
7
7
  parseSessionEntries,
8
8
  type SessionEntry,
9
9
  type SessionHeader,
10
10
  type SessionMessageEntry,
11
- } from "@mariozechner/pi-coding-agent";
12
- import { Type } from "@sinclair/typebox";
11
+ } from "@earendil-works/pi-coding-agent";
12
+ import { Type } from "typebox";
13
13
  import {
14
14
  HANDOFF_METADATA_CUSTOM_TYPE,
15
15
  type HandoffSessionMetadata,
@@ -1,10 +1,10 @@
1
1
  import { existsSync } from "node:fs";
2
- import type { ImageContent, TextContent } from "@mariozechner/pi-ai";
2
+ import type { ImageContent, TextContent } from "@earendil-works/pi-ai";
3
3
  import {
4
4
  isToolCallEventType,
5
5
  type ToolCallEvent,
6
6
  type ToolResultEvent,
7
- } from "@mariozechner/pi-coding-agent";
7
+ } from "@earendil-works/pi-coding-agent";
8
8
  import {
9
9
  clearSessionIndexedData,
10
10
  getIndexStatus,
@@ -1,5 +1,5 @@
1
1
  import { renameSync } from "node:fs";
2
- import { SessionManager } from "@mariozechner/pi-coding-agent";
2
+ import { SessionManager } from "@earendil-works/pi-coding-agent";
3
3
  import {
4
4
  createTempIndexPath,
5
5
  initializeSchema,
@@ -1,7 +1,7 @@
1
1
  import path from "node:path";
2
- import type { ExtensionAPI, ExtensionContext, Theme } from "@mariozechner/pi-coding-agent";
3
- import { Text } from "@mariozechner/pi-tui";
4
- import { Type } from "@sinclair/typebox";
2
+ import type { ExtensionAPI, ExtensionContext, Theme } from "@earendil-works/pi-coding-agent";
3
+ import { Text } from "@earendil-works/pi-tui";
4
+ import { Type } from "typebox";
5
5
  import {
6
6
  stripSearchSnippetMarkers,
7
7
  transformSearchSnippetMatches,
@@ -1,5 +1,5 @@
1
- import { Type } from "@sinclair/typebox";
2
1
  import type Database from "better-sqlite3";
2
+ import { Type } from "typebox";
3
3
  import type { FileTouchOp, FileTouchSource, PathScope } from "../../session-search/normalize.js";
4
4
  import { safeParseTypeBoxJson } from "../typebox.js";
5
5
 
@@ -1,4 +1,4 @@
1
- import { type Static, Type } from "@sinclair/typebox";
1
+ import { type Static, Type } from "typebox";
2
2
  import { parseTypeBoxRows, parseTypeBoxValue } from "../typebox.js";
3
3
  import {
4
4
  NULLABLE_STRING_SCHEMA,
@@ -1,5 +1,5 @@
1
1
  import path from "node:path";
2
- import { type Static, Type } from "@sinclair/typebox";
2
+ import { type Static, Type } from "typebox";
3
3
  import {
4
4
  type FileTouchOp,
5
5
  matchesRepoRoot,
@@ -1,8 +1,8 @@
1
1
  import os from "node:os";
2
2
  import path from "node:path";
3
- import { SettingsManager } from "@mariozechner/pi-coding-agent";
4
- import type { KeyId } from "@mariozechner/pi-tui";
5
- import { type Static, Type } from "@sinclair/typebox";
3
+ import { SettingsManager } from "@earendil-works/pi-coding-agent";
4
+ import type { KeyId } from "@earendil-works/pi-tui";
5
+ import { type Static, Type } from "typebox";
6
6
  import { parseTypeBoxValue } from "./typebox.js";
7
7
 
8
8
  export const DEFAULT_AUTO_TITLE_REFRESH_TURNS = 4;
@@ -1,5 +1,5 @@
1
- import type { Static, TSchema } from "@sinclair/typebox";
2
- import { Value } from "@sinclair/typebox/value";
1
+ import type { Static, TSchema } from "typebox";
2
+ import { Value } from "typebox/value";
3
3
 
4
4
  export function isTypeBoxValue<T extends TSchema>(schema: T, value: unknown): value is Static<T> {
5
5
  return Value.Check(schema, value);
@@ -51,11 +51,11 @@ export function safeParseTypeBoxJson<T extends TSchema>(
51
51
  }
52
52
 
53
53
  function formatTypeBoxError(schema: TSchema, value: unknown, context: string): string {
54
- const firstError = Value.Errors(schema, value).First();
54
+ const firstError = Value.Errors(schema, value)[0];
55
55
  if (!firstError) {
56
56
  return `${context}: invalid value.`;
57
57
  }
58
58
 
59
- const path = firstError.path.length > 0 ? firstError.path : "/";
59
+ const path = firstError.instancePath.length > 0 ? firstError.instancePath : "/";
60
60
  return `${context}: ${path} ${firstError.message}`;
61
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-sessions",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "type": "module",
5
5
  "description": "Pi session search, ask, handoff, auto-titling, and indexing tools",
6
6
  "license": "MIT",
@@ -15,6 +15,9 @@
15
15
  "keywords": [
16
16
  "pi-package"
17
17
  ],
18
+ "engines": {
19
+ "node": ">=20 <26"
20
+ },
18
21
  "files": [
19
22
  "extensions",
20
23
  "images"
@@ -38,23 +41,25 @@
38
41
  "prepare": "husky"
39
42
  },
40
43
  "devDependencies": {
41
- "@biomejs/biome": "^2.4.12",
42
- "@mariozechner/pi-ai": "^0.70.2",
43
- "@mariozechner/pi-coding-agent": "^0.70.2",
44
- "@mariozechner/pi-tui": "^0.70.2",
45
- "@sinclair/typebox": "^0.34.49",
44
+ "@biomejs/biome": "^2.4.14",
45
+ "@earendil-works/pi-agent-core": "^0.74.0",
46
+ "@earendil-works/pi-ai": "^0.74.0",
47
+ "@earendil-works/pi-coding-agent": "^0.74.0",
48
+ "@earendil-works/pi-tui": "^0.74.0",
46
49
  "@types/better-sqlite3": "^7.6.13",
47
- "@types/node": "^25.6.0",
50
+ "@types/node": "^25.6.2",
48
51
  "husky": "^9.1.7",
49
- "lint-staged": "^16.4.0",
52
+ "lint-staged": "^17.0.3",
53
+ "typebox": "^1.1.38",
50
54
  "typescript": "^6.0.3",
51
- "vitest": "^4.1.4"
55
+ "vitest": "^4.1.5"
52
56
  },
53
57
  "peerDependencies": {
54
- "@mariozechner/pi-ai": ">=0.70.2",
55
- "@mariozechner/pi-coding-agent": ">=0.70.2",
56
- "@mariozechner/pi-tui": ">=0.70.2",
57
- "@sinclair/typebox": ">=0.34.41"
58
+ "@earendil-works/pi-agent-core": ">=0.74.0",
59
+ "@earendil-works/pi-ai": ">=0.74.0",
60
+ "@earendil-works/pi-coding-agent": ">=0.74.0",
61
+ "@earendil-works/pi-tui": ">=0.74.0",
62
+ "typebox": ">=1.1.24"
58
63
  },
59
64
  "lint-staged": {
60
65
  "*.{js,cjs,mjs,jsx,ts,tsx,json,jsonc}": "biome check --write --no-errors-on-unmatched"