@siftd/connect-agent 0.2.28 → 0.2.29
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 +57 -8
- package/dist/orchestrator.js +18 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,9 @@ Connect Agent runs on your machine and bridges the Connect web app to Claude Cod
|
|
|
9
9
|
- **Persistent Memory** - Remembers your preferences, projects, and context across sessions
|
|
10
10
|
- **Worker Delegation** - Delegates complex tasks to Claude Code CLI workers
|
|
11
11
|
- **Task Scheduling** - Schedule tasks for future execution
|
|
12
|
-
- **
|
|
12
|
+
- **Hub System** - Organized workspace at `~/Lia-Hub/` for state management
|
|
13
|
+
- **Gallery View** - See all files your workers create in the UI
|
|
14
|
+
- **Progress Tracking** - Real-time progress bars for running workers
|
|
13
15
|
|
|
14
16
|
## Quick Start
|
|
15
17
|
|
|
@@ -23,6 +25,12 @@ npx @siftd/connect-agent pair <CODE> --api-key <YOUR_ANTHROPIC_API_KEY>
|
|
|
23
25
|
npx @siftd/connect-agent start
|
|
24
26
|
```
|
|
25
27
|
|
|
28
|
+
On first start, the agent creates `~/Lia-Hub/` with:
|
|
29
|
+
- `AGENTS.md` - Agent identity
|
|
30
|
+
- `CLAUDE.md` - Your custom instructions
|
|
31
|
+
- `LANDMARKS.md` - Current state
|
|
32
|
+
- `notebook-a/` - Working notes and worker logs
|
|
33
|
+
|
|
26
34
|
## Modes
|
|
27
35
|
|
|
28
36
|
### Orchestrator Mode (Recommended)
|
|
@@ -31,6 +39,7 @@ When you provide an Anthropic API key, the agent runs as a **master orchestrator
|
|
|
31
39
|
- Maintains persistent memory about you and your projects
|
|
32
40
|
- Delegates file/code work to Claude Code CLI workers
|
|
33
41
|
- Schedules future tasks
|
|
42
|
+
- Reads hub files for context on every startup
|
|
34
43
|
|
|
35
44
|
### Simple Relay Mode
|
|
36
45
|
Without an API key, the agent acts as a simple relay to `claude -p --continue`.
|
|
@@ -59,6 +68,24 @@ connect-agent logout
|
|
|
59
68
|
- `/reset` or `/clear` - Clear conversation history
|
|
60
69
|
- `/mode` - Check current mode (orchestrator vs simple)
|
|
61
70
|
- `/memory` - Show memory statistics
|
|
71
|
+
- `/verbose` - Toggle verbose tool output
|
|
72
|
+
|
|
73
|
+
## Hub Structure
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
~/Lia-Hub/
|
|
77
|
+
├── AGENTS.md # Agent identity and capabilities
|
|
78
|
+
├── CLAUDE.md # Your custom instructions (always followed)
|
|
79
|
+
├── LANDMARKS.md # Current state, active projects
|
|
80
|
+
├── MISTAKES.md # Lessons learned (never deleted)
|
|
81
|
+
├── notebook-a/
|
|
82
|
+
│ ├── SCRATCHPAD.md # Working notes and plans
|
|
83
|
+
│ └── WORKER-LOG.md # All worker history (auto-logged)
|
|
84
|
+
└── shared/
|
|
85
|
+
└── outputs/ # Worker output files
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Edit `CLAUDE.md` to customize the orchestrator's behavior!
|
|
62
89
|
|
|
63
90
|
## How It Works
|
|
64
91
|
|
|
@@ -72,7 +99,7 @@ connect-agent logout
|
|
|
72
99
|
┌─────────────────┐
|
|
73
100
|
│ Master │
|
|
74
101
|
│ Orchestrator │
|
|
75
|
-
│ (memory,
|
|
102
|
+
│ (memory, hub) │
|
|
76
103
|
└────────┬────────┘
|
|
77
104
|
│ delegates
|
|
78
105
|
▼
|
|
@@ -83,17 +110,32 @@ connect-agent logout
|
|
|
83
110
|
```
|
|
84
111
|
|
|
85
112
|
The orchestrator understands it's the **master**, not a worker. It:
|
|
86
|
-
1.
|
|
87
|
-
2.
|
|
88
|
-
3.
|
|
89
|
-
4.
|
|
90
|
-
5.
|
|
91
|
-
6.
|
|
113
|
+
1. Loads hub context (AGENTS.md, CLAUDE.md, LANDMARKS.md)
|
|
114
|
+
2. Receives your message from the web
|
|
115
|
+
3. Searches memory for relevant context
|
|
116
|
+
4. Decides what needs to be done
|
|
117
|
+
5. Delegates actual work to Claude Code CLI workers
|
|
118
|
+
6. Shows progress in real-time
|
|
119
|
+
7. Synthesizes results into a clear response
|
|
120
|
+
8. Logs workers to WORKER-LOG.md
|
|
121
|
+
9. Remembers important things for next time
|
|
122
|
+
|
|
123
|
+
## Customizing Worker Behavior
|
|
124
|
+
|
|
125
|
+
All worker prompts are defined in `src/prompts/worker-system.ts`. Update this file to change how ALL workers behave:
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
// src/prompts/worker-system.ts
|
|
129
|
+
export const WORKER_IDENTITY = `...`;
|
|
130
|
+
export const WORKER_OUTPUT_FORMAT = `...`;
|
|
131
|
+
export function buildWorkerPrompt(task, options) { ... }
|
|
132
|
+
```
|
|
92
133
|
|
|
93
134
|
## Environment Variables
|
|
94
135
|
|
|
95
136
|
- `ANTHROPIC_API_KEY` - Alternative to `--api-key` flag
|
|
96
137
|
- `VOYAGE_API_KEY` - (Optional) For better semantic search embeddings
|
|
138
|
+
- `DATABASE_URL` - (Optional) PostgreSQL for cloud memory persistence
|
|
97
139
|
|
|
98
140
|
## Requirements
|
|
99
141
|
|
|
@@ -101,6 +143,13 @@ The orchestrator understands it's the **master**, not a worker. It:
|
|
|
101
143
|
- [Claude Code CLI](https://claude.ai/code) installed and authenticated
|
|
102
144
|
- Anthropic API key (for orchestrator mode)
|
|
103
145
|
|
|
146
|
+
## Version History
|
|
147
|
+
|
|
148
|
+
- **v0.2.28** - Lia-Hub structure, CLAUDE.md support, standardized worker prompts
|
|
149
|
+
- **v0.2.27** - Fixed workers opening browser tabs
|
|
150
|
+
- **v0.2.26** - Gallery view, worker asset tracking
|
|
151
|
+
- **v0.2.25** - Progress bars, heartbeat system
|
|
152
|
+
|
|
104
153
|
## License
|
|
105
154
|
|
|
106
155
|
MIT
|
package/dist/orchestrator.js
CHANGED
|
@@ -463,11 +463,26 @@ export class MasterOrchestrator {
|
|
|
463
463
|
const memoryContext = await this.getMemoryContext(message);
|
|
464
464
|
// Build system prompt with hub context, genesis knowledge, and memory context
|
|
465
465
|
const genesisKnowledge = getKnowledgeForPrompt();
|
|
466
|
-
let systemWithContext = SYSTEM_PROMPT
|
|
467
|
-
//
|
|
466
|
+
let systemWithContext = SYSTEM_PROMPT;
|
|
467
|
+
// CRITICAL: Inject hub context IMMEDIATELY after system prompt
|
|
468
|
+
// This ensures the orchestrator sees AGENTS.md, CLAUDE.md, LANDMARKS.md content
|
|
468
469
|
if (hubContextStr) {
|
|
469
|
-
systemWithContext +=
|
|
470
|
+
systemWithContext += `
|
|
471
|
+
|
|
472
|
+
═══════════════════════════════════════════════════════════════════════════════
|
|
473
|
+
YOUR HUB FILES (READ THESE FIRST!)
|
|
474
|
+
═══════════════════════════════════════════════════════════════════════════════
|
|
475
|
+
|
|
476
|
+
The following are the CURRENT CONTENTS of your hub files at ~/Lia-Hub/.
|
|
477
|
+
ALWAYS check these before responding - especially CLAUDE.md for user instructions.
|
|
478
|
+
|
|
479
|
+
${hubContextStr}
|
|
480
|
+
|
|
481
|
+
═══════════════════════════════════════════════════════════════════════════════
|
|
482
|
+
`;
|
|
470
483
|
}
|
|
484
|
+
// Add genesis knowledge and memory context
|
|
485
|
+
systemWithContext += genesisKnowledge;
|
|
471
486
|
if (memoryContext) {
|
|
472
487
|
systemWithContext += `\n\nRELEVANT MEMORIES:\n${memoryContext}`;
|
|
473
488
|
}
|