thepopebot 1.2.75-beta.19 → 1.2.75-beta.20

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/bin/cli.js CHANGED
@@ -284,8 +284,8 @@ async function init() {
284
284
  for (const skill of defaultSkills) {
285
285
  const symlink = path.join(activeDir, skill);
286
286
  if (!fs.existsSync(symlink)) {
287
- createDirLink(`../${skill}`, symlink);
288
- console.log(` Created skills/active/${skill} → ../${skill}`);
287
+ createDirLink(`../library/${skill}`, symlink);
288
+ console.log(` Created skills/active/${skill} → ../library/${skill}`);
289
289
  }
290
290
  }
291
291
 
@@ -88,6 +88,7 @@ function ChatInput({ input, setInput, onSubmit, status, stop, files, setFiles, d
88
88
  if (!textarea) return;
89
89
  textarea.style.height = "auto";
90
90
  textarea.style.height = `${textarea.scrollHeight}px`;
91
+ textarea.scrollTop = textarea.scrollHeight;
91
92
  }, []);
92
93
  useEffect(() => {
93
94
  adjustHeight();
@@ -70,6 +70,7 @@ export function ChatInput({ input, setInput, onSubmit, status, stop, files, setF
70
70
  if (!textarea) return;
71
71
  textarea.style.height = 'auto';
72
72
  textarea.style.height = `${textarea.scrollHeight}px`;
73
+ textarea.scrollTop = textarea.scrollHeight;
73
74
  }, []);
74
75
 
75
76
  useEffect(() => {
@@ -54,6 +54,7 @@ function TerminalView({ codeWorkspaceId, wsPath, isActive = true, showToolbar =
54
54
  const [voiceText, setVoiceText] = useState("");
55
55
  const [partialText, setPartialText] = useState("");
56
56
  const voiceDialogRef = useRef(null);
57
+ const voiceTextareaRef = useRef(null);
57
58
  const volumeRef = useRef(0);
58
59
  const { voiceAvailable, isConnecting, isRecording, startRecording, stopRecording } = useVoiceInput({
59
60
  getToken: getVoiceToken,
@@ -318,6 +319,11 @@ function TerminalView({ codeWorkspaceId, wsPath, isActive = true, showToolbar =
318
319
  document.addEventListener("keydown", handler);
319
320
  return () => document.removeEventListener("keydown", handler);
320
321
  }, [voiceDialogOpen, closeVoiceDialog]);
322
+ useEffect(() => {
323
+ if (voiceTextareaRef.current) {
324
+ voiceTextareaRef.current.scrollTop = voiceTextareaRef.current.scrollHeight;
325
+ }
326
+ }, [voiceText, partialText]);
321
327
  const themeIcon = termTheme === "light" ? /* @__PURE__ */ jsxs("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", children: [
322
328
  /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "3" }),
323
329
  /* @__PURE__ */ jsx("line", { x1: "8", y1: "1", x2: "8", y2: "3" }),
@@ -638,6 +644,7 @@ function TerminalView({ codeWorkspaceId, wsPath, isActive = true, showToolbar =
638
644
  /* @__PURE__ */ jsx(
639
645
  "textarea",
640
646
  {
647
+ ref: voiceTextareaRef,
641
648
  rows: 6,
642
649
  value: voiceText + (partialText ? (voiceText && !voiceText.endsWith(" ") ? " " : "") + partialText : ""),
643
650
  onChange: (e) => {
@@ -64,6 +64,7 @@ export default function TerminalView({ codeWorkspaceId, wsPath, isActive = true,
64
64
  const [voiceText, setVoiceText] = useState('');
65
65
  const [partialText, setPartialText] = useState('');
66
66
  const voiceDialogRef = useRef(null);
67
+ const voiceTextareaRef = useRef(null);
67
68
  const volumeRef = useRef(0);
68
69
 
69
70
  const { voiceAvailable, isConnecting, isRecording, startRecording, stopRecording } = useVoiceInput({
@@ -378,6 +379,13 @@ export default function TerminalView({ codeWorkspaceId, wsPath, isActive = true,
378
379
  return () => document.removeEventListener('keydown', handler);
379
380
  }, [voiceDialogOpen, closeVoiceDialog]);
380
381
 
382
+ // Auto-scroll voice textarea to bottom as text grows
383
+ useEffect(() => {
384
+ if (voiceTextareaRef.current) {
385
+ voiceTextareaRef.current.scrollTop = voiceTextareaRef.current.scrollHeight;
386
+ }
387
+ }, [voiceText, partialText]);
388
+
381
389
  const themeIcon = termTheme === 'light' ? (
382
390
  <svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round">
383
391
  <circle cx="8" cy="8" r="3" />
@@ -710,6 +718,7 @@ export default function TerminalView({ codeWorkspaceId, wsPath, isActive = true,
710
718
  {voiceDialogOpen && (
711
719
  <div className="code-voice-dialog">
712
720
  <textarea
721
+ ref={voiceTextareaRef}
713
722
  rows={6}
714
723
  value={voiceText + (partialText ? (voiceText && !voiceText.endsWith(' ') ? ' ' : '') + partialText : '')}
715
724
  onChange={(e) => { setVoiceText(e.target.value); setPartialText(''); }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thepopebot",
3
- "version": "1.2.75-beta.19",
3
+ "version": "1.2.75-beta.20",
4
4
  "type": "module",
5
5
  "description": "Create autonomous AI agents with a two-layer architecture: Next.js Event Handler + Docker Agent.",
6
6
  "bin": {
@@ -14,9 +14,6 @@
14
14
  # Pi system prompt (generated at runtime from SOUL.md)
15
15
  .pi/SYSTEM.md
16
16
 
17
- # Skills dependencies (installed at runtime in Docker for correct arch)
18
- skills/*/node_modules/
19
-
20
17
  # Dynamically activated skills (created at container runtime, not user config)
21
18
  skills/active/agent-job-secrets
22
19
 
@@ -5,9 +5,9 @@ This is a [thepopebot](https://github.com/stephengpope/thepopebot) project.
5
5
  ## Directories
6
6
 
7
7
  - **`agent-job/`** — Agent job configuration: system prompts (`SOUL.md`, `SYSTEM.md`), heartbeat prompt, and cron schedules (`CRONS.json`).
8
- - **`agents/`** — Custom agent definitions. Each subdirectory defines an agent.
8
+ - **`agents/`** — Custom agent definitions. Each subdirectory defines an agent (see Managing Agents below).
9
9
  - **`event-handler/`** — Event handler configuration: chat system prompts, trigger definitions (`TRIGGERS.json`), cluster templates, and LiteLLM proxy config.
10
- - **`skills/`** — Skill plugins. Activate by symlinking into `skills/active/`.
10
+ - **`skills/library/`** — Skill plugins. Activate by symlinking into `skills/active/`.
11
11
  - **`data/`** — Runtime data (SQLite database, cluster state). Not checked into git.
12
12
  - **`logs/`** — Agent job logs, organized by job ID. Not checked into git.
13
13
 
@@ -29,3 +29,7 @@ Some files are auto-synced by `npx thepopebot init` and will be overwritten on u
29
29
  - `agents/CLAUDE.md`
30
30
  - `event-handler/CLAUDE.md`
31
31
  - `skills/CLAUDE.md`
32
+
33
+ ## Agents
34
+
35
+ (No agents configured yet.)
@@ -9,18 +9,16 @@ Your workspace is `/home/coding-agent/workspace` — a live git repository.
9
9
  ## Temporary Files
10
10
  Use `/home/coding-agent/workspace/.tmp/` for working files — downloads, screenshots, intermediate data, scripts, generated files. `/home/coding-agent/workspace/.tmp/` is gitignored and nothing there gets committed. If a tool downloads a file, save it to `/home/coding-agent/workspace/.tmp/` and reference it directly.
11
11
 
12
- **DO NOT USE** `/tmp` because that will continue waste disk space writing extra layers to the container.
12
+ **DO NOT USE** `/tmp` because that will leak and waste disk space from writing extra layers to the container.
13
13
 
14
14
  Everything in the workspace is automatically committed and pushed when your job finishes. You do not control this. Be intentional about what you put here — **any file you create, move, or download into the workspace WILL be committed.**
15
15
 
16
- Current datetime: {{datetime}}
17
-
18
16
  ## Directory Layout
19
17
 
20
18
  - `agents/` — Agent definitions. Each subdirectory defines an agent with its own prompts.
21
19
  - `agent-job/` — Runtime config: system prompts (`SOUL.md`, `SYSTEM.md`), cron schedules (`CRONS.json`), heartbeat prompt.
22
20
  - `event-handler/` — Event handler config. Do not edit — managed by the event handler.
23
- - `skills/` — Skill plugins. Active skills are symlinked into `skills/active/`.
21
+ - `skills/library/` — Skill plugins. Active skills are symlinked into `skills/active/`.
24
22
  - `data/`, `logs/` — Runtime data and job logs.
25
23
 
26
24
  ## What You Can Edit
@@ -39,13 +37,13 @@ Current datetime: {{datetime}}
39
37
 
40
38
  ## Self-Modification
41
39
 
42
- **Add an agent** — Create `agents/<name>/` with a `prompts/` subfolder, add a cron entry in `agent-job/CRONS.json` pointing to the prompt file, update `agents/CLAUDE.md` to document it, update root `CLAUDE.md` to reflect the new agent.
40
+ **Add an agent** — Create `agents/<name>/` with a `jobs/` subfolder, add a cron entry in `agent-job/CRONS.json` pointing to the prompt file, update `agents/CLAUDE.md` to document it, update root `CLAUDE.md` to reflect the new agent.
43
41
 
44
42
  **Remove an agent** — Delete the `agents/<name>/` folder, remove its cron entries, update `agents/CLAUDE.md` and root `CLAUDE.md`.
45
43
 
46
44
  **Change a schedule** — Edit `agent-job/CRONS.json` (cron expressions, enable/disable).
47
45
 
48
- **Activate a skill** — Symlink from `skills/<name>/` into `skills/active/`, update root `CLAUDE.md`.
46
+ **Activate a skill** — Symlink from `skills/library/<name>/` into `skills/active/`, update root `CLAUDE.md`.
49
47
 
50
48
  **Deactivate a skill** — Remove the symlink from `skills/active/`, update root `CLAUDE.md`.
51
49
 
@@ -58,3 +56,5 @@ Current datetime: {{datetime}}
58
56
  ## Orientation
59
57
 
60
58
  Read the root `CLAUDE.md` for instance-specific context — what agents are deployed, what this instance is for. Read the `CLAUDE.md` in each folder you work in for local conventions.
59
+
60
+ Current datetime: {{datetime}}
@@ -1,5 +1,54 @@
1
1
  # agents/ — Custom Agent Definitions
2
2
 
3
- This directory holds custom agent configurations. Each subdirectory defines an agent that can be referenced by agent jobs and cron tasks.
3
+ ## Adding an Agent
4
4
 
5
- (No agents configured yet add a subdirectory here to define one.)
5
+ Each subdirectory defines an agent. Create a folder with a `SYSTEM.md` file:
6
+
7
+ ```
8
+ agents/
9
+ └── my-agent/
10
+ └── SYSTEM.md # System prompt — identity, instructions, constraints
11
+ ```
12
+
13
+ `SYSTEM.md` is the agent's system prompt. Write it in markdown addressed to the agent (e.g. "You are a code reviewer...").
14
+
15
+ For agents with multiple complex tasks, add a `jobs/` subfolder:
16
+
17
+ ```
18
+ agents/
19
+ └── my-agent/
20
+ ├── SYSTEM.md
21
+ └── jobs/
22
+ ├── weekly-report.md
23
+ └── cleanup.md
24
+ ```
25
+
26
+ ## Scheduling
27
+
28
+ Add a cron entry in `agent-job/CRONS.json`:
29
+
30
+ ```json
31
+ {
32
+ "name": "my-agent-daily",
33
+ "schedule": "0 9 * * *",
34
+ "type": "agent",
35
+ "job": "Read agents/my-agent/SYSTEM.md and follow the instructions there.",
36
+ "enabled": true
37
+ }
38
+ ```
39
+
40
+ For job-specific prompts, chain the reads:
41
+
42
+ ```json
43
+ {
44
+ "name": "my-agent-report",
45
+ "schedule": "0 9 * * 1",
46
+ "type": "agent",
47
+ "job": "Read agents/my-agent/SYSTEM.md for context, then read agents/my-agent/prompts/weekly-report.md and complete that task.",
48
+ "enabled": true
49
+ }
50
+ ```
51
+
52
+ ## Removing an Agent
53
+
54
+ Delete the `agents/<name>/` folder and remove its cron entries from `agent-job/CRONS.json`.
File without changes
File without changes
File without changes
@@ -1,6 +1,6 @@
1
1
  # skills/ — Agent Skills
2
2
 
3
- Skills are lightweight plugins that extend agent abilities. Each skill lives in `skills/<skill-name>/` and is activated by symlinking into `skills/active/`.
3
+ Skills are lightweight plugins that extend agent abilities. Each skill lives in `skills/library/<skill-name>/` and is activated by symlinking into `skills/active/`.
4
4
 
5
5
  ## How Skills Work
6
6
 
@@ -48,12 +48,12 @@ description: One sentence describing what the skill does and when to use it.
48
48
  ## Usage
49
49
 
50
50
  ```bash
51
- skills/skill-name/script.sh <args>
51
+ skills/library/skill-name/script.sh <args>
52
52
  ```
53
53
  ```
54
54
 
55
55
  - The `description` field appears in the system prompt — keep it concise and action-oriented.
56
- - Use project-root-relative paths in documentation (e.g., `skills/skill-name/script.sh`).
56
+ - Use project-root-relative paths in documentation (e.g., `skills/library/skill-name/script.sh`).
57
57
 
58
58
  ### Skill Structure
59
59
 
@@ -69,7 +69,7 @@ If a skill needs an API key, add it via the admin UI (Settings > Agent Jobs > Se
69
69
 
70
70
  ```bash
71
71
  # Activate
72
- ln -s ../skill-name skills/active/skill-name
72
+ ln -s ../library/skill-name skills/active/skill-name
73
73
 
74
74
  # Deactivate
75
75
  rm skills/active/skill-name
@@ -84,10 +84,10 @@ The `skills/active/` directory is shared by both agent backends via symlink brid
84
84
  ### Simple bash skill (most common)
85
85
 
86
86
  ```bash
87
- mkdir skills/my-skill
87
+ mkdir skills/library/my-skill
88
88
  ```
89
89
 
90
- **skills/my-skill/SKILL.md:**
90
+ **skills/library/my-skill/SKILL.md:**
91
91
  ```markdown
92
92
  ---
93
93
  name: my-skill
@@ -101,11 +101,11 @@ Requires MY_API_KEY environment variable.
101
101
 
102
102
  ## Usage
103
103
  ```bash
104
- skills/my-skill/run.sh <args>
104
+ skills/library/my-skill/run.sh <args>
105
105
  ```
106
106
  ```
107
107
 
108
- **skills/my-skill/run.sh:**
108
+ **skills/library/my-skill/run.sh:**
109
109
  ```bash
110
110
  #!/bin/bash
111
111
  set -euo pipefail
@@ -117,8 +117,8 @@ if [ -z "$MY_API_KEY" ]; then echo "Error: MY_API_KEY not set"; exit 1; fi
117
117
 
118
118
  Then make it executable and activate:
119
119
  ```bash
120
- chmod +x skills/my-skill/run.sh
121
- ln -s ../my-skill skills/active/my-skill
120
+ chmod +x skills/library/my-skill/run.sh
121
+ ln -s ../library/my-skill skills/active/my-skill
122
122
  ```
123
123
 
124
124
  ### Node.js skill
@@ -131,4 +131,4 @@ Always build AND test a skill in the same job. Tell the agent to test with real
131
131
 
132
132
  ## Default Skills
133
133
 
134
- Check `skills/` for available built-in skills. Activate any you need by symlinking into `skills/active/`.
134
+ Check `skills/library/` for available built-in skills. Activate any you need by symlinking into `skills/active/`.
@@ -7,10 +7,10 @@ description: List and retrieve agent secrets. Plain secrets are also available a
7
7
 
8
8
  ```bash
9
9
  # List available secret keys (fetches current list from server)
10
- node skills/agent-job-secrets/agent-job-secrets.js
10
+ node skills/library/agent-job-secrets/agent-job-secrets.js
11
11
 
12
12
  # Get a secret value (OAuth credentials are auto-refreshed)
13
- node skills/agent-job-secrets/agent-job-secrets.js get MY_CREDENTIALS
13
+ node skills/library/agent-job-secrets/agent-job-secrets.js get MY_CREDENTIALS
14
14
  ```
15
15
 
16
16
  ## Notes