pi-harness-runtime 1.1.332 → 1.1.334
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 +2 -2
- package/RULES.md +45 -0
- package/harness/skill-sync.ts +11 -2
- package/harness/wiki-integration.ts +6 -6
- package/package.json +3 -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/context-compiler/package.json +1 -1
- package/packages/context-discovery/package.json +1 -1
- package/packages/context-manager/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-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/dist/index.js +1 -1
- package/packages/paperclip-integration/dist/index.js.map +1 -1
- package/packages/paperclip-integration/package.json +1 -1
- package/packages/paperclip-integration/src/index.ts +1 -1
- package/packages/performance-optimizer/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/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/webmcp-tester/package.json +1 -1
- package/packages/wiki/dist/index.js +2 -2
- package/packages/wiki/dist/index.js.map +1 -1
- package/packages/wiki/dist/storage.d.ts +4 -0
- package/packages/wiki/dist/storage.d.ts.map +1 -1
- package/packages/wiki/dist/storage.js +40 -2
- package/packages/wiki/dist/storage.js.map +1 -1
- package/packages/wiki/dist/types.d.ts +1 -0
- package/packages/wiki/dist/types.d.ts.map +1 -1
- package/packages/wiki/dist/types.js.map +1 -1
- package/packages/wiki/package.json +1 -1
- package/packages/wiki/src/index.ts +2 -2
- package/packages/wiki/src/storage.ts +41 -2
- package/packages/wiki/src/types.ts +1 -0
- 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/r2-storage.ts +217 -0
- package/scripts/telegram-mobile-bot.ts +438 -0
- package/scripts/telegram-mobile-integration.ts +480 -0
- package/scripts/test-r2.ts +63 -0
- package/scripts/test-telegram-approval.ts +4 -1
package/README.md
CHANGED
|
@@ -596,14 +596,14 @@ mkdir -p ~/.pi-harness-runtime/keys
|
|
|
596
596
|
cat > ~/.pi-harness-runtime/keys/paperclip-config.json << 'EOF'
|
|
597
597
|
{
|
|
598
598
|
"apiKey": "your-agent-api-key-here",
|
|
599
|
-
"baseUrl": "https://paperclip.
|
|
599
|
+
"baseUrl": "https://paperclip.example.com/api",
|
|
600
600
|
"companyId": "your-company-id"
|
|
601
601
|
}
|
|
602
602
|
EOF
|
|
603
603
|
|
|
604
604
|
# Option 2: Individual files
|
|
605
605
|
# echo "your-agent-api-key-here" > ~/.pi-harness-runtime/keys/paperclip-api-key.txt
|
|
606
|
-
# echo "https://paperclip.
|
|
606
|
+
# echo "https://paperclip.example.com/api" > ~/.pi-harness-runtime/keys/paperclip-base-url.txt
|
|
607
607
|
```
|
|
608
608
|
|
|
609
609
|
### Architecture
|
package/RULES.md
CHANGED
|
@@ -71,3 +71,48 @@ Do not assume the current terminal is on a different machine.
|
|
|
71
71
|
> SSH destination matches this environment. Run the command locally, or explain why a separate SSH session is required.
|
|
72
72
|
|
|
73
73
|
Do not automatically rewrite SSH commands into local commands. SSH may intentionally use another account, a container boundary, or forwarding. Hostnames and SSH aliases need resolution; comparing the command's hostname directly with `ip address` output is insufficient.
|
|
74
|
+
|
|
75
|
+
## Sensitive Data (STRICT)
|
|
76
|
+
|
|
77
|
+
**This is a PUBLIC repository. Never put sensitive data in the codebase.**
|
|
78
|
+
|
|
79
|
+
All secrets, tokens, URLs, API keys, and credentials MUST be stored in key files:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
~/.pi-harness-runtime/keys/
|
|
83
|
+
├── telegram-bot-token.txt # Telegram bot token
|
|
84
|
+
├── telegram-chat-id.txt # Authorized chat ID
|
|
85
|
+
├── telegram-webhook-url.txt # Webhook URL
|
|
86
|
+
├── telegram-webhook-secret.txt # Webhook secret token
|
|
87
|
+
├── skills-saas-url.txt # Skills SaaS base URL
|
|
88
|
+
├── paperclip-base-url.txt # Paperclip API URL
|
|
89
|
+
├── r2-account-id.txt # Cloudflare R2 account ID
|
|
90
|
+
├── r2-access-key-id.txt # R2 access key ID
|
|
91
|
+
├── r2-secret-access-key.txt # R2 secret access key
|
|
92
|
+
├── r2-bucket-name.txt # R2 bucket name
|
|
93
|
+
├── r2-endpoint.txt # R2 endpoint (usually auto)
|
|
94
|
+
├── r2-public-url-prefix.txt # R2 public URL prefix (optional)
|
|
95
|
+
└── ...
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**RULES (enforced strictly):**
|
|
99
|
+
- No hardcoded URLs, tokens, API keys, or secrets in source code
|
|
100
|
+
- No real domain names (use `example.com` or `yourdomain.com` as placeholder)
|
|
101
|
+
- No API keys, tokens, or credentials in comments
|
|
102
|
+
- No IP addresses in source code
|
|
103
|
+
- All external service URLs must be in key files or environment variables
|
|
104
|
+
- README/docs must use generic placeholders
|
|
105
|
+
|
|
106
|
+
**Loading secrets from key files:**
|
|
107
|
+
```bash
|
|
108
|
+
# Read from key file
|
|
109
|
+
TELEGRAM_BOT_TOKEN=$(cat ~/.pi-harness-runtime/keys/telegram-bot-token.txt)
|
|
110
|
+
|
|
111
|
+
# Or in code
|
|
112
|
+
const token = readFileSync("~/.pi-harness-runtime/keys/telegram-bot-token.txt", "utf8").trim();
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Scanning:** Before committing, run:
|
|
116
|
+
```bash
|
|
117
|
+
grep -rn "moo-vpn\|bunchee\|moo-ai\|moocoding\|sk-\|api_key\|token\s*=" --include="*.ts" --include="*.md"
|
|
118
|
+
```
|
package/harness/skill-sync.ts
CHANGED
|
@@ -33,8 +33,17 @@ async function getClient(): Promise<SkillMCPClient | null> {
|
|
|
33
33
|
try {
|
|
34
34
|
const mod = await import("../packages/skill-mcp-client/src/client.js");
|
|
35
35
|
const SkillMCPClientClass = mod.SkillMCPClient;
|
|
36
|
-
const serverUrl =
|
|
37
|
-
|
|
36
|
+
const serverUrl = await getSkillsSaasUrl();
|
|
37
|
+
|
|
38
|
+
async function getSkillsSaasUrl(): Promise<string> {
|
|
39
|
+
if (process.env.SKILLS_SAAS_URL) return process.env.SKILLS_SAAS_URL;
|
|
40
|
+
try {
|
|
41
|
+
const { readFileSync, existsSync } = await import("node:fs");
|
|
42
|
+
const keyFile = `${process.env.HOME}/.pi-harness-runtime/keys/skills-saas-url.txt`;
|
|
43
|
+
if (existsSync(keyFile)) return readFileSync(keyFile, "utf8").trim();
|
|
44
|
+
} catch {}
|
|
45
|
+
return "https://api.skills.example.com";
|
|
46
|
+
}
|
|
38
47
|
|
|
39
48
|
clientInstance = new SkillMCPClientClass({
|
|
40
49
|
serverUrl,
|
|
@@ -87,7 +87,7 @@ export async function initWiki(pi: ExtensionAPI): Promise<void> {
|
|
|
87
87
|
return { content: [{ type: "text", text: "Wiki feature is disabled." }], details: {} };
|
|
88
88
|
}
|
|
89
89
|
try {
|
|
90
|
-
const wiki = getWiki(getCurrentWorkspace(ctx));
|
|
90
|
+
const wiki = await getWiki(getCurrentWorkspace(ctx));
|
|
91
91
|
const results = wiki.search(params.query, undefined, params.limit ?? 5);
|
|
92
92
|
if (results.length === 0) {
|
|
93
93
|
return { content: [{ type: "text", text: "No results found." }], details: {} };
|
|
@@ -115,7 +115,7 @@ export async function initWiki(pi: ExtensionAPI): Promise<void> {
|
|
|
115
115
|
return { content: [{ type: "text", text: "Wiki feature is disabled." }], details: {} };
|
|
116
116
|
}
|
|
117
117
|
try {
|
|
118
|
-
const wiki = getWiki(getCurrentWorkspace(ctx));
|
|
118
|
+
const wiki = await getWiki(getCurrentWorkspace(ctx));
|
|
119
119
|
const page = wiki.loadPage(params.pageId);
|
|
120
120
|
if (!page) {
|
|
121
121
|
return { content: [{ type: "text", text: `Page not found: ${params.pageId}` }], details: {} };
|
|
@@ -150,7 +150,7 @@ export async function initWiki(pi: ExtensionAPI): Promise<void> {
|
|
|
150
150
|
return { content: [{ type: "text", text: "Wiki feature is disabled." }], details: {} };
|
|
151
151
|
}
|
|
152
152
|
try {
|
|
153
|
-
const wiki = getWiki(getCurrentWorkspace(ctx));
|
|
153
|
+
const wiki = await getWiki(getCurrentWorkspace(ctx));
|
|
154
154
|
const { page, snapshot, existing } = wiki.ingestAndCreatePage(params.sourcePath);
|
|
155
155
|
if (existing) {
|
|
156
156
|
return { content: [{ type: "text", text: `Already ingested: ${snapshot.id}` }], details: {} };
|
|
@@ -179,7 +179,7 @@ export async function initWiki(pi: ExtensionAPI): Promise<void> {
|
|
|
179
179
|
return { content: [{ type: "text", text: "Wiki feature is disabled." }], details: {} };
|
|
180
180
|
}
|
|
181
181
|
try {
|
|
182
|
-
const wiki = getWiki(getCurrentWorkspace(ctx));
|
|
182
|
+
const wiki = await getWiki(getCurrentWorkspace(ctx));
|
|
183
183
|
const findings = wiki.lint();
|
|
184
184
|
if (findings.length === 0) {
|
|
185
185
|
return { content: [{ type: "text", text: "No issues found." }], details: {} };
|
|
@@ -205,7 +205,7 @@ export async function initWiki(pi: ExtensionAPI): Promise<void> {
|
|
|
205
205
|
return { content: [{ type: "text", text: "Wiki feature is disabled." }], details: {} };
|
|
206
206
|
}
|
|
207
207
|
try {
|
|
208
|
-
const wiki = getWiki(getCurrentWorkspace(ctx));
|
|
208
|
+
const wiki = await getWiki(getCurrentWorkspace(ctx));
|
|
209
209
|
const pages = wiki.getAllPages();
|
|
210
210
|
const kinds: Record<string, number> = {};
|
|
211
211
|
const statuses: Record<string, number> = {};
|
|
@@ -241,7 +241,7 @@ export async function initWiki(pi: ExtensionAPI): Promise<void> {
|
|
|
241
241
|
// Get workspace from context
|
|
242
242
|
const extCtx = ctx as ExtensionContext | undefined;
|
|
243
243
|
const workspace = getCurrentWorkspace(extCtx);
|
|
244
|
-
const wiki = getWiki(workspace);
|
|
244
|
+
const wiki = await getWiki(workspace);
|
|
245
245
|
const parts = args.trim().split(/\s+/);
|
|
246
246
|
const subcommand = parts[0] || "help";
|
|
247
247
|
const subargs = parts.slice(1).join(" ");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-harness-runtime",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.334",
|
|
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": {
|
|
@@ -95,6 +95,8 @@
|
|
|
95
95
|
"packages/*"
|
|
96
96
|
],
|
|
97
97
|
"dependencies": {
|
|
98
|
+
"@aws-sdk/client-s3": "^3.1152.0",
|
|
99
|
+
"@aws-sdk/s3-request-presigner": "^3.1152.0",
|
|
98
100
|
"@earendil-works/chord": "^1.3.0",
|
|
99
101
|
"@earendil-works/pi-durable": "^1.3.0",
|
|
100
102
|
"@langchain/core": "^1.2.9",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-harness/capability-registry",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.334",
|
|
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",
|