@oyasmi/pipiclaw 0.9.6-beta.1 → 0.9.6-beta.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.
- package/README.en.md +279 -215
- package/README.md +274 -213
- package/dist/agent/builtin-commands.d.ts +1 -1
- package/dist/agent/builtin-commands.js +1 -1
- package/dist/agent/channel-runner.d.ts +3 -2
- package/dist/agent/channel-runner.js +16 -27
- package/dist/agent/maintenance-context.js +2 -2
- package/dist/agent/prompt/builder.d.ts +1 -1
- package/dist/agent/prompt/builder.js +1 -1
- package/dist/agent/prompt/extension.d.ts +1 -1
- package/dist/agent/prompt/extension.js +1 -1
- package/dist/agent/prompt/manifest.d.ts +6 -1
- package/dist/agent/prompt/manifest.js +12 -5
- package/dist/agent/prompt/resources.d.ts +0 -3
- package/dist/agent/prompt/resources.js +0 -6
- package/dist/agent/prompt/sections.d.ts +2 -2
- package/dist/agent/prompt/sections.js +36 -26
- package/dist/agent/prompt/types.d.ts +1 -1
- package/dist/agent/runner-factory.js +1 -1
- package/dist/agent/session/command-extension.js +3 -1
- package/dist/agent/session/compaction-summary.js +3 -6
- package/dist/agent/session/event-guards.d.ts +2 -1
- package/dist/agent/session/event-guards.js +6 -0
- package/dist/agent/session/model-selection.d.ts +2 -1
- package/dist/agent/session/model-selection.js +5 -5
- package/dist/agent/session/session-events.js +31 -4
- package/dist/agent/session/session-host.d.ts +4 -2
- package/dist/agent/session/session-host.js +17 -15
- package/dist/agent/status-render.js +3 -0
- package/dist/agent/turn/task-digest.d.ts +2 -5
- package/dist/agent/turn/task-digest.js +25 -45
- package/dist/agent/turn/turn-context.js +4 -6
- package/dist/agent/turn/turn-error.d.ts +1 -1
- package/dist/agent/turn/turn-error.js +9 -0
- package/dist/agent/turn/turn-pipeline.d.ts +10 -5
- package/dist/agent/turn/turn-pipeline.js +36 -7
- package/dist/agent/turn/turn-prompt.d.ts +2 -0
- package/dist/agent/turn/turn-prompt.js +2 -1
- package/dist/agent/turn/turn-recovery.js +4 -1
- package/dist/agent/types.d.ts +20 -2
- package/dist/agent/types.js +2 -0
- package/dist/app/auth-command.d.ts +25 -0
- package/dist/app/auth-command.js +200 -67
- package/dist/app/home.d.ts +7 -8
- package/dist/app/home.js +143 -56
- package/dist/channel/channel-context.d.ts +6 -0
- package/dist/channel/config.d.ts +3 -0
- package/dist/channel/config.js +11 -5
- package/dist/commands/catalog.js +22 -6
- package/dist/desk/commands.d.ts +31 -4
- package/dist/desk/commands.js +101 -15
- package/dist/desk/paths.d.ts +6 -0
- package/dist/desk/paths.js +21 -1
- package/dist/desk/registry.d.ts +11 -0
- package/dist/desk/registry.js +53 -9
- package/dist/desk/types.d.ts +66 -1
- package/dist/dingtalk/config.js +10 -10
- package/dist/dingtalk/delivery.js +2 -0
- package/dist/dingtalk/inbound.js +2 -3
- package/dist/events/watcher.d.ts +1 -1
- package/dist/events/watcher.js +2 -2
- package/dist/main.js +15 -3
- package/dist/memory/boundary-work.d.ts +2 -1
- package/dist/memory/boundary-work.js +1 -1
- package/dist/memory/lifecycle.d.ts +2 -1
- package/dist/memory/lifecycle.js +2 -2
- package/dist/memory/reflect-job.d.ts +2 -1
- package/dist/memory/reflect-job.js +1 -1
- package/dist/memory/reflect.d.ts +2 -1
- package/dist/memory/reflect.js +2 -1
- package/dist/memory/scheduler.d.ts +2 -1
- package/dist/memory/scheduler.js +1 -1
- package/dist/memory/session-corpus.js +7 -1
- package/dist/memory/session-search.d.ts +2 -1
- package/dist/memory/session-search.js +1 -1
- package/dist/memory/sidecar-worker.d.ts +2 -1
- package/dist/memory/sidecar-worker.js +2 -4
- package/dist/models/credential-work.d.ts +7 -0
- package/dist/models/credential-work.js +36 -0
- package/dist/models/login-ui.js +4 -4
- package/dist/models/provider-login.js +7 -6
- package/dist/models/requests.d.ts +8 -0
- package/dist/models/requests.js +69 -0
- package/dist/models/runtime.d.ts +3 -1
- package/dist/models/runtime.js +9 -2
- package/dist/playbooks/agent-delegation.md +19 -45
- package/dist/playbooks/background-jobs.md +1 -1
- package/dist/playbooks/catalog.js +1 -1
- package/dist/playbooks/delegation-inline.md +25 -0
- package/dist/playbooks/delegation-recovery.md +28 -0
- package/dist/playbooks/event-scheduling.md +18 -37
- package/dist/playbooks/event-sensors.md +26 -0
- package/dist/playbooks/event-task-template.md +22 -0
- package/dist/playbooks/learning-and-skills.md +26 -0
- package/dist/playbooks/memory-operations.md +36 -0
- package/dist/playbooks/outbound-media.md +2 -2
- package/dist/playbooks/runtime-files.md +29 -0
- package/dist/playbooks/runtime-operations.md +25 -0
- package/dist/playbooks/runtime-orientation.md +18 -53
- package/dist/playbooks/task-lead.md +22 -68
- package/dist/playbooks/task-manage.md +38 -0
- package/dist/playbooks/task-recovery.md +24 -0
- package/dist/playbooks/task-verify.md +22 -0
- package/dist/runtime/bootstrap.d.ts +4 -0
- package/dist/runtime/bootstrap.js +82 -22
- package/dist/runtime/daemon-lock.js +3 -3
- package/dist/runtime/desk-runtime.d.ts +33 -6
- package/dist/runtime/desk-runtime.js +302 -47
- package/dist/runtime/ingress-commands.js +24 -4
- package/dist/runtime/shutdown.d.ts +3 -1
- package/dist/runtime/shutdown.js +1 -0
- package/dist/runtime/task-close.d.ts +1 -1
- package/dist/runtime/task-close.js +6 -3
- package/dist/runtime/task-control.d.ts +1 -3
- package/dist/runtime/task-control.js +15 -11
- package/dist/runtime/task-input.js +1 -1
- package/dist/runtime/task-lane-types.d.ts +12 -2
- package/dist/runtime/task-lane-types.js +9 -0
- package/dist/runtime/task-lane.d.ts +1 -0
- package/dist/runtime/task-lane.js +17 -14
- package/dist/runtime/task-step.d.ts +3 -3
- package/dist/runtime/task-step.js +23 -14
- package/dist/runtime/transports.js +6 -5
- package/dist/security/command-guard.js +23 -1
- package/dist/subagents/commands.js +14 -5
- package/dist/subagents/completion-wake.js +6 -0
- package/dist/subagents/dispatch.js +20 -18
- package/dist/subagents/external/dispatch.js +20 -14
- package/dist/subagents/external/run.js +10 -20
- package/dist/subagents/external/settlement.js +5 -1
- package/dist/subagents/internal/outcome.js +19 -12
- package/dist/subagents/internal/provider-retry.js +1 -3
- package/dist/subagents/internal/run.d.ts +1 -1
- package/dist/subagents/internal/run.js +27 -4
- package/dist/subagents/internal/state.d.ts +1 -3
- package/dist/subagents/internal/state.js +1 -2
- package/dist/subagents/internal/worker.js +17 -9
- package/dist/subagents/result.d.ts +5 -2
- package/dist/subagents/result.js +35 -6
- package/dist/subagents/run-record.d.ts +21 -0
- package/dist/subagents/run-record.js +5 -0
- package/dist/subagents/runs.d.ts +4 -7
- package/dist/subagents/runs.js +24 -35
- package/dist/subagents/task-envelope.js +5 -0
- package/dist/subagents/task-settlement.js +1 -0
- package/dist/subagents/types.d.ts +14 -4
- package/dist/subagents/workspace-lease.d.ts +37 -10
- package/dist/subagents/workspace-lease.js +121 -13
- package/dist/subagents/worktree.d.ts +47 -5
- package/dist/subagents/worktree.js +316 -30
- package/dist/tasks/brief.d.ts +5 -1
- package/dist/tasks/brief.js +19 -5
- package/dist/tasks/commands.d.ts +3 -1
- package/dist/tasks/commands.js +17 -6
- package/dist/tasks/control.d.ts +9 -0
- package/dist/tasks/loop-log.d.ts +10 -0
- package/dist/tasks/loop-log.js +1 -1
- package/dist/tasks/receipts.d.ts +7 -3
- package/dist/tasks/receipts.js +34 -5
- package/dist/tools/bash.d.ts +3 -0
- package/dist/tools/bash.js +27 -15
- package/dist/tools/contract/presentation.js +4 -1
- package/dist/tools/edit-diff.d.ts +11 -0
- package/dist/tools/edit-diff.js +148 -0
- package/dist/tools/edit-match.d.ts +18 -0
- package/dist/tools/edit-match.js +242 -0
- package/dist/tools/edit.d.ts +10 -2
- package/dist/tools/edit.js +91 -361
- package/dist/tools/event-manage.d.ts +1 -2
- package/dist/tools/event-manage.js +27 -38
- package/dist/tools/file-observations.d.ts +9 -0
- package/dist/tools/file-observations.js +50 -0
- package/dist/tools/glob-match.d.ts +3 -1
- package/dist/tools/glob-match.js +40 -17
- package/dist/tools/glob.d.ts +1 -0
- package/dist/tools/glob.js +39 -19
- package/dist/tools/grep-command.d.ts +13 -0
- package/dist/tools/grep-command.js +77 -0
- package/dist/tools/grep.js +96 -201
- package/dist/tools/index.d.ts +4 -1
- package/dist/tools/index.js +7 -4
- package/dist/tools/job.js +12 -11
- package/dist/tools/read.d.ts +2 -0
- package/dist/tools/read.js +10 -2
- package/dist/tools/registry.d.ts +16 -11
- package/dist/tools/registry.js +29 -11
- package/dist/tools/session-search.d.ts +2 -1
- package/dist/tools/session-search.js +14 -4
- package/dist/tools/skill.js +13 -12
- package/dist/tools/subagent-manage.js +10 -3
- package/dist/tools/subagent.d.ts +22 -2
- package/dist/tools/subagent.js +19 -18
- package/dist/tools/task-manage/control-tools.js +1 -1
- package/dist/tools/task-manage/factory.d.ts +2 -2
- package/dist/tools/task-manage/factory.js +39 -3
- package/dist/tools/task-manage/lifecycle.d.ts +2 -2
- package/dist/tools/task-manage/lifecycle.js +7 -4
- package/dist/tools/task-manage/shared.d.ts +1 -1
- package/dist/tools/task-manage/types.d.ts +1 -0
- package/dist/tools/write-content.d.ts +7 -1
- package/dist/tools/write-content.js +18 -6
- package/dist/tools/write.d.ts +3 -0
- package/dist/tools/write.js +6 -2
- package/dist/tui/cli.d.ts +5 -0
- package/dist/tui/cli.js +97 -31
- package/dist/tui/client.d.ts +5 -0
- package/dist/tui/client.js +63 -21
- package/dist/tui/frontend.d.ts +2 -0
- package/dist/tui/pitui-frontend.d.ts +4 -0
- package/dist/tui/pitui-frontend.js +27 -0
- package/dist/tui/render.d.ts +1 -0
- package/dist/tui/render.js +5 -0
- package/dist/tui/session.js +6 -0
- package/dist/web/client.d.ts +1 -0
- package/dist/web/client.js +11 -0
- package/dist/web/fetch.js +6 -3
- package/dist/webapi/auth.d.ts +0 -3
- package/dist/webapi/auth.js +3 -7
- package/dist/webapi/config.js +17 -14
- package/dist/webapi/key-command.js +41 -41
- package/dist/webapi/response-state.d.ts +7 -1
- package/dist/webapi/response-state.js +166 -3
- package/dist/webapi/routes/websocket.js +24 -1
- package/dist/webapi/server.d.ts +3 -1
- package/dist/webapi/server.js +32 -1
- package/dist/webapi/service.js +8 -0
- package/dist/webapi/transport.d.ts +2 -0
- package/dist/webapi/transport.js +11 -1
- package/examples/sub-agents/README.md +9 -7
- package/examples/sub-agents/agy-main.md +21 -0
- package/examples/sub-agents/claude-high.md +21 -0
- package/examples/sub-agents/claude-main.md +21 -0
- package/examples/sub-agents/codex-flash.md +21 -0
- package/examples/sub-agents/codex-high.md +21 -0
- package/examples/sub-agents/codex-main.md +21 -0
- package/examples/sub-agents/codex-review.md +20 -0
- package/examples/sub-agents/cursor-high.md +20 -0
- package/examples/sub-agents/cursor-main.md +20 -0
- package/examples/sub-agents/glm-flash.md +21 -0
- package/examples/sub-agents/glm-high.md +21 -0
- package/examples/sub-agents/pi-scout.md +20 -0
- package/package.json +8 -9
- package/dist/agent/session/request-tools.d.ts +0 -3
- package/dist/agent/session/request-tools.js +0 -20
- package/dist/models/api-keys.d.ts +0 -11
- package/dist/models/api-keys.js +0 -22
- package/dist/playbooks/memory-and-learning.md +0 -55
- package/examples/sub-agents/agents/agy-main.md +0 -23
- package/examples/sub-agents/agents/claude-high.md +0 -23
- package/examples/sub-agents/agents/claude-main.md +0 -23
- package/examples/sub-agents/agents/codex-flash.md +0 -23
- package/examples/sub-agents/agents/codex-high.md +0 -23
- package/examples/sub-agents/agents/codex-main.md +0 -23
- package/examples/sub-agents/agents/codex-review.md +0 -23
- package/examples/sub-agents/agents/cursor-high.md +0 -22
- package/examples/sub-agents/agents/cursor-main.md +0 -22
- package/examples/sub-agents/agents/glm-flash.md +0 -23
- package/examples/sub-agents/agents/glm-high.md +0 -23
package/README.en.md
CHANGED
|
@@ -1,345 +1,409 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# Pipiclaw
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
<a href="./README.md">简体中文</a> | <strong>English</strong>
|
|
5
|
-
</p>
|
|
5
|
+
**Your Always-On Personal AI Engineering Assistant in DingTalk & the Terminal**
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<
|
|
11
|
-
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0-orange" alt="License: AGPL v3"></a>
|
|
7
|
+
Hand off a goal from your phone — Pipiclaw remembers your project conventions, orchestrates your models and coding agents in the background, and comes back with verified deliverables.
|
|
8
|
+
|
|
9
|
+
<p>
|
|
10
|
+
<a href="./README.md">简体中文</a> · <strong>English</strong> · <a href="https://github.com/oyasmi/pipiclaw/blob/master/docs/README.md">Documentation</a>
|
|
12
11
|
</p>
|
|
13
12
|
|
|
14
|
-
>
|
|
13
|
+
<p>
|
|
14
|
+
<a href="https://www.npmjs.com/package/@oyasmi/pipiclaw"><img src="https://img.shields.io/npm/v/@oyasmi/pipiclaw?color=2563eb&label=npm" alt="npm version"></a>
|
|
15
|
+
<a href="https://github.com/oyasmi/pipiclaw/actions/workflows/ci.yml"><img src="https://github.com/oyasmi/pipiclaw/actions/workflows/ci.yml/badge.svg?branch=master" alt="CI status"></a>
|
|
16
|
+
<img src="https://img.shields.io/badge/node-%3E%3D22.19.0-16a34a" alt="Node.js >= 22.19.0">
|
|
17
|
+
<img src="https://img.shields.io/badge/platform-Linux%20%7C%20macOS%20%7C%20WSL2-64748b" alt="Platform">
|
|
18
|
+
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0-ea580c" alt="License: AGPL v3"></a>
|
|
19
|
+
</p>
|
|
15
20
|
|
|
16
|
-
**Pipiclaw
|
|
21
|
+
**[Why Pipiclaw](#why-pipiclaw) · [In Action](#see-it-in-action) · [Quick Start](#quick-start) · [Core Capabilities](#core-capabilities) · [Slash Commands](#common-commands) · [FAQ](#faq) · [Docs](#documentation)**
|
|
17
22
|
|
|
18
|
-
|
|
23
|
+
</div>
|
|
19
24
|
|
|
20
25
|
---
|
|
21
26
|
|
|
22
|
-
##
|
|
23
|
-
|
|
24
|
-
### 🚀 1. Work Keeps Moving When You Walk Away: Task Lane & Scheduled Events
|
|
25
|
-
|
|
26
|
-
Traditional CLI coding agents stop the moment you close the terminal or end a chat. Pipiclaw decouples long-horizon engineering work from ephemeral conversations:
|
|
27
|
-
|
|
28
|
-
- **Background Task Lane**: Multi-step, multi-hour projects advance in a dedicated background task lane **without blocking your chat**. Each task is backed by a human-readable Markdown **task spec** (goal, Definition of Done checklist, **work items**) and an append-only JSONL **task log** (steps, delegations, settlements). Task states are derived deterministically by the runtime from observed facts — never stuck in a hallucinated "waiting" state.
|
|
29
|
-
- **Scheduled Events & Zero-Token Sensors**: Trigger `one-shot` reminders or `periodic` (Cron) workflows. Run local `preAction` gate scripts as **zero-token conditional sensors**, or spawn fresh, isolated task instances from event templates (e.g., daily repo inspections or weekly release digests) with automatic overlap protection.
|
|
30
|
-
- **Deterministic Budgets & Circuit Breakers**: Built-in step and USD budgets, idle-loop detection, per-step timeouts, and consecutive-error guards pause runaway work automatically and notify you.
|
|
27
|
+
## Why Pipiclaw
|
|
31
28
|
|
|
32
|
-
|
|
29
|
+
Even if you already pay for **Claude Code**, **Codex CLI**, **Cursor**, and top LLM APIs, three everyday friction points slow down real engineering work:
|
|
33
30
|
|
|
34
|
-
|
|
31
|
+
1. **Work stops when you step away**: Terminal coding agents are tied to an open window — step out for a meeting or commute, and you lose visibility and momentum.
|
|
32
|
+
2. **Copy-pasting across isolated tools**: You triage logs in one tab, implement in Claude Code, and run a review in Codex — acting as the human glue copying context back and forth.
|
|
33
|
+
3. **Repeating project context every session**: Every fresh chat forgets your repo layout, deployment rules, and personal conventions unless you repeat them.
|
|
35
34
|
|
|
36
|
-
- **
|
|
37
|
-
- **Heavyweight External Harnesses (`external`)**: Launch real **Claude Code**, **Codex CLI**, **Cursor CLI**, **Antigravity CLI (`agy`)**, GLM wrapper scripts, or custom shell commands to tackle multi-file implementations, write and run tests, and iterate autonomously.
|
|
38
|
-
- **Async Wakeup, Session Continuation & Independent Verification**: External runs execute in the background (with records and managed artifacts retained for 30 days) and automatically wake the originating channel upon completion. You can ask follow-up questions on finished external sessions, or dispatch CLI-enforced read-only agents (such as `codex-review`) for independent verification (`purpose: verify`).
|
|
35
|
+
**Pipiclaw turns your existing models and coding CLIs into one cohesive, always-reachable assistant.** Running on your dev machine or server, it connects directly to **DingTalk** (with zero public IP setup), an interactive **Terminal UI**, and an **OpenAI-compatible Web API** — remembering your conventions, advancing long tasks in the background, and delivering verified results wherever you are.
|
|
39
36
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
- **
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
- **Shared by Default, Isolated on Demand**: Your terminal, DingTalk DMs, and group chats bind to the `default` desk out of the box — sharing long-term memory, daily journals, tasks, and working files with zero setup. When you want to separate projects or contexts, create an isolated desk with `/desk new <name>`.
|
|
49
|
-
- **Three-Layer Transparent Memory (No Keyword Guessing)**:
|
|
50
|
-
- **Desk Memory (`memory/*.md`)**: One durable fact per file with an auto-generated `MEMORY.md` index injected in full at session start — the model sees all your conventions up front without fragile RAG keyword matching.
|
|
51
|
-
- **Daily Journal (`journal/YYYY-MM-DD.md`)**: Day-by-day working notes written by the background reflect pass, keeping temporary progress out of permanent rules.
|
|
52
|
-
- **Automatic Reflection & Probation**: Automatically consolidates memory before context compaction, on `/new`, on shutdown, or during idle windows. Newly inferred facts enter a 30-day **probation period** before promotion; `/memory forget` leaves a hash tombstone so background reflection never resurrects forgotten items. Idle checks pass through a local deterministic gate first — **burning zero tokens when idle**.
|
|
53
|
-
|
|
54
|
-
### 🛡️ 5. Autonomous Yet Instantly Interruptible: Deterministic Control Plane & Local Ownership
|
|
55
|
-
|
|
56
|
-
- **LLM-Free Control Plane**: `/help`, `/stop`, `/steer`, `/followup`, `/tasks`, `/subagents`, `/events`, `/desk`, `/status`, `/usage`, and `/context` are handled directly by the runtime. **Even if a model provider is down or a turn is stuck**, you can still inspect state, pause tasks, or kill external processes (`/subagents cancel`) immediately.
|
|
57
|
-
- **Your Config, Your Plain-Text Data**: Works with built-in providers, OpenAI-compatible gateways, API keys, and subscription logins (`pipiclaw auth login`). Every memory, task, role, event, and audit log lives as human-readable Markdown, JSON, or JSONL under `~/.pipiclaw/`, protected by command, path, and network guards.
|
|
37
|
+
| What You Care About | Typical Chatbots | Standalone Coding CLIs | **Pipiclaw** |
|
|
38
|
+
|---|---|---|---|
|
|
39
|
+
| **Reachable Anywhere** | Mobile-friendly, but blind to your local repo & tools | Full local power, but chained to your laptop screen | **DingTalk DM/Group + Terminal + OpenAI SDK on one brain** |
|
|
40
|
+
| **Multi-Hour Work** | Times out after one reply | Blocks your terminal; dies if disconnected | **Dedicated background tasks that run without blocking chat** |
|
|
41
|
+
| **Multi-Agent Synergy** | Locked to a single model | Separate tabs & manual context handoffs | **Orchestrates built-in models + Claude / Codex / Cursor / Antigravity** |
|
|
42
|
+
| **Persistent Memory** | Ephemeral chats or brittle keyword search | Static rule files only | **Auto-curated long-term memory + daily journals you can inspect or delete** |
|
|
43
|
+
| **Instant Human Control** | Wait until generation finishes | `Ctrl-C` at your keyboard | **Instant `/stop`, mid-turn `/steer`, task pause, or process kill from phone/CLI** |
|
|
58
44
|
|
|
59
45
|
---
|
|
60
46
|
|
|
61
|
-
##
|
|
47
|
+
## See It in Action
|
|
62
48
|
|
|
63
|
-
|
|
64
|
-
flowchart LR
|
|
65
|
-
subgraph Entries["Entry Surfaces (Channels)"]
|
|
66
|
-
DT["📱 DingTalk DM / Group<br/>(Stream Mode + AI Card)"]
|
|
67
|
-
TUI["💻 Terminal UI<br/>(pipiclaw tui)"]
|
|
68
|
-
API["🔌 Scripts & Clients<br/>(OpenAI SDK / Web API)"]
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
subgraph Runtime["Pipiclaw Runtime (Daemon)"]
|
|
72
|
-
CP["⚡ Deterministic Control Plane<br/>(/stop /steer /tasks /subagents ...)"]
|
|
73
|
-
CR["🧭 Channel Runner & Session Host<br/>(Serial per channel · Parallel across channels)"]
|
|
74
|
-
TL["🛤️ Background Task Lane<br/>(Independent execution · Budget & timeout guards)"]
|
|
75
|
-
EV["⏰ Scheduled Events & Sensors<br/>(Cron / One-shot / preAction)"]
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
subgraph Desk["Desk Context (default / custom)"]
|
|
79
|
-
MEM["🧠 Layered Memory & Journal<br/>(memory/*.md · journal/)"]
|
|
80
|
-
TSK["📋 Task Specs & Logs<br/>(tasks/<id>.md · <id>.jsonl)"]
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
subgraph Executors["Executors & Guards"]
|
|
84
|
-
INT["🔍 Built-in Tools & Internal Sub-Agents<br/>(Command / Path / Network Guards)"]
|
|
85
|
-
EXT["🛠️ External Coding Agents<br/>Claude Code · Codex · Cursor · Antigravity"]
|
|
86
|
-
end
|
|
49
|
+
Here is what a typical workflow looks like once Pipiclaw is running on your workstation:
|
|
87
50
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
51
|
+
```text
|
|
52
|
+
09:15 [On your commute · DingTalk DM]
|
|
53
|
+
You ──▶ "Switch the user export endpoint to streaming, add large-file unit tests, and have
|
|
54
|
+
codex-review independently check the diff before sending me the result."
|
|
55
|
+
|
|
56
|
+
09:16 [Background task starts · Chat stays free]
|
|
57
|
+
Bot ──▶ Creates a background task, breaks down work items, and launches local claude-main
|
|
58
|
+
to implement and run tests.
|
|
59
|
+
(Meanwhile, you can keep chatting in the exact same window about other issues.)
|
|
60
|
+
|
|
61
|
+
09:32 [Steer anytime]
|
|
62
|
+
You ──▶ Check progress with "/tasks", then send:
|
|
63
|
+
"/tasks msg export-stream Make sure CSV exports preserve UTF-8 BOM compatibility"
|
|
64
|
+
|
|
65
|
+
09:48 [Independent verification & mobile delivery]
|
|
66
|
+
Bot ──▶ claude-main passes tests → dispatches read-only codex-review to audit the diff →
|
|
67
|
+
pushes a clean summary, test proof, and benchmark CSV straight to your DingTalk app.
|
|
93
68
|
```
|
|
94
69
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
| Concept | What It Is | Problem It Solves |
|
|
98
|
-
|---|---|---|
|
|
99
|
-
| **Channel** | A DingTalk DM, DingTalk group, or Web API / TUI conversation | Keeps each conversation history separate while acting as your remote control to assign, inspect, and steer work |
|
|
100
|
-
| **Desk** | A named work context (`default` built-in, custom desks on demand) | Owns the long-term memory, daily journal, tasks, scheduled events, and working directory for a body of work |
|
|
101
|
-
| **Task** | A one-off project running in the background task lane (`.md` spec + `.jsonl` log) | Advances multi-step, multi-hour deliverables independently of chat and survives restarts |
|
|
102
|
-
| **Event** | A `one-shot` or `periodic` (Cron) trigger with optional `preAction` or task template | Answers *"when to wake up"* — driving reminders, zero-token checks, and recurring task instances |
|
|
103
|
-
| **Sub-Agent** | An in-process lightweight role (`internal`) or external CLI process (`external`) | Answers *"who executes this step"* — uniting your subscriptions and external coding CLIs under one workflow |
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## Use Cases
|
|
108
|
-
|
|
109
|
-
- **📱 Mobile Engineering Workbench**: Assign *"migrate this module to the new interface and add unit tests"* from DingTalk on your commute; the background task breaks down work items, dispatches Claude Code / Codex to implement and run tests, runs an independent `codex-review` check on the diff, and delivers the summary with test evidence to your phone.
|
|
110
|
-
- **⏰ Low-Noise Scheduled Inspections & Reports**: Set up daily or weekly event templates that run a local `preAction` script first, spawning a background task to investigate and deliver a DingTalk report only when new commits or anomalies appear.
|
|
111
|
-
- **🔀 Multi-Model & Multi-Agent Compute Routing**: Use fast or cost-effective models for everyday chat, route tough architectural trade-offs and root-cause debugging to `claude-high` / `codex-high` / `cursor-high`, batch mechanical edits with `codex-flash` / `glm-flash`, and leverage `agy-main` for long-context collaboration.
|
|
112
|
-
- **🤝 Multi-Surface Personal & Small-Team Collaboration**: Keep separate conversations across DMs and group chats while sharing one body of project memory by default — or split contexts cleanly with desks when needed.
|
|
113
|
-
- **🔌 Scriptable Personal Assistant via Official OpenAI SDK**: Enable the Web API and connect CI hooks, local scripts, or custom frontends to your assistant in a few lines of Python or JS.
|
|
70
|
+
What else users build into their daily routine:
|
|
114
71
|
|
|
115
|
-
|
|
116
|
-
|
|
72
|
+
- **⏰ Zero-Noise Scheduled Inspections**: Run Cron events with a local gate script first — **burning zero tokens when nothing changed**, and spinning up an investigation task only when new commits or error spikes appear.
|
|
73
|
+
- **🔀 Smart Compute Routing Across Subscriptions**: Use fast, affordable models for quick Q&A; route thorny architecture or root-cause debugging to `claude-high` / `codex-high` / `cursor-high`; batch mechanical edits with `codex-flash` / `glm-flash`; hand long-context collaboration to `agy-main`.
|
|
74
|
+
- **🗂️ Clean Context Separation When Needed**: Share one memory across DMs, groups, and terminal by default — or spin up isolated **Desks** (`/desk new side-project`) for separate repos and initiatives.
|
|
75
|
+
- **🔌 Drop-In Automation with Official OpenAI SDKs**: Flip on the built-in Web API and call your assistant from Python, Node.js, or CI scripts in five lines of code.
|
|
117
76
|
|
|
118
77
|
---
|
|
119
78
|
|
|
120
79
|
## Quick Start
|
|
121
80
|
|
|
122
|
-
|
|
81
|
+
Go from zero to an always-on setup in minutes: **60-second terminal run → 5-minute DingTalk connection → external coding agents → 24/7 background service**. *(For a detailed step-by-step onboarding walkthrough including OpenAI-compatible gateway snippets, `curl` checks, and DingTalk setup troubleshooting, see **[docs/quickstart.md](https://github.com/oyasmi/pipiclaw/blob/master/docs/quickstart.md)**.)*
|
|
123
82
|
|
|
124
83
|
<details>
|
|
125
|
-
<summary>💡 <b>Shortcut:
|
|
126
|
-
|
|
127
|
-
Copy and paste the prompt below into your local AI coding agent:
|
|
84
|
+
<summary>💡 <b>Shortcut: Paste this prompt into Claude Code / Codex / Cursor and let it set up Pipiclaw for you</b></summary>
|
|
128
85
|
|
|
129
86
|
```text
|
|
130
87
|
Please install and initialize Pipiclaw for me:
|
|
131
88
|
|
|
132
89
|
1. Check Node.js >= 22.19.0; stop and explain if it is not met.
|
|
133
90
|
2. Run npm install -g @oyasmi/pipiclaw; on a permission failure do not sudo on your own.
|
|
134
|
-
3. Run pipiclaw once to initialize ~/.pipiclaw
|
|
135
|
-
4. Ask me whether I want to use an API key, a custom provider, or
|
|
136
|
-
5. If I want to connect DingTalk, collect clientId, clientSecret, optional cardTemplateId, and allowFrom item by item, write them into the
|
|
137
|
-
6. When configuration is done, ask first whether to start. Terminal mode uses pipiclaw tui
|
|
91
|
+
3. Run `pipiclaw auth status` once to initialize ~/.pipiclaw/, and share the generated initial Web API key (`pk_...`) printed on stdout with me.
|
|
92
|
+
4. Ask me whether I want to use an environment API key, a custom provider in ~/.pipiclaw/models.json, or run `pipiclaw auth login` myself; do not invent missing values.
|
|
93
|
+
5. If I want to connect DingTalk, collect clientId, clientSecret, optional cardTemplateId, and allowFrom item by item, write them into the dingtalk section of channel.json, and set dingtalk.enabled to true.
|
|
94
|
+
6. When configuration is done, ask first whether to start. Terminal mode uses `pipiclaw tui` (or `pipiclaw tui --cwd .` inside a repo); background daemon mode uses `pipiclaw` (local Web API socket + http://127.0.0.1:8787/v1 are enabled out of the box).
|
|
138
95
|
7. Honestly list the operations performed, files changed, verification results, and information still missing; do not pretend it succeeded.
|
|
139
96
|
```
|
|
140
97
|
|
|
141
98
|
</details>
|
|
142
99
|
|
|
143
|
-
### 1
|
|
100
|
+
### Step 1: Install & Run Out of the Box (No DingTalk Setup Needed)
|
|
144
101
|
|
|
145
|
-
|
|
146
|
-
- **OS**: Linux / macOS (on Windows, use WSL2)
|
|
102
|
+
Prerequisites: **Node.js `>= 22.19.0`** on **Linux / macOS** (on Windows, use **WSL2**).
|
|
147
103
|
|
|
148
104
|
```bash
|
|
149
105
|
npm install -g @oyasmi/pipiclaw
|
|
150
|
-
pipiclaw tui --help
|
|
151
106
|
```
|
|
152
107
|
|
|
153
|
-
|
|
108
|
+
On first run, Pipiclaw automatically initializes `~/.pipiclaw/`, **enables the local Web API (`socket` + `http://127.0.0.1:8787/v1`) with a generated default key (`pk_...`)**, and prompts you to log in if no model credential is configured yet.
|
|
154
109
|
|
|
155
|
-
|
|
156
|
-
~/.pipiclaw/
|
|
157
|
-
├── channel.json # Channel switches & config: DingTalk app (dingtalk), Web API (webapi)
|
|
158
|
-
├── auth.json # Model credentials & login state
|
|
159
|
-
├── models.json # Custom model providers & gateways
|
|
160
|
-
├── settings.json # Default model & runtime settings
|
|
161
|
-
├── tools.json # Capability switches for web search/fetch, tasks, etc.
|
|
162
|
-
├── security.json # Command, path, and network guard policies
|
|
163
|
-
└── workspace/ # Shared rules (AGENTS.md / SOUL.md), skills/, sub-agents/, and desk-default/
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
### 2. Fastest Taste: Run in the Terminal in 30 Seconds
|
|
167
|
-
|
|
168
|
-
Terminal mode requires no DingTalk credentials — just a working model. Configure credentials using either option:
|
|
110
|
+
You can also configure a model beforehand (pick either):
|
|
169
111
|
|
|
170
112
|
```bash
|
|
171
|
-
# Option A:
|
|
172
|
-
export ANTHROPIC_API_KEY=sk-ant-...
|
|
173
|
-
|
|
174
|
-
# Option B: Log in to a subscription provider supported by the SDK
|
|
113
|
+
# Option A: Interactive login for supported subscription / API-key providers
|
|
175
114
|
pipiclaw auth login
|
|
115
|
+
|
|
116
|
+
# Option B: Export an API key (Anthropic shown as example)
|
|
117
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
176
118
|
```
|
|
177
119
|
|
|
178
|
-
Launch the interactive terminal UI (
|
|
120
|
+
Launch the interactive terminal UI (pass `--cwd .` inside a repository to bind the desk's working directory):
|
|
179
121
|
|
|
180
122
|
```bash
|
|
181
123
|
pipiclaw tui
|
|
182
124
|
```
|
|
183
125
|
|
|
184
|
-
Or
|
|
126
|
+
Or start the background daemon directly (both `pipiclaw tui` and OpenAI SDK clients connect right away):
|
|
185
127
|
|
|
186
128
|
```bash
|
|
187
|
-
pipiclaw
|
|
129
|
+
pipiclaw
|
|
188
130
|
```
|
|
189
131
|
|
|
190
|
-
|
|
132
|
+
Or run a quick one-liner to verify the end-to-end model connection:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
pipiclaw tui --print "Reply with only: Pipiclaw is ready"
|
|
136
|
+
```
|
|
191
137
|
|
|
192
|
-
|
|
138
|
+
> Using an OpenAI-compatible proxy/gateway, DeepSeek, GLM, or local Ollama? Copy the built-in `_examples` block in `~/.pipiclaw/models.json`, or check the [Configuration Quickstart](https://github.com/oyasmi/pipiclaw/blob/master/docs/configuration.md).
|
|
193
139
|
|
|
194
|
-
|
|
140
|
+
### Step 2: Connect DingTalk When Needed (No Public IP Required)
|
|
195
141
|
|
|
196
|
-
|
|
197
|
-
2. Enable the **Bot** capability
|
|
198
|
-
3. Select **Stream Mode** for message receiving
|
|
199
|
-
4. *(Recommended)* Create an AI Card template and copy its **`Card Template ID`** for live streaming updates
|
|
142
|
+
Pipiclaw uses **DingTalk Stream Mode**, so any laptop or private server with outbound internet access connects directly — no public IP, domain name, or webhook relay required:
|
|
200
143
|
|
|
201
|
-
|
|
144
|
+
1. Create an **Enterprise Internal App** on the [DingTalk Open Platform](https://open-dev.dingtalk.com/) and copy its **`Client ID`** and **`Client Secret`**.
|
|
145
|
+
2. Add the **Bot** capability, choose **Stream Mode** for message receiving, and publish the app.
|
|
146
|
+
3. *(Recommended)* Create an AI Card template and copy its **`Card Template ID`** for live streaming progress cards.
|
|
147
|
+
|
|
148
|
+
Edit `~/.pipiclaw/channel.json` — set `dingtalk.enabled` to `true` and fill in your credentials:
|
|
202
149
|
|
|
203
150
|
```json
|
|
204
151
|
{
|
|
205
152
|
"dingtalk": {
|
|
206
153
|
"enabled": true,
|
|
207
|
-
"clientId": "your-
|
|
208
|
-
"clientSecret": "your-
|
|
154
|
+
"clientId": "your-actual-client-id",
|
|
155
|
+
"clientSecret": "your-actual-client-secret",
|
|
209
156
|
"robotCode": "",
|
|
210
|
-
"cardTemplateId": "",
|
|
157
|
+
"cardTemplateId": "optional-card-template-id",
|
|
211
158
|
"cardTemplateKey": "content",
|
|
212
159
|
"allowFrom": []
|
|
213
160
|
},
|
|
214
|
-
"webapi": {
|
|
161
|
+
"webapi": {
|
|
162
|
+
"enabled": true,
|
|
163
|
+
"socket": true,
|
|
164
|
+
"tcp": "127.0.0.1:8787",
|
|
165
|
+
"tls": null,
|
|
166
|
+
"keys": [{ "name": "default", "sha256": "...", "desks": ["default"] }]
|
|
167
|
+
}
|
|
215
168
|
}
|
|
216
169
|
```
|
|
217
170
|
|
|
218
|
-
-
|
|
219
|
-
-
|
|
220
|
-
- **Web API**: Set `webapi.enabled` to `true` if you also want scripts or other clients to connect via the official OpenAI SDK (see [Web API](https://github.com/oyasmi/pipiclaw/blob/main/docs/webapi.md)).
|
|
171
|
+
- Only `clientId` and `clientSecret` are strictly required (`robotCode` falls back to `clientId` when empty).
|
|
172
|
+
- `allowFrom: []` allows anyone with access to the DingTalk app; add your DingTalk `staffId` if you want to restrict access.
|
|
221
173
|
|
|
222
|
-
Start the
|
|
174
|
+
Start the service:
|
|
223
175
|
|
|
224
176
|
```bash
|
|
225
177
|
pipiclaw
|
|
226
178
|
```
|
|
227
179
|
|
|
228
|
-
Open DingTalk
|
|
229
|
-
|
|
230
|
-
```text
|
|
231
|
-
Please introduce yourself and explain what you can do right now
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
*(If your first message does not go through, check [Deployment and Operations](https://github.com/oyasmi/pipiclaw/blob/main/docs/deployment-and-operations.md).)*
|
|
235
|
-
|
|
236
|
-
### 4. Enable External Agent Delegation (Claude / Codex / Cursor / Antigravity)
|
|
180
|
+
Open DingTalk on your phone or desktop, **DM the bot** or **@mention it in a group**, send `/status` to check health, and start chatting!
|
|
237
181
|
|
|
238
|
-
|
|
182
|
+
### Step 3: Plug In Claude Code / Codex / Cursor / Antigravity (Optional)
|
|
239
183
|
|
|
240
|
-
|
|
184
|
+
If you already have `claude`, `codex`, Cursor's `agent`, or Antigravity's `agy` installed and logged in under the same OS user, enable them in two commands:
|
|
241
185
|
|
|
242
186
|
```bash
|
|
243
187
|
mkdir -p ~/.pipiclaw/workspace/sub-agents
|
|
244
188
|
PIPICLAW_PACKAGE_DIR="$(npm root -g)/@oyasmi/pipiclaw"
|
|
245
189
|
|
|
246
|
-
#
|
|
247
|
-
cp "$PIPICLAW_PACKAGE_DIR"/examples/sub-agents/
|
|
190
|
+
# Copy the entries matching the subscriptions you own (Claude, Codex & read-only review shown)
|
|
191
|
+
cp "$PIPICLAW_PACKAGE_DIR"/examples/sub-agents/{claude-main,codex-main,codex-review}.md \
|
|
248
192
|
~/.pipiclaw/workspace/sub-agents/
|
|
249
193
|
```
|
|
250
194
|
|
|
251
|
-
*(
|
|
195
|
+
*(Curated profiles for `claude-high`, `codex-high`, `codex-flash`, `cursor-main`, `cursor-high`, `agy-main`, `glm-high`, and `glm-flash` are also included — see [Sub-Agent Examples](https://github.com/oyasmi/pipiclaw/blob/master/examples/sub-agents/README.md).)*
|
|
252
196
|
|
|
253
|
-
|
|
197
|
+
**No restart needed.** Send `/subagents roles` in chat to confirm availability, then delegate naturally:
|
|
254
198
|
|
|
255
199
|
```text
|
|
256
|
-
|
|
200
|
+
Hand this cross-module refactor to a suitable external coding agent, run the test suite, and perform an independent read-only review before reporting back.
|
|
257
201
|
```
|
|
258
202
|
|
|
259
|
-
|
|
203
|
+
> [!IMPORTANT]
|
|
204
|
+
> **Permission Notice**: External coding agents run as standalone OS processes and bypass Pipiclaw's built-in command/path guards (and write-capable templates pass permissive CLI flags by default). Review the [Agent Delegation Guide](https://github.com/oyasmi/pipiclaw/blob/master/docs/sub-agents.md) before enabling them.
|
|
260
205
|
|
|
261
|
-
|
|
262
|
-
|
|
206
|
+
### Step 4: Keep It Running 24/7 in the Background (Recommended)
|
|
207
|
+
|
|
208
|
+
To keep your assistant online when you close your terminal, run `pipiclaw` under `pm2` or `systemd` on an always-on workstation, Mac mini, or server:
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
# Quick background setup with pm2
|
|
212
|
+
pm2 start pipiclaw --name pipiclaw && pm2 save
|
|
263
213
|
```
|
|
264
214
|
|
|
265
|
-
|
|
266
|
-
> External agents do not pass through Pipiclaw's built-in command and path guards, and the recommended write entries use permissive CLI flags. Read the authorization and sandbox guidance in the [Agent Delegation Guide](https://github.com/oyasmi/pipiclaw/blob/main/docs/sub-agents.md) before enabling them, and run long external delegations under the persistent `pipiclaw` daemon.
|
|
215
|
+
For production `systemd` unit files, environment isolation, backups, and troubleshooting, see [Deployment & Operations](https://github.com/oyasmi/pipiclaw/blob/master/docs/deployment-and-operations.md).
|
|
267
216
|
|
|
268
|
-
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## Core Capabilities
|
|
220
|
+
|
|
221
|
+
### 💬 1. Live Streaming Across DingTalk, Terminal & SDK
|
|
222
|
+
|
|
223
|
+
- **Real-Time AI Cards**: Watch reasoning steps and tool calls unfold live in DingTalk. Need to adjust course while it's working? Just send a message to steer mid-turn (`/steer`), or queue your next request with `/followup`.
|
|
224
|
+
- **Native File Delivery**: Generated reports, CSV exports, screenshots, and archives arrive directly in DingTalk as native file attachments.
|
|
225
|
+
- **Official OpenAI SDK Compatibility**: Both `pipiclaw tui` and your own Python/JS scripts talk to the same assistant via the built-in OpenAI Responses-compatible [Web API](https://github.com/oyasmi/pipiclaw/blob/master/docs/webapi.md).
|
|
226
|
+
|
|
227
|
+
### 🛤️ 2. Non-Blocking Background Tasks & Scheduled Events
|
|
228
|
+
|
|
229
|
+
- **Dedicated Task Lane**: Multi-step projects progress in the background without tying up your conversation, persisting every checklist item and step on disk so work resumes cleanly across restarts.
|
|
230
|
+
- **Built-In Cost & Safety Guardrails**: Step limits, USD budgets, per-step timeouts, and error circuit breakers automatically pause runaway tasks and notify you when human input is needed.
|
|
231
|
+
- **Timers & Zero-Token Sensors**: Schedule one-off reminders or recurring Cron jobs, optionally gated by local check scripts so idle inspections cost zero tokens.
|
|
232
|
+
|
|
233
|
+
### 🤝 3. Unified Multi-Agent Orchestration
|
|
269
234
|
|
|
270
|
-
|
|
235
|
+
- **Lead Assistant + Specialized Workers**: Your main assistant owns context, planning, and acceptance — spinning up fast **built-in sub-agents** for quick searches/log triage, and **Claude Code / Codex / Cursor / Antigravity** for heavy multi-file coding and test loops.
|
|
236
|
+
- **Async Wakeups & Follow-Ups**: Long external runs execute in the background, wake your chat automatically when done, support session continuation for follow-up questions, and can be killed anytime via `/subagents cancel`.
|
|
237
|
+
|
|
238
|
+
### 🧠 4. Transparent, Controllable Memory
|
|
239
|
+
|
|
240
|
+
- **Long-Term Conventions + Daily Journals**: Durable project rules live in `memory/*.md` and load automatically at session start (no brittle keyword guessing), while day-to-day progress stays neatly separated in daily `journal/` files.
|
|
241
|
+
- **Probation & Permanent Forgetting**: Newly inferred habits enter a 30-day probation window first, and `/memory forget <name>` deletes unwanted entries permanently so background maintenance never brings them back.
|
|
242
|
+
|
|
243
|
+
### 🛡️ 5. Instant Takeover & 100% Local Plain-Text Data
|
|
244
|
+
|
|
245
|
+
- **LLM-Independent Controls**: Commands like `/stop`, `/tasks`, `/subagents`, `/status`, and `/usage` execute directly in the local runtime — **responding instantly even if an upstream model API is slow or unreachable**.
|
|
246
|
+
- **Plain-Text Data Ownership**: Every config, memory, journal, task spec, and usage ledger lives as readable Markdown or JSON under `~/.pipiclaw/`, protected by built-in command, path, and network guards.
|
|
247
|
+
|
|
248
|
+
### Mental Model at a Glance
|
|
249
|
+
|
|
250
|
+
```mermaid
|
|
251
|
+
flowchart LR
|
|
252
|
+
subgraph You["Where You Talk (Channels)"]
|
|
253
|
+
DT["📱 DingTalk DM / Group"]
|
|
254
|
+
TUI["💻 Terminal (pipiclaw tui)"]
|
|
255
|
+
SDK["🔌 Your Scripts (OpenAI SDK)"]
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
subgraph Assistant["Your Pipiclaw Assistant"]
|
|
259
|
+
CMD["⚡ Instant Slash Controls<br/>(/stop · /tasks · /subagents ...)"]
|
|
260
|
+
CHAT["💬 Interactive Chat & Routing"]
|
|
261
|
+
TASK["🛤️ Background Tasks & Cron Events"]
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
subgraph Desk["Desk (default / custom workspaces)"]
|
|
265
|
+
MEM["🧠 Long-Term Memory · Daily Journal · Repo CWD"]
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
subgraph Workers["Tools & Coding Agents"]
|
|
269
|
+
LOCAL["🔍 Built-In Tools & Fast Internal Sub-Agents"]
|
|
270
|
+
CLI["🛠️ Claude Code · Codex · Cursor · Antigravity"]
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
DT & TUI & SDK --> CMD & CHAT
|
|
274
|
+
CHAT & TASK <--> Desk
|
|
275
|
+
CHAT & TASK --> LOCAL & CLI
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
| Everyday Term | What It Means for You |
|
|
279
|
+
|---|---|
|
|
280
|
+
| **Channel** | A conversation window (a DingTalk DM, a DingTalk group, or a terminal/API session), each keeping its own chat history. |
|
|
281
|
+
| **Desk** | A named workspace owning memory, journals, tasks, events, and a working directory. Everything shares `default` out of the box; create more only when you want separation. |
|
|
282
|
+
| **Task** | A multi-step project advancing in the background without blocking chat — inspectable, steerable, and resumable anytime. |
|
|
283
|
+
| **Event** | A one-time alarm or Cron schedule that wakes the assistant or spawns recurring tasks (optionally gated by a local check script). |
|
|
284
|
+
| **Sub-Agent** | A helper dispatched for a specific job — either a fast built-in reader or an external CLI like Claude Code or Codex. |
|
|
271
285
|
|
|
272
286
|
---
|
|
273
287
|
|
|
274
288
|
## Common Commands
|
|
275
289
|
|
|
276
|
-
|
|
290
|
+
Type `/` in DingTalk or the terminal to control your assistant (send `/help` for the full list, or `/help <command>` for examples):
|
|
277
291
|
|
|
278
|
-
### Available Anytime (
|
|
292
|
+
### ⚡ Available Anytime (Responds instantly — even mid-reply or if a model hangs)
|
|
279
293
|
|
|
280
|
-
| Command |
|
|
294
|
+
| Command | When to Use It |
|
|
281
295
|
|---|---|
|
|
282
|
-
| `/help [command]` |
|
|
283
|
-
| `/status` |
|
|
284
|
-
| `/stop` |
|
|
285
|
-
| `/steer <message>` |
|
|
286
|
-
| `/followup <message>` | Queue
|
|
287
|
-
| `/tasks [show\|
|
|
288
|
-
| `/subagents [list\|show\|output\|cancel\|roles]` | Inspect
|
|
289
|
-
| `/events <list\|show\|delete\|history>` | List
|
|
290
|
-
| `/desk [list\|new
|
|
291
|
-
| `/usage [7d\|month]` | View token
|
|
292
|
-
| `/context [detail]` |
|
|
293
|
-
| `/skills [list\|show <name>]` | List workspace and
|
|
294
|
-
| `/new` | Start a fresh
|
|
295
|
-
|
|
296
|
-
### Available When Idle (
|
|
297
|
-
|
|
298
|
-
| Command |
|
|
296
|
+
| `/help [command]` | Browse all commands, or view subcommands and examples for one (e.g. `/help tasks`) |
|
|
297
|
+
| `/status` | Check health, active model, context usage, uptime, and background task summary |
|
|
298
|
+
| `/stop` | Immediately abort the current chat reply and clear queued messages |
|
|
299
|
+
| `/steer <message>` | Nudge or redirect a running reply on the fly (plain messages sent while busy do this by default) |
|
|
300
|
+
| `/followup <message>` | Queue your next request to run right after the current reply finishes |
|
|
301
|
+
| `/tasks [show\|msg\|pause\|resume\|cancel...]` | Check background task progress, send instructions (`msg`), pause, resume with extra budget, or cancel |
|
|
302
|
+
| `/subagents [list\|show\|output\|cancel\|roles]` | Inspect active/recent Claude/Codex delegations, read live output, or `cancel` a process immediately |
|
|
303
|
+
| `/events <list\|show\|delete\|history>` | List or delete scheduled reminders/Cron jobs and inspect trigger history |
|
|
304
|
+
| `/desk [list\|new\|cwd\|bind]` | View desks, create a new desk, or set its repo directory (note: `bind` waits until the active turn ends) |
|
|
305
|
+
| `/usage [7d\|month]` | View token consumption and cost breakdown for your desk and globally |
|
|
306
|
+
| `/context [detail]` | See exactly how much system prompt, tool schema, and history is sent to the model |
|
|
307
|
+
| `/skills [list\|show <name>]` | List loaded workspace and shared user skills |
|
|
308
|
+
| `/new` | Start a fresh chat session while keeping your long-term desk memory intact |
|
|
309
|
+
|
|
310
|
+
### 🛋️ Available When Idle (Run after the current reply finishes)
|
|
311
|
+
|
|
312
|
+
| Command | When to Use It |
|
|
299
313
|
|---|---|
|
|
300
|
-
| `/memory [status\|list\|show\|forget\|journal]` |
|
|
301
|
-
| `/model [
|
|
302
|
-
| `/thinking [
|
|
303
|
-
| `/compact [instructions]` |
|
|
304
|
-
| `/session` |
|
|
305
|
-
| `/reload` |
|
|
314
|
+
| `/memory [status\|list\|show\|forget\|journal]` | Browse saved memories, read daily journals, or permanently delete/block an item (`forget`) |
|
|
315
|
+
| `/model [name-or-substring]` | Check the active model or switch models by exact ID or unique substring |
|
|
316
|
+
| `/thinking [low\|medium\|high\|cycle...]` | Tune reasoning depth (lower for snappy chat, higher for hard debugging) |
|
|
317
|
+
| `/compact [instructions]` | Compress a long chat history manually, optionally telling it what details to preserve |
|
|
318
|
+
| `/session` | Check message counts and token stats for the current conversation |
|
|
319
|
+
| `/reload` | Hot-reload updated skills and workspace resources without restarting |
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
## Where Your Data & Config Live
|
|
324
|
+
|
|
325
|
+
Everything lives in `~/.pipiclaw/` (override anytime via `PIPICLAW_HOME=/your/path`) — backing up or moving machines is as simple as copying one folder:
|
|
326
|
+
|
|
327
|
+
```text
|
|
328
|
+
~/.pipiclaw/
|
|
329
|
+
├── channel.json # DingTalk bot credentials, AI Card template & Web API switches
|
|
330
|
+
├── auth.json # Model credentials (managed via pipiclaw auth login)
|
|
331
|
+
├── models.json # Custom model providers, OpenAI-compatible gateways & local endpoints
|
|
332
|
+
├── settings.json # Default model, fallback model & runtime preferences
|
|
333
|
+
├── tools.json # Feature toggles such as web search/fetch (off by default; keyless DuckDuckGo supported)
|
|
334
|
+
├── security.json # Command, path & network guard policies
|
|
335
|
+
└── workspace/ # Your personal assets:
|
|
336
|
+
├── SOUL.md # Customize assistant persona, tone & language preferences
|
|
337
|
+
├── AGENTS.md # Shared engineering rules & workflow conventions
|
|
338
|
+
├── skills/ # Reusable workflow skills (also loads shared skills from ~/.agents/skills/)
|
|
339
|
+
├── sub-agents/ # Enabled external coding agent profiles
|
|
340
|
+
└── desk-default/ # Default desk's memory/, daily journal/, and background tasks/
|
|
341
|
+
```
|
|
306
342
|
|
|
307
|
-
See [
|
|
343
|
+
See the **[Configuration Quickstart](https://github.com/oyasmi/pipiclaw/blob/master/docs/configuration.md)** for common recipes (custom gateways, proxies via `PIPICLAW_PROXY`, web tools, and more).
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## FAQ
|
|
348
|
+
|
|
349
|
+
<details>
|
|
350
|
+
<summary><b>1. Do I need a cloud server, domain name, or public IP for DingTalk?</b></summary>
|
|
351
|
+
|
|
352
|
+
**No.** Pipiclaw connects outbound via DingTalk's official Stream Mode. Any laptop, desktop, or private server with regular internet access works out of the box.
|
|
353
|
+
</details>
|
|
354
|
+
|
|
355
|
+
<details>
|
|
356
|
+
<summary><b>2. Will tasks keep running if I close my laptop lid?</b></summary>
|
|
357
|
+
|
|
358
|
+
Pipiclaw runs locally on the host where you installed it. If your laptop goes to sleep, the process pauses until wake-up (and then automatically reconnects and resumes). For **true 24/7 mobile access**, run Pipiclaw on an always-on desktop, Mac mini, home server, or cloud VM.
|
|
359
|
+
</details>
|
|
360
|
+
|
|
361
|
+
<details>
|
|
362
|
+
<summary><b>3. Does delegating to Claude Code / Codex cost extra? What is the security model?</b></summary>
|
|
363
|
+
|
|
364
|
+
Pipiclaw adds zero middleman fees — it invokes the official CLIs already installed and authenticated on your machine using your existing subscriptions or API keys.
|
|
365
|
+
**Security scope**: Pipiclaw is built for individual developers (and small trusted setups sharing one assistant), not hard multi-tenant SaaS isolation. External coding CLIs run under your OS user account and **bypass Pipiclaw's built-in command/path guards**. Run them in dedicated project directories or under a dedicated OS user. Read the [Security Guide](https://github.com/oyasmi/pipiclaw/blob/master/docs/security.md) for details.
|
|
366
|
+
</details>
|
|
367
|
+
|
|
368
|
+
<details>
|
|
369
|
+
<summary><b>4. How do I enable web search or upgrade Pipiclaw?</b></summary>
|
|
370
|
+
|
|
371
|
+
- **Enable web search**: Set `tools.web.enable: true` in `~/.pipiclaw/tools.json` (DuckDuckGo works immediately with no API key; Tavily, Jina, and SearXNG are also supported).
|
|
372
|
+
- **Upgrade**: Run `npm install -g @oyasmi/pipiclaw@latest` and restart the `pipiclaw` process. Your `~/.pipiclaw/` data and memories stay untouched.
|
|
373
|
+
</details>
|
|
308
374
|
|
|
309
375
|
---
|
|
310
376
|
|
|
311
377
|
## Documentation
|
|
312
378
|
|
|
313
|
-
|
|
379
|
+
Explore the full user guides in **[docs/README.md](https://github.com/oyasmi/pipiclaw/blob/master/docs/README.md)** *(currently primarily in Chinese)*:
|
|
314
380
|
|
|
315
|
-
|
|
|
381
|
+
| Goal | Guide |
|
|
316
382
|
|---|---|
|
|
317
|
-
|
|
|
318
|
-
|
|
|
319
|
-
|
|
|
320
|
-
|
|
|
321
|
-
|
|
|
322
|
-
|
|
|
323
|
-
| 🧩 Package reusable personal or project workflows as Skills | [Skills Guide](https://github.com/oyasmi/pipiclaw/blob/
|
|
324
|
-
|
|
|
325
|
-
|
|
|
326
|
-
| 🚀
|
|
327
|
-
| 🏗️ Explore the module layering, runtime topology, and internals | [Architecture](https://github.com/oyasmi/pipiclaw/blob/main/docs/architecture.md) · [Runtime Mechanisms](https://github.com/oyasmi/pipiclaw/blob/main/docs/runtime-mechanisms.md) |
|
|
383
|
+
| ⚡ Step-by-step first-run onboarding, gateway snippets & FAQ | [Quick Start Guide](https://github.com/oyasmi/pipiclaw/blob/master/docs/quickstart.md) |
|
|
384
|
+
| 💬 Master DMs, groups, AI Card modes & slash commands | [Interaction & Commands](https://github.com/oyasmi/pipiclaw/blob/master/docs/interaction-and-commands.md) |
|
|
385
|
+
| ⚙️ Configure custom models, gateways, proxies & web search | [Configuration Quickstart](https://github.com/oyasmi/pipiclaw/blob/master/docs/configuration.md) · [Field Reference](https://github.com/oyasmi/pipiclaw/blob/master/docs/configuration-reference.md) |
|
|
386
|
+
| 🤝 Set up & customize Claude Code / Codex / Cursor / Antigravity | [Agent Delegation](https://github.com/oyasmi/pipiclaw/blob/master/docs/sub-agents.md) · [Profile Examples](https://github.com/oyasmi/pipiclaw/blob/master/examples/sub-agents/README.md) |
|
|
387
|
+
| 📋 Run background tasks, Cron inspections & budgets | [Events & Tasks](https://github.com/oyasmi/pipiclaw/blob/master/docs/events-and-tasks.md) |
|
|
388
|
+
| 🧠 Manage long-term memory, journals, probation & forgetting | [Memory Guide](https://github.com/oyasmi/pipiclaw/blob/master/docs/memory.md) |
|
|
389
|
+
| 🧩 Package reusable personal or project workflows as Skills | [Skills Guide](https://github.com/oyasmi/pipiclaw/blob/master/docs/skills.md) · [Built-In Tools](https://github.com/oyasmi/pipiclaw/blob/master/docs/tools.md) |
|
|
390
|
+
| 🔌 Connect Python/JS scripts or custom UIs via OpenAI SDK | [Web API Guide](https://github.com/oyasmi/pipiclaw/blob/master/docs/webapi.md) |
|
|
391
|
+
| 💡 Best practices for high-leverage autonomous delivery | [Leverage Notes](https://github.com/oyasmi/pipiclaw/blob/master/docs/leverage/README.md) · [Design Philosophy](https://github.com/oyasmi/pipiclaw/blob/master/docs/design-philosophy.md) |
|
|
392
|
+
| 🚀 Host 24/7 with systemd/pm2, review guards & troubleshoot | [Deployment & Operations](https://github.com/oyasmi/pipiclaw/blob/master/docs/deployment-and-operations.md) · [Security Guide](https://github.com/oyasmi/pipiclaw/blob/master/docs/security.md) · [Scaling & Concurrency](https://github.com/oyasmi/pipiclaw/blob/master/docs/scaling-and-concurrency.md) |
|
|
328
393
|
|
|
329
394
|
---
|
|
330
395
|
|
|
331
|
-
##
|
|
396
|
+
## Building from Source & Contributing
|
|
397
|
+
|
|
398
|
+
Want to build from source, customize locally, or contribute?
|
|
332
399
|
|
|
333
400
|
```bash
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
npm
|
|
401
|
+
git clone https://github.com/oyasmi/pipiclaw.git
|
|
402
|
+
cd pipiclaw
|
|
403
|
+
npm install && npm run build && npm run check
|
|
337
404
|
```
|
|
338
405
|
|
|
339
|
-
|
|
340
|
-
- **Architecture & dependency boundaries**: `npm run arch`
|
|
341
|
-
- **Deterministic full-stack E2E (offline, zero API cost)**: `npm run test:e2e`
|
|
342
|
-
- **Live model smoke suite**: `npm run test:e2e:live`
|
|
406
|
+
For module boundaries, runtime internals, and engineering conventions, see [Architecture](https://github.com/oyasmi/pipiclaw/blob/master/docs/architecture.md), [Runtime Mechanisms](https://github.com/oyasmi/pipiclaw/blob/master/docs/runtime-mechanisms.md), and [AGENTS.md](https://github.com/oyasmi/pipiclaw/blob/master/AGENTS.md). Issues and Pull Requests are welcome!
|
|
343
407
|
|
|
344
408
|
---
|
|
345
409
|
|