pi-harness-runtime 1.1.341 → 1.1.342
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.md +118 -0
- package/index.ts +58 -0
- package/package.json +1 -1
- package/packages/a2a-adapter/package.json +1 -1
- package/packages/agent-policy/package.json +1 -1
- package/packages/architecture-generator/package.json +1 -1
- package/packages/auth/package.json +1 -1
- package/packages/autonomous-refactor/package.json +1 -1
- package/packages/autonomous-runtime/package.json +1 -1
- package/packages/cache-strategy/package.json +1 -1
- package/packages/capability-registry/package.json +1 -1
- package/packages/checkpoint/package.json +1 -1
- package/packages/cli-plugin-sdk/package.json +1 -1
- package/packages/clipboard/package.json +1 -1
- package/packages/clipboard-plugin/package.json +1 -1
- package/packages/code-generation/package.json +1 -1
- package/packages/code-review/package.json +1 -1
- package/packages/codex-adapter/package.json +1 -1
- package/packages/codex-watcher/package.json +1 -1
- package/packages/config-capture/package.json +1 -1
- package/packages/connection-runtime/package.json +1 -1
- package/packages/context-compiler/package.json +1 -1
- package/packages/context-discovery/package.json +1 -1
- package/packages/context-manager/package.json +1 -1
- package/packages/contracts/package.json +1 -1
- package/packages/cookie-sanitizer/package.json +1 -1
- package/packages/cost-optimizer/package.json +1 -1
- package/packages/dependency-analyzer/package.json +1 -1
- package/packages/django-plugin/package.json +1 -1
- package/packages/doc-generator/package.json +1 -1
- package/packages/durable-review/package.json +1 -1
- package/packages/e2e-tester/package.json +1 -1
- package/packages/evaluation-engine/package.json +1 -1
- package/packages/evaluation-runner/package.json +1 -1
- package/packages/event-bus/package.json +1 -1
- package/packages/event-sink/package.json +1 -1
- package/packages/event-store/package.json +1 -1
- package/packages/experience-replay/package.json +1 -1
- package/packages/feedback-collector/package.json +1 -1
- package/packages/file-copy-helper/package.json +1 -1
- package/packages/framework-detector/package.json +1 -1
- package/packages/framework-plugin-sdk/package.json +1 -1
- package/packages/frappe-plugin/package.json +1 -1
- package/packages/generic-web-plugin/package.json +1 -1
- package/packages/health-monitor/package.json +1 -1
- package/packages/intent-analyzer/package.json +1 -1
- package/packages/jev-judge/package.json +1 -1
- package/packages/knowledge-graph/package.json +1 -1
- package/packages/knowledge-retrieval/package.json +1 -1
- package/packages/laravel-plugin/package.json +1 -1
- package/packages/learning-engine/package.json +1 -1
- package/packages/mcp-adapter/package.json +1 -1
- package/packages/memory-engine/package.json +1 -1
- package/packages/milestone-manager/package.json +1 -1
- package/packages/model-registry/package.json +1 -1
- package/packages/nextjs-plugin/package.json +1 -1
- package/packages/notification/package.json +1 -1
- package/packages/observability/package.json +1 -1
- package/packages/okf-indexer/package.json +1 -1
- package/packages/paperclip-integration/package.json +1 -1
- package/packages/performance-optimizer/package.json +1 -1
- package/packages/permission-mode/package.json +1 -1
- package/packages/privilege-broker/package.json +1 -1
- package/packages/project-analyzer/package.json +1 -1
- package/packages/project-bootstrap/package.json +1 -1
- package/packages/projection-engine/package.json +1 -1
- package/packages/prompt-compiler/package.json +1 -1
- package/packages/prompt-versioning/package.json +1 -1
- package/packages/provider-adapter-sdk/package.json +1 -1
- package/packages/provider-router/package.json +1 -1
- package/packages/provider-selector/package.json +1 -1
- package/packages/providers/package.json +1 -1
- package/packages/qdrant-skills/package.json +1 -1
- package/packages/quota-manager/package.json +1 -1
- package/packages/rate-limiter/package.json +1 -1
- package/packages/react-vite-plugin/package.json +1 -1
- package/packages/relay/package.json +1 -1
- package/packages/release-manager/package.json +1 -1
- package/packages/requirement-compiler/package.json +1 -1
- package/packages/runtime/package.json +1 -1
- package/packages/scheduler/package.json +1 -1
- package/packages/scheduler-adapter/package.json +1 -1
- package/packages/session/package.json +1 -1
- package/packages/session-api/package.json +1 -1
- package/packages/session-export/package.json +1 -1
- package/packages/shared-context/package.json +1 -1
- package/packages/skill-mcp-client/package.json +1 -1
- package/packages/skill-registry/package.json +1 -1
- package/packages/skills/package.json +1 -1
- package/packages/sprint-planner/package.json +1 -1
- package/packages/subscription-engine/package.json +1 -1
- package/packages/task-compiler/package.json +1 -1
- package/packages/telegram/package.json +1 -1
- package/packages/tencentdb-memory/package.json +1 -1
- package/packages/tencentdb-sync/package.json +1 -1
- package/packages/test-data-generator/package.json +1 -1
- package/packages/test-generator/package.json +1 -1
- package/packages/todo-bd-sync/package.json +1 -1
- package/packages/token-estimation/package.json +1 -1
- package/packages/token-optimizer/package.json +1 -1
- package/packages/trajectory/package.json +1 -1
- package/packages/tui/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/packages/voice-api/dist/line.d.ts +2 -1
- package/packages/voice-api/dist/line.js +9 -6
- package/packages/voice-api/dist/transcriber.d.ts +12 -41
- package/packages/voice-api/dist/transcriber.js +88 -108
- package/packages/voice-api/package.json +1 -1
- package/packages/voice-api/src/line.ts +11 -8
- package/packages/voice-api/src/transcriber.ts +98 -122
- package/packages/webmcp-tester/package.json +1 -1
- package/packages/wiki/package.json +1 -1
- package/packages/workflow-events/package.json +1 -1
- package/packages/workspace-scanner/package.json +1 -1
- package/packages/worktree/package.json +1 -1
- package/packages/write-review/package.json +1 -1
package/README.md
CHANGED
|
@@ -679,6 +679,9 @@ Your local machine clipboard
|
|
|
679
679
|
|
|
680
680
|
Get notified on your phone when tasks complete! LINE notifications via the LINE Messaging API.
|
|
681
681
|
|
|
682
|
+
> **Self-Hosting Required**: LINE webhooks require your own server. This is NOT a hosted service.
|
|
683
|
+
> You must **clone this repository** and deploy your own webhook server. See [LINE Voice/Webhook Setup](#line-voicewebhook-setup) below.
|
|
684
|
+
|
|
682
685
|
#### Step-by-Step Setup
|
|
683
686
|
|
|
684
687
|
**1. Create a LINE Messaging API channel**
|
|
@@ -754,6 +757,118 @@ Task: Implement login flow
|
|
|
754
757
|
Job: feature-auth
|
|
755
758
|
```
|
|
756
759
|
|
|
760
|
+
### LINE Voice/Webhook Setup (Voice Commands)
|
|
761
|
+
|
|
762
|
+
> **Self-Hosting Required**: LINE voice messages require your own server with HTTPS.
|
|
763
|
+
> This is NOT a hosted service. You must **clone this repository** and deploy your own webhook server.
|
|
764
|
+
|
|
765
|
+
Voice messages from LINE are transcribed via OpenAI Whisper API and executed as commands.
|
|
766
|
+
|
|
767
|
+
#### Requirements
|
|
768
|
+
|
|
769
|
+
- **Own server** (VPS, cloud VM) with public IP
|
|
770
|
+
- **Domain** with DNS A record pointing to your server
|
|
771
|
+
- **SSL certificate** (Let's Encrypt via certbot)
|
|
772
|
+
- **Clone this repository** on your server
|
|
773
|
+
|
|
774
|
+
#### Setup Steps
|
|
775
|
+
|
|
776
|
+
**1. Clone and Build**
|
|
777
|
+
|
|
778
|
+
```bash
|
|
779
|
+
# Clone on your server
|
|
780
|
+
git clone https://github.com/ManotLuijiu/pi-harness-runtime.git
|
|
781
|
+
cd pi-harness-runtime
|
|
782
|
+
bun install
|
|
783
|
+
bun run build
|
|
784
|
+
```
|
|
785
|
+
|
|
786
|
+
**2. Configure DNS**
|
|
787
|
+
|
|
788
|
+
Create an A record: `line-api.your-domain.com` → `YOUR_SERVER_IP`
|
|
789
|
+
|
|
790
|
+
**3. Setup Nginx + SSL**
|
|
791
|
+
|
|
792
|
+
```bash
|
|
793
|
+
# Install certbot
|
|
794
|
+
sudo apt install certbot python3-certbot-nginx
|
|
795
|
+
|
|
796
|
+
# Create nginx config
|
|
797
|
+
sudo tee /etc/nginx/sites-available/line-api.your-domain.com > /dev/null << 'NGINX'
|
|
798
|
+
server {
|
|
799
|
+
listen 80;
|
|
800
|
+
server_name line-api.your-domain.com;
|
|
801
|
+
location / {
|
|
802
|
+
proxy_pass http://127.0.0.1:3900;
|
|
803
|
+
proxy_http_version 1.1;
|
|
804
|
+
proxy_set_header Host $host;
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
NGINX
|
|
808
|
+
|
|
809
|
+
# Enable and get SSL
|
|
810
|
+
sudo ln -sf /etc/nginx/sites-available/line-api.your-domain.com /etc/nginx/sites-enabled/
|
|
811
|
+
sudo certbot --nginx -d line-api.your-domain.com --noninteractive --agree-tos -m admin@your-domain.com --redirect
|
|
812
|
+
```
|
|
813
|
+
|
|
814
|
+
**4. Configure LINE Webhook**
|
|
815
|
+
|
|
816
|
+
```bash
|
|
817
|
+
# Set credentials
|
|
818
|
+
mkdir -p ~/.pi-harness-runtime/keys
|
|
819
|
+
|
|
820
|
+
# Get from LINE Developers Console > Messaging API > Basic settings
|
|
821
|
+
cp YOUR_ACCESS_TOKEN ~/.pi-harness-runtime/keys/line-access-token.txt
|
|
822
|
+
cp YOUR_CHANNEL_SECRET ~/.pi-harness-runtime/keys/line-channel-secret.txt
|
|
823
|
+
|
|
824
|
+
# Get from LINE Developers Console > Messaging API > Webhook URL
|
|
825
|
+
# Set to: https://line-api.your-domain.com/webhook/line
|
|
826
|
+
```
|
|
827
|
+
|
|
828
|
+
**5. Create Webhook Server**
|
|
829
|
+
|
|
830
|
+
```bash
|
|
831
|
+
# Create startup script
|
|
832
|
+
mkdir -p ~/line-webhook
|
|
833
|
+
cp pi-harness-runtime/packages/voice-api/dist/*.js ~/line-webhook/
|
|
834
|
+
|
|
835
|
+
# Run server
|
|
836
|
+
bun run ~/line-webhook/server.ts
|
|
837
|
+
```
|
|
838
|
+
|
|
839
|
+
**6. Set Webhook URL in LINE Console**
|
|
840
|
+
|
|
841
|
+
1. Go to LINE Developers Console → Messaging API → Messaging settings
|
|
842
|
+
2. Set Webhook URL: `https://line-api.your-domain.com/webhook/line`
|
|
843
|
+
3. Click Verify
|
|
844
|
+
|
|
845
|
+
#### Systemd Service (Auto-Restart)
|
|
846
|
+
|
|
847
|
+
```bash
|
|
848
|
+
sudo tee /etc/systemd/system/line-webhook.service > /dev/null << 'SERVICE'
|
|
849
|
+
[Unit]
|
|
850
|
+
Description=LINE Webhook Server for pi-harness
|
|
851
|
+
After=network.target
|
|
852
|
+
|
|
853
|
+
[Service]
|
|
854
|
+
Type=simple
|
|
855
|
+
User=YOUR_USER
|
|
856
|
+
WorkingDirectory=/home/YOUR_USER/line-webhook
|
|
857
|
+
ExecStart=/home/YOUR_USER/.bun/bin/bun run /home/YOUR_USER/line-webhook/server.ts
|
|
858
|
+
Restart=always
|
|
859
|
+
RestartSec=5
|
|
860
|
+
StandardOutput=journal
|
|
861
|
+
StandardError=journal
|
|
862
|
+
|
|
863
|
+
[Install]
|
|
864
|
+
WantedBy=multi-user.target
|
|
865
|
+
SERVICE
|
|
866
|
+
|
|
867
|
+
sudo systemctl daemon-reload
|
|
868
|
+
sudo systemctl enable line-webhook.service
|
|
869
|
+
sudo systemctl start line-webhook.service
|
|
870
|
+
```
|
|
871
|
+
|
|
757
872
|
### Other Providers
|
|
758
873
|
|
|
759
874
|
No setup needed. The runtime reads TUI messages and captures quota-exhaustion signals.
|
|
@@ -780,6 +895,9 @@ footer updates immediately and the data persists in `mirror.json`.
|
|
|
780
895
|
|
|
781
896
|
Enable interactive Yes/No buttons in Telegram notifications for human approval.
|
|
782
897
|
|
|
898
|
+
> **Self-Hosting Required**: Telegram webhooks require your own server with HTTPS.
|
|
899
|
+
> This is NOT a hosted service. You must **clone this repository** and deploy your own webhook server.
|
|
900
|
+
|
|
783
901
|
### Architecture (Per-User Setup)
|
|
784
902
|
|
|
785
903
|
```
|
package/index.ts
CHANGED
|
@@ -2396,6 +2396,61 @@ function initJobPipeWatcher(pi: ExtensionAPI): void {
|
|
|
2396
2396
|
logToFile("[JobPipe]", "Watching for Telegram approval commands via API (polling every 60s)");
|
|
2397
2397
|
}
|
|
2398
2398
|
|
|
2399
|
+
// --- LINE Voice Queue Watcher: Listen for LINE voice commands ---------
|
|
2400
|
+
// Watches the LINE voice queue file and injects transcribed prompts into pi.
|
|
2401
|
+
//
|
|
2402
|
+
// Flow:
|
|
2403
|
+
// User sends voice message in LINE
|
|
2404
|
+
// → LINE sends webhook to our VPS
|
|
2405
|
+
// → VPS transcribes via Whisper API
|
|
2406
|
+
// → VPS writes command to line-voice-queue.jsonl
|
|
2407
|
+
// → pi-harness polls this file
|
|
2408
|
+
// → pi-harness injects prompt via steer
|
|
2409
|
+
function initLineVoiceQueue(pi: ExtensionAPI): void {
|
|
2410
|
+
const homedir = process.env.HOME || process.env.USERPROFILE || "/home/frappe";
|
|
2411
|
+
const queueFile = join(homedir, ".pi-harness-runtime", "line-voice-queue.jsonl");
|
|
2412
|
+
|
|
2413
|
+
const processLineVoiceQueue = async () => {
|
|
2414
|
+
try {
|
|
2415
|
+
const { existsSync, readFileSync, writeFileSync } = await import("node:fs");
|
|
2416
|
+
|
|
2417
|
+
if (!existsSync(queueFile)) {
|
|
2418
|
+
return;
|
|
2419
|
+
}
|
|
2420
|
+
|
|
2421
|
+
const content = readFileSync(queueFile, "utf-8");
|
|
2422
|
+
const lines = content.split("\n").filter((l) => l.trim());
|
|
2423
|
+
|
|
2424
|
+
if (lines.length === 0) {
|
|
2425
|
+
return;
|
|
2426
|
+
}
|
|
2427
|
+
|
|
2428
|
+
// Clear queue
|
|
2429
|
+
writeFileSync(queueFile, "", "utf-8");
|
|
2430
|
+
|
|
2431
|
+
for (const line of lines) {
|
|
2432
|
+
try {
|
|
2433
|
+
const cmd = JSON.parse(line) as { type: string; text: string; userId: string; timestamp: string };
|
|
2434
|
+
|
|
2435
|
+
if (cmd.type === "voice-prompt" && cmd.text) {
|
|
2436
|
+
logToFile("[LineVoice]", `Injecting voice prompt: "${cmd.text}"`);
|
|
2437
|
+
pi.sendUserMessage(cmd.text, { deliverAs: "steer" });
|
|
2438
|
+
logToFile("[LineVoice]", "Voice prompt injected via steer");
|
|
2439
|
+
}
|
|
2440
|
+
} catch {
|
|
2441
|
+
// Skip malformed lines
|
|
2442
|
+
}
|
|
2443
|
+
}
|
|
2444
|
+
} catch {
|
|
2445
|
+
// Ignore errors
|
|
2446
|
+
}
|
|
2447
|
+
};
|
|
2448
|
+
|
|
2449
|
+
// Poll every 5 seconds for new voice commands (voice is more time-sensitive than approvals)
|
|
2450
|
+
setInterval(processLineVoiceQueue, 5_000);
|
|
2451
|
+
logToFile("[LineVoice]", `Watching LINE voice queue: ${queueFile} (polling every 5s)`);
|
|
2452
|
+
}
|
|
2453
|
+
|
|
2399
2454
|
export default async function (pi: ExtensionAPI) {
|
|
2400
2455
|
const tracker = new UsageTracker();
|
|
2401
2456
|
const mirrorStore = new MirrorStore();
|
|
@@ -2442,6 +2497,9 @@ export default async function (pi: ExtensionAPI) {
|
|
|
2442
2497
|
// Collect promise so we can wait for initialization before showing startup notification
|
|
2443
2498
|
asyncInitPromises.push(initTelegram(pi));
|
|
2444
2499
|
|
|
2500
|
+
// --- line-voice-queue: Watch for LINE voice commands ----
|
|
2501
|
+
void initLineVoiceQueue(pi);
|
|
2502
|
+
|
|
2445
2503
|
// --- codex-watcher: Auto-trigger Pi when Codex finishes a plan ---
|
|
2446
2504
|
// Flow: detect plan -> settle timer -> file stability check -> cwd match -> trigger
|
|
2447
2505
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-harness/capability-registry",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.342",
|
|
4
4
|
"description": "Capability Registry for pi-harness-runtime — tracks model capabilities and enables capability-based routing",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|