thepopebot 1.2.75-beta.2 → 1.2.75-beta.21
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 +1 -1
- package/api/CLAUDE.md +1 -1
- package/api/index.js +5 -12
- package/bin/CLAUDE.md +1 -1
- package/bin/cli.js +329 -14
- package/bin/docker-build.js +5 -0
- package/bin/managed-paths.js +0 -7
- package/bin/sync.js +84 -0
- package/config/CLAUDE.md +1 -29
- package/config/instrumentation.js +1 -1
- package/lib/CLAUDE.md +3 -3
- package/lib/ai/CLAUDE.md +24 -3
- package/lib/ai/agent.js +8 -5
- package/lib/ai/async-channel.js +51 -0
- package/lib/ai/headless-stream.js +3 -0
- package/lib/ai/index.js +149 -173
- package/lib/ai/line-mappers.js +72 -9
- package/lib/ai/tools.js +40 -28
- package/lib/chat/actions.js +34 -6
- package/lib/chat/api.js +17 -1
- package/lib/chat/components/chat-header.js +4 -0
- package/lib/chat/components/chat-header.jsx +4 -0
- package/lib/chat/components/chat-input.js +1 -0
- package/lib/chat/components/chat-input.jsx +1 -0
- package/lib/chat/components/chat.js +9 -1
- package/lib/chat/components/chat.jsx +15 -2
- package/lib/chat/components/chats-page.js +3 -3
- package/lib/chat/components/chats-page.jsx +4 -6
- package/lib/chat/components/crons-page.js +1 -1
- package/lib/chat/components/crons-page.jsx +1 -1
- package/lib/chat/components/message.js +12 -4
- package/lib/chat/components/message.jsx +17 -4
- package/lib/chat/components/settings-chat-page.js +2 -1
- package/lib/chat/components/settings-chat-page.jsx +4 -1
- package/lib/chat/components/settings-coding-agents-page.js +139 -1
- package/lib/chat/components/settings-coding-agents-page.jsx +160 -0
- package/lib/chat/components/settings-jobs-page.js +13 -2
- package/lib/chat/components/settings-jobs-page.jsx +15 -1
- package/lib/chat/components/settings-secrets-layout.js +1 -1
- package/lib/chat/components/settings-secrets-layout.jsx +1 -1
- package/lib/chat/components/sidebar-history-item.js +3 -3
- package/lib/chat/components/sidebar-history-item.jsx +4 -6
- package/lib/chat/components/triggers-page.js +1 -1
- package/lib/chat/components/triggers-page.jsx +1 -1
- package/lib/cluster/actions.js +4 -4
- package/lib/cluster/execute.js +3 -1
- package/lib/code/actions.js +34 -11
- package/lib/code/code-page.js +40 -40
- package/lib/code/code-page.jsx +36 -36
- package/lib/code/port-forwards.js +17 -3
- package/lib/code/terminal-view.js +16 -0
- package/lib/code/terminal-view.jsx +18 -0
- package/lib/config.js +4 -0
- package/lib/cron.js +3 -3
- package/lib/db/api-keys.js +22 -61
- package/lib/db/config.js +23 -0
- package/lib/db/index.js +3 -1
- package/lib/maintenance.js +34 -11
- package/lib/paths.js +1 -38
- package/lib/tools/create-agent-job.js +0 -4
- package/lib/tools/docker.js +23 -16
- package/lib/triggers.js +4 -3
- package/lib/utils/render-md.js +3 -1
- package/package.json +2 -1
- package/setup/setup-ssl.mjs +414 -0
- package/templates/.github/workflows/rebuild-event-handler.yml +3 -0
- package/templates/.github/workflows/upgrade-event-handler.yml +1 -1
- package/templates/.gitignore.template +7 -3
- package/templates/.tmp/CLAUDE.md.template +5 -0
- package/templates/CLAUDE.md +3 -2
- package/templates/CLAUDE.md.template +24 -357
- package/templates/agent-job/CLAUDE.md.template +57 -0
- package/templates/agent-job/CRONS.json +16 -0
- package/templates/{config/agent-job → agent-job}/SOUL.md +3 -3
- package/templates/agent-job/SYSTEM.md +60 -0
- package/templates/agents/CLAUDE.md.template +54 -0
- package/templates/data/CLAUDE.md.template +5 -0
- package/templates/docker-compose.custom.yml +41 -62
- package/templates/docker-compose.yml +14 -21
- package/templates/event-handler/CLAUDE.md.template +0 -0
- package/templates/logs/CLAUDE.md.template +5 -0
- package/templates/skills/CLAUDE.md.template +57 -32
- package/templates/skills/active/.gitkeep +0 -0
- package/templates/skills/library/agent-job-secrets/SKILL.md +23 -0
- package/templates/skills/library/agent-job-secrets/agent-job-secrets.js +62 -0
- package/templates/.pi/extensions/env-sanitizer/index.ts +0 -48
- package/templates/.pi/extensions/env-sanitizer/package.json +0 -5
- package/templates/README.md +0 -75
- package/templates/config/CLAUDE.md.template +0 -40
- package/templates/config/CRONS.json +0 -56
- package/templates/config/agent-job/AGENT_JOB.md +0 -30
- package/templates/cron/CLAUDE.md.template +0 -24
- package/templates/docker-compose.litellm.yml +0 -82
- package/templates/docs/CLAUDE.md.template +0 -12
- package/templates/docs/CLI.md +0 -59
- package/templates/docs/CLUSTERS.md +0 -151
- package/templates/docs/CONFIGURATION.md +0 -181
- package/templates/docs/CRONS_AND_TRIGGERS.md +0 -132
- package/templates/docs/GETTING_STARTED.md +0 -64
- package/templates/docs/SECURITY.md +0 -61
- package/templates/docs/SKILLS.md +0 -113
- package/templates/docs/UPGRADING.md +0 -92
- package/templates/skills/LICENSE +0 -21
- package/templates/skills/README.md +0 -117
- package/templates/skills/agent-job-secrets/SKILL.md +0 -25
- package/templates/skills/agent-job-secrets/agent-job-secrets.js +0 -66
- package/templates/traefik-dynamic.yml.example +0 -7
- package/templates/triggers/CLAUDE.md.template +0 -41
- /package/templates/{config → agent-job}/HEARTBEAT.md +0 -0
- /package/templates/{cron → data}/.gitkeep +0 -0
- /package/templates/{logs → data/clusters}/.gitkeep +0 -0
- /package/templates/{triggers → data/db}/.gitkeep +0 -0
- /package/templates/{config/agent-job → event-handler}/SUMMARY.md +0 -0
- /package/templates/{config → event-handler}/TRIGGERS.json +0 -0
- /package/templates/{config → event-handler}/agent-chat/SYSTEM.md +0 -0
- /package/templates/{config/cluster → event-handler/clusters}/ROLE.md +0 -0
- /package/templates/{config/cluster → event-handler/clusters}/SYSTEM.md +0 -0
- /package/templates/{config → event-handler}/code-chat/SYSTEM.md +0 -0
- /package/templates/{config → event-handler}/litellm/main.yaml +0 -0
- /package/templates/skills/{playwright-cli → library/playwright-cli}/SKILL.md +0 -0
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { readFileSync } from 'fs';
|
|
3
|
-
|
|
4
|
-
const [cmd, key, inlineValue] = process.argv.slice(2);
|
|
5
|
-
|
|
6
|
-
// Default to list
|
|
7
|
-
if (!cmd || cmd === 'list') {
|
|
8
|
-
const secretsJson = process.env.AGENT_JOB_SECRETS;
|
|
9
|
-
if (!secretsJson) {
|
|
10
|
-
console.log('No agent secrets configured.');
|
|
11
|
-
process.exit(0);
|
|
12
|
-
}
|
|
13
|
-
const secrets = JSON.parse(secretsJson);
|
|
14
|
-
const keys = Object.keys(secrets);
|
|
15
|
-
if (keys.length === 0) {
|
|
16
|
-
console.log('No agent secrets configured.');
|
|
17
|
-
} else {
|
|
18
|
-
console.log('Available secrets:');
|
|
19
|
-
keys.forEach(k => {
|
|
20
|
-
const fetchRequired = secrets[k] === null;
|
|
21
|
-
console.log(` - ${k}${fetchRequired ? ' (fetch required: use get)' : ''}`);
|
|
22
|
-
});
|
|
23
|
-
console.log('\nTo get a value: agent-job-secrets.js get KEY_NAME');
|
|
24
|
-
}
|
|
25
|
-
process.exit(0);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const apiKey = process.env.AGENT_JOB_TOKEN;
|
|
29
|
-
const appUrl = process.env.APP_URL;
|
|
30
|
-
if (!apiKey) { console.error('AGENT_JOB_TOKEN not available'); process.exit(1); }
|
|
31
|
-
if (!appUrl) { console.error('APP_URL not available'); process.exit(1); }
|
|
32
|
-
|
|
33
|
-
if (cmd === 'get') {
|
|
34
|
-
if (!key) { console.error('Usage: agent-job-secrets.js get KEY_NAME'); process.exit(1); }
|
|
35
|
-
const res = await fetch(`${appUrl}/api/get-agent-job-secret?key=${encodeURIComponent(key)}`, {
|
|
36
|
-
headers: { 'x-api-key': apiKey },
|
|
37
|
-
});
|
|
38
|
-
const json = await res.json();
|
|
39
|
-
if (!res.ok || json.error) { console.error('Failed:', json.error || res.status); process.exit(1); }
|
|
40
|
-
console.log(json.value);
|
|
41
|
-
process.exit(0);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (cmd === 'set') {
|
|
45
|
-
if (!key) {
|
|
46
|
-
console.error('Usage: agent-job-secrets.js set KEY_NAME [value]');
|
|
47
|
-
console.error(' echo "value" | agent-job-secrets.js set KEY_NAME');
|
|
48
|
-
process.exit(1);
|
|
49
|
-
}
|
|
50
|
-
let value = inlineValue;
|
|
51
|
-
if (value === undefined) {
|
|
52
|
-
value = readFileSync('/dev/stdin', 'utf8').trim();
|
|
53
|
-
}
|
|
54
|
-
const res = await fetch(`${appUrl}/api/set-agent-job-secret`, {
|
|
55
|
-
method: 'POST',
|
|
56
|
-
headers: { 'Content-Type': 'application/json', 'x-api-key': apiKey },
|
|
57
|
-
body: JSON.stringify({ key, value }),
|
|
58
|
-
});
|
|
59
|
-
const json = await res.json();
|
|
60
|
-
if (!res.ok || json.error) { console.error('Failed:', json.error || res.status); process.exit(1); }
|
|
61
|
-
console.log(`Secret "${key}" updated.`);
|
|
62
|
-
process.exit(0);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
console.error(`Unknown command: ${cmd}`);
|
|
66
|
-
process.exit(1);
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# Traefik dynamic config for Tailscale TLS
|
|
2
|
-
# Copy this file to traefik-dynamic.yml and replace YOUR_HOSTNAME
|
|
3
|
-
# with your full Tailscale machine name (e.g. mybot.taila1b2c3.ts.net)
|
|
4
|
-
tls:
|
|
5
|
-
certificates:
|
|
6
|
-
- certFile: /certs/YOUR_HOSTNAME.crt
|
|
7
|
-
keyFile: /certs/YOUR_HOSTNAME.key
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# triggers/ — Trigger Action Scripts
|
|
2
|
-
|
|
3
|
-
This directory holds scripts referenced by `command`-type entries in `config/TRIGGERS.json`.
|
|
4
|
-
|
|
5
|
-
When a `command`-type trigger fires, the working directory is `triggers/`.
|
|
6
|
-
|
|
7
|
-
## Example
|
|
8
|
-
|
|
9
|
-
In `config/TRIGGERS.json`:
|
|
10
|
-
```json
|
|
11
|
-
{
|
|
12
|
-
"name": "Deploy Hook",
|
|
13
|
-
"watch_path": "/webhook/deploy",
|
|
14
|
-
"enabled": true,
|
|
15
|
-
"actions": [
|
|
16
|
-
{
|
|
17
|
-
"type": "command",
|
|
18
|
-
"command": "node on-deploy.js {{body.environment}}"
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
This runs `triggers/on-deploy.js` when a POST hits `/webhook/deploy`.
|
|
25
|
-
|
|
26
|
-
## Template Tokens
|
|
27
|
-
|
|
28
|
-
`command` (and `job`) strings support template tokens resolved from the incoming request:
|
|
29
|
-
|
|
30
|
-
| Token | Resolves to |
|
|
31
|
-
|-------|-------------|
|
|
32
|
-
| `{{body}}` | Entire request body as JSON |
|
|
33
|
-
| `{{body.field}}` | Nested field from request body |
|
|
34
|
-
| `{{query}}` | All query parameters as JSON |
|
|
35
|
-
| `{{query.field}}` | Specific query parameter |
|
|
36
|
-
| `{{headers}}` | All request headers as JSON |
|
|
37
|
-
| `{{headers.field}}` | Specific request header |
|
|
38
|
-
|
|
39
|
-
## Action Types
|
|
40
|
-
|
|
41
|
-
Most trigger entries use `type: "agent"` (the default) which spins up a Docker agent. Only `command`-type entries reference scripts in this directory. See `config/TRIGGERS.json` for the full trigger configuration and the root `CLAUDE.md` for all action type details.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|