Skip to content
プロジェクト

概要

Pluggable extension packages for the Pi AI-agent runtime. Each package exposes LLM-callable tools via MCP — covering IM workspace integrations (Lark, DingTalk, WeCom), browser & computer automation, persistent memory, telemetry, task scheduling, image generation, web access, security policies, and more.

デザイン・メディア

この数値の測り方

計測したスター増加

24時間
0
7日間
0
15日間
+4
1か月
+5

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

Pi

Pi packages preview

Shared TypeScript packages for Pi runtime applications.

On Pi 0.99+, video, teamwork, curated memory, Mem0, and scheduler tools expose bounded structured results for codemode scripts. Scripts can consume IDs, complete memory entries/task prompts, media paths, and available QC metadata directly; see the corresponding package READMEs for result contracts.

This repository contains the open-source runtime contracts, adapters, and orchestration helpers that are consumed by Pi Agent and related applications. The packages are intentionally small and composable: host applications provide HTTP routing, authentication, model runtime setup, deployment configuration, and product-specific UI.

Packages

Category Package Purpose
Core @amaster.ai/pi-shared Shared runtime types and contracts: settings loader, session/event/artifact types, turn and subagent types.
Core @amaster.ai/pi-storage JSON-file and MySQL/Prisma persistence adapters for sessions, transcripts, events, memory, artifacts, subagents, and scheduled tasks.
Extension @amaster.ai/pi-attachments Attachment normalization, local/remote upload handling, document parsing, and model-readable attachment prompts.
Extension @amaster.ai/pi-telemetry Runtime traces, TTFT, token/cost accounting and diagnostics with Langfuse, Arize Phoenix and OpenTelemetry exporters.
Extension @amaster.ai/pi-task-scheduler Cron-based scheduled task management with LLM-callable tools.
Extension @amaster.ai/pi-goal Derives a goal from the conversation and keeps the agent working until the condition is met, with iteration/token backstops.
Extension @amaster.ai/pi-browser-use Browser automation via chrome-devtools-mcp, with opt-in live-session retention and cloud lifecycle adapters.
Extension @amaster.ai/pi-web-access Web search (including Cloudflare), URL content extraction, and image search across configurable providers.
Extension @amaster.ai/pi-computer-use Cross-platform computer-use tools for desktop automation.
Extension @amaster.ai/pi-channels Native messaging channels: Feishu, WeCom, and webhooks.
Extension @amaster.ai/pi-memory Persistent curated memory (MEMORY.md + USER.md) injected into the system prompt as a snapshot frozen between compactions.
Extension @amaster.ai/pi-security Resource-aware security policy engine and tool authorization.
Extension @amaster.ai/pi-teamwork Team collaboration and issue management via Multica.
Extension @amaster.ai/pi-image-gen Image generation via OpenAI gpt-image, Google Nano Banana, Alibaba Qwen-Image, OpenRouter, and custom providers.
Extension @amaster.ai/pi-video-gen Direct video-model clips, mixed-shot batch rendering with recovery, and local concat, FFmpeg timeline or editable HyperFrames (default) / Remotion composition. Includes subtitles, QC and bundled FFmpeg runtimes.
Extension @amaster.ai/pi-lark Lark/Feishu workspace integration through lark-cli, including calendar, docs, drive, sheets, Base, tasks, mail, wiki, and IM skills.
Extension @amaster.ai/pi-wecom WeCom workspace integration through wecom-cli, including contacts, messages, meetings, schedules, todos, docs, and smart sheets.
Extension @amaster.ai/pi-dingtalk DingTalk workspace integration through dws CLI, including calendar, docs, chat, todos, sheets, AI tables, approvals, mail, wiki, and meeting minutes.

Core packages provide types and persistence used by every host application. Extension packages declare their Pi runtime entry point in the pi.extensions field of package.json, and Pi loads it from there.

Every package is ESM-only and published under the @amaster.ai npm scope.

Extension Previews

@amaster.ai/pi-attachments
pi-attachments preview
@amaster.ai/pi-telemetry
pi-telemetry preview
@amaster.ai/pi-task-scheduler
pi-task-scheduler preview
@amaster.ai/pi-browser-use
pi-browser-use preview
@amaster.ai/pi-computer-use
pi-computer-use preview
@amaster.ai/pi-channels
pi-channels preview
@amaster.ai/pi-memory
pi-memory preview
@amaster.ai/pi-security
pi-security preview
@amaster.ai/pi-teamwork
pi-teamwork preview
@amaster.ai/pi-image-gen
pi-image-gen preview
@amaster.ai/pi-web-access
pi-web-access preview
@amaster.ai/pi-memory-mem0
pi-memory-mem0 preview
@amaster.ai/pi-lark
pi-lark preview
@amaster.ai/pi-wecom
pi-wecom preview
@amaster.ai/pi-dingtalk
pi-dingtalk preview
@amaster.ai/pi-goal
pi-goal preview
@amaster.ai/pi-video-gen
pi-video-gen preview

Requirements

  • Node.js >=24
  • pnpm 10.18.3

Use Corepack when possible:

corepack enable
corepack install -g [email protected]

Development

Install dependencies:

pnpm install

Run the full local check:

pnpm run pr-check

Common commands:

pnpm build
pnpm typecheck
pnpm test
pnpm --filter @amaster.ai/pi-storage prisma:generate

@amaster.ai/pi-storage includes a Prisma schema at packages/storage/prisma/schema.prisma. The root build and typecheck scripts generate the Prisma client before compiling project references.

Consuming Packages

Install only the packages your application needs:

pnpm add @amaster.ai/pi-shared @amaster.ai/pi-storage

Most packages expose a root entry point. Some packages also expose focused subpath entry points:

import { createRuntimeStorage } from "@amaster.ai/pi-storage";
import { JsonRuntimeStorage } from "@amaster.ai/pi-storage/json";
import { loadPiSettings } from "@amaster.ai/pi-shared/settings";
import { createLangfuseExporter } from "@amaster.ai/pi-telemetry/langfuse";
import { createOtelExporter, createPhoenixExporter } from "@amaster.ai/pi-telemetry/otel";
import memoryExtension from "@amaster.ai/pi-memory/extension";

Pi loads an extension package from the entry declared in its package.json pi.extensions field. Host applications that import an extension directly can use the package's default export; pi-goal, pi-memory, pi-security, pi-task-scheduler, and pi-telemetry also expose it as an ./extension subpath.

See each package README for package-specific examples and public API notes.

Tool error migration

Structured plugin failures now expose error.code for handling and error.message for display. During an upgrade, scripts that may call both versions can read the message with typeof result.error === 'string' ? result.error : result.error?.message. Causes and recovery guidance are present when the tool has verified, actionable information.

On Pi before 0.99, tool execution throws a sanitized exception so the host records the call as failed and exposes the error text to the agent. On Pi 0.99 and newer, tool execution failures carry isError: true and the structured error object. Policy denials before execution expose formatted text through the Pi hook.

DeepSeek Harness

Compatibility depends on the host, DSH, Pi, and extension versions. Follow the selected host's documentation for installation and current support.

Host Loading model
pi2dsh Discovers explicitly installed Pi packages in a DSH profile.
dsh-pi-host Loads package names configured in its extensions list.

License

Apache-2.0

関連プロジェクトを探す

読み込み中…