pi-harness-runtime 1.1.375 → 1.1.376
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 +68 -39
- package/package.json +2 -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/dist/ws-server.d.ts +48 -0
- package/packages/relay/dist/ws-server.js +130 -0
- package/packages/relay/package.json +1 -1
- package/packages/relay/src/ws-server.ts +165 -0
- 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/package.json +1 -1
- 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/scripts/relay-client.ts +175 -0
- package/scripts/sync-callback-queue.ts +57 -0
- package/scripts/telegram-callback-processor.ts +16 -0
- package/scripts/unified-webhook-server.ts +142 -129
package/README.md
CHANGED
|
@@ -905,76 +905,105 @@ footer updates immediately and the data persists in `mirror.json`.
|
|
|
905
905
|
- [ ] Production stress testing
|
|
906
906
|
- [ ] RFC-0101: Autonomous Operations Runtime (background execution, task inbox, lease protocol)
|
|
907
907
|
|
|
908
|
-
## Telegram
|
|
908
|
+
## Unified Webhook Server (Telegram + LINE)
|
|
909
909
|
|
|
910
|
-
|
|
910
|
+
Single server handles both Telegram and LINE webhooks on one domain.
|
|
911
911
|
|
|
912
|
-
> **Self-Hosting Required**:
|
|
913
|
-
> This is NOT a hosted service.
|
|
912
|
+
> **Self-Hosting Required**: Webhooks require your own server with HTTPS.
|
|
913
|
+
> This is NOT a hosted service. Deploy your own webhook server.
|
|
914
914
|
|
|
915
|
-
### Architecture
|
|
915
|
+
### Architecture
|
|
916
916
|
|
|
917
917
|
```
|
|
918
|
-
USER A (you):
|
|
919
918
|
┌─────────────────────────────────────────────────────┐
|
|
920
|
-
│
|
|
921
|
-
│
|
|
922
|
-
│
|
|
919
|
+
│ Your Domain: webhook.your-domain.com │
|
|
920
|
+
│ ├── /telegram → Telegram webhook │
|
|
921
|
+
│ ├── /line → LINE webhook │
|
|
922
|
+
│ └── /health → Health check │
|
|
923
923
|
└─────────────────────────────────────────────────────┘
|
|
924
|
-
↕
|
|
924
|
+
↕
|
|
925
925
|
┌─────────────────────────────────────────────────────┐
|
|
926
|
-
│
|
|
927
|
-
│ ├── Telegram
|
|
928
|
-
│ ├──
|
|
929
|
-
│ └──
|
|
926
|
+
│ Unified Webhook Server (port 8443) │
|
|
927
|
+
│ ├── Telegram callbacks (approve/reject) │
|
|
928
|
+
│ ├── LINE postbacks (approve/reject) │
|
|
929
|
+
│ └── Text messages → agent │
|
|
930
930
|
└─────────────────────────────────────────────────────┘
|
|
931
931
|
↕
|
|
932
932
|
┌─────────────────────────────────────────────────────┐
|
|
933
|
-
│
|
|
934
|
-
│ └──
|
|
933
|
+
│ Local Machine: ~/.pi-harness-runtime/ │
|
|
934
|
+
│ └── Callback queue → injects to pi │
|
|
935
935
|
└─────────────────────────────────────────────────────┘
|
|
936
936
|
```
|
|
937
937
|
|
|
938
|
-
**Each user needs their own server with:**
|
|
939
|
-
1. Telegram bot token + chat ID
|
|
940
|
-
2. Public HTTPS URL (for webhook)
|
|
941
|
-
3. Running webhook server + callback processor
|
|
942
|
-
|
|
943
938
|
### Setup
|
|
944
939
|
|
|
945
940
|
1. **Create Telegram Bot**
|
|
946
941
|
```bash
|
|
947
942
|
# DM @BotFather → /newbot → get token
|
|
948
|
-
# DM @userinfobot → get your chat ID
|
|
949
943
|
echo "YOUR_BOT_TOKEN" > ~/.pi-harness-runtime/keys/telegram-bot-token.txt
|
|
950
|
-
echo "YOUR_CHAT_ID" > ~/.pi-harness-runtime/keys/telegram-chat-id.txt
|
|
951
944
|
```
|
|
952
945
|
|
|
953
|
-
2. **
|
|
946
|
+
2. **Configure LINE** (if using LINE)
|
|
954
947
|
```bash
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
TELEGRAM_WEBHOOK_URL="https://yourdomain.com/api/telegram/webhook" \
|
|
958
|
-
bun run scripts/telegram-webhook-server.ts
|
|
948
|
+
echo "YOUR_ACCESS_TOKEN" > ~/.pi-harness-runtime/keys/line-access-token.txt
|
|
949
|
+
echo "YOUR_CHANNEL_SECRET" > ~/.pi-harness-runtime/keys/line-channel-secret.txt
|
|
959
950
|
```
|
|
960
951
|
|
|
961
|
-
3. **
|
|
952
|
+
3. **User Authorization**
|
|
962
953
|
```bash
|
|
963
|
-
|
|
954
|
+
echo "123456789" > ~/.pi-harness-runtime/keys/telegram-allowed-users.txt
|
|
964
955
|
```
|
|
965
956
|
|
|
966
|
-
4. **
|
|
967
|
-
```
|
|
968
|
-
|
|
957
|
+
4. **Start Unified Webhook Server**
|
|
958
|
+
```bash
|
|
959
|
+
bun run scripts/unified-webhook-server.ts
|
|
960
|
+
```
|
|
969
961
|
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
962
|
+
5. **Set Webhook URLs**
|
|
963
|
+
- Telegram: `https://webhook.your-domain.com/telegram`
|
|
964
|
+
- LINE: `https://webhook.your-domain.com/line`
|
|
965
|
+
|
|
966
|
+
6. **Systemd Service (auto-restart on reboot)**
|
|
967
|
+
```ini
|
|
968
|
+
[Unit]
|
|
969
|
+
Description=Unified Webhook Server (Telegram + LINE)
|
|
970
|
+
After=network.target
|
|
971
|
+
|
|
972
|
+
[Service]
|
|
973
|
+
Type=simple
|
|
974
|
+
User=frappe
|
|
975
|
+
ExecStart=/home/frappe/.bun/bin/bun run /home/frappe/unified-webhook-server.ts
|
|
976
|
+
Restart=always
|
|
977
|
+
RestartSec=5
|
|
978
|
+
|
|
979
|
+
[Install]
|
|
980
|
+
WantedBy=multi-user.target
|
|
975
981
|
```
|
|
976
982
|
|
|
977
|
-
|
|
983
|
+
### NGINX Configuration
|
|
984
|
+
|
|
985
|
+
```nginx
|
|
986
|
+
server {
|
|
987
|
+
server_name webhook.your-domain.com;
|
|
988
|
+
listen 443 ssl;
|
|
989
|
+
ssl_certificate /etc/letsencrypt/live/webhook.your-domain.com/fullchain.pem;
|
|
990
|
+
ssl_certificate_key /etc/letsencrypt/live/webhook.your-domain.com/privkey.pem;
|
|
991
|
+
|
|
992
|
+
location /telegram {
|
|
993
|
+
proxy_pass http://127.0.0.1:8443/telegram;
|
|
994
|
+
proxy_http_version 1.1;
|
|
995
|
+
proxy_set_header Host $host;
|
|
996
|
+
proxy_set_header X-Real-IP $remote_addr;
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
location /line {
|
|
1000
|
+
proxy_pass http://127.0.0.1:8443/line;
|
|
1001
|
+
proxy_http_version 1.1;
|
|
1002
|
+
proxy_set_header Host $host;
|
|
1003
|
+
proxy_set_header X-Real-IP $remote_addr;
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
```
|
|
978
1007
|
|
|
979
1008
|
### User Authorization
|
|
980
1009
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-harness-runtime",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.376",
|
|
4
4
|
"description": "[BETA] Codex-style /usage status + autonomous coding harness for pi. Not production ready — expect breaking changes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -108,6 +108,7 @@
|
|
|
108
108
|
"deepagents": "^1.10.5",
|
|
109
109
|
"langchain": "^1.5.10",
|
|
110
110
|
"pi-mcp-adapter": "3.3.0",
|
|
111
|
+
"ws": "^8.22.0",
|
|
111
112
|
"zod": "^4.5.4"
|
|
112
113
|
}
|
|
113
114
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-harness/capability-registry",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.376",
|
|
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",
|