dot-agents 0.5.0 → 0.6.0
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 +239 -122
- package/dist/cli/commands/channel.d.ts +19 -0
- package/dist/cli/commands/channel.d.ts.map +1 -1
- package/dist/cli/commands/channel.js +152 -13
- package/dist/cli/commands/channel.js.map +1 -1
- package/dist/cli/commands/check.d.ts.map +1 -1
- package/dist/cli/commands/check.js +61 -1
- package/dist/cli/commands/check.js.map +1 -1
- package/dist/cli/commands/index.d.ts +2 -0
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +2 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/personas.d.ts +3 -0
- package/dist/cli/commands/personas.d.ts.map +1 -0
- package/dist/cli/commands/personas.js +402 -0
- package/dist/cli/commands/personas.js.map +1 -0
- package/dist/cli/commands/projects.d.ts +3 -0
- package/dist/cli/commands/projects.d.ts.map +1 -0
- package/dist/cli/commands/projects.js +138 -0
- package/dist/cli/commands/projects.js.map +1 -0
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +4 -5
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/index.js +3 -11
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/lib/runner.d.ts +2 -0
- package/dist/cli/lib/runner.d.ts.map +1 -1
- package/dist/cli/lib/runner.js +67 -8
- package/dist/cli/lib/runner.js.map +1 -1
- package/dist/daemon/daemon.d.ts +10 -3
- package/dist/daemon/daemon.d.ts.map +1 -1
- package/dist/daemon/daemon.js +19 -21
- package/dist/daemon/daemon.js.map +1 -1
- package/dist/daemon/lib/executor.d.ts +0 -4
- package/dist/daemon/lib/executor.d.ts.map +1 -1
- package/dist/daemon/lib/executor.js +48 -135
- package/dist/daemon/lib/executor.js.map +1 -1
- package/dist/lib/channel.d.ts +53 -1
- package/dist/lib/channel.d.ts.map +1 -1
- package/dist/lib/channel.js +221 -30
- package/dist/lib/channel.js.map +1 -1
- package/dist/lib/channel.test.d.ts +2 -0
- package/dist/lib/channel.test.d.ts.map +1 -0
- package/dist/lib/channel.test.js +33 -0
- package/dist/lib/channel.test.js.map +1 -0
- package/dist/lib/daemon-status.d.ts +26 -0
- package/dist/lib/daemon-status.d.ts.map +1 -0
- package/dist/lib/daemon-status.js +64 -0
- package/dist/lib/daemon-status.js.map +1 -0
- package/dist/lib/environment.d.ts +87 -0
- package/dist/lib/environment.d.ts.map +1 -0
- package/dist/lib/environment.js +224 -0
- package/dist/lib/environment.js.map +1 -0
- package/dist/lib/frontmatter.d.ts +8 -0
- package/dist/lib/frontmatter.d.ts.map +1 -1
- package/dist/lib/frontmatter.js +16 -3
- package/dist/lib/frontmatter.js.map +1 -1
- package/dist/lib/frontmatter.test.d.ts +2 -0
- package/dist/lib/frontmatter.test.d.ts.map +1 -0
- package/dist/lib/frontmatter.test.js +60 -0
- package/dist/lib/frontmatter.test.js.map +1 -0
- package/dist/lib/index.d.ts +7 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +7 -0
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/integration.test.d.ts +2 -0
- package/dist/lib/integration.test.d.ts.map +1 -0
- package/dist/lib/integration.test.js +445 -0
- package/dist/lib/integration.test.js.map +1 -0
- package/dist/lib/invoke.d.ts +23 -0
- package/dist/lib/invoke.d.ts.map +1 -0
- package/dist/lib/invoke.js +158 -0
- package/dist/lib/invoke.js.map +1 -0
- package/dist/lib/invoke.test.d.ts +2 -0
- package/dist/lib/invoke.test.d.ts.map +1 -0
- package/dist/lib/invoke.test.js +82 -0
- package/dist/lib/invoke.test.js.map +1 -0
- package/dist/lib/persona.d.ts +22 -1
- package/dist/lib/persona.d.ts.map +1 -1
- package/dist/lib/persona.js +176 -31
- package/dist/lib/persona.js.map +1 -1
- package/dist/lib/persona.test.d.ts +2 -0
- package/dist/lib/persona.test.d.ts.map +1 -0
- package/dist/lib/persona.test.js +324 -0
- package/dist/lib/persona.test.js.map +1 -0
- package/dist/lib/processor.d.ts +50 -0
- package/dist/lib/processor.d.ts.map +1 -0
- package/dist/lib/processor.js +135 -0
- package/dist/lib/processor.js.map +1 -0
- package/dist/lib/processor.test.d.ts +2 -0
- package/dist/lib/processor.test.d.ts.map +1 -0
- package/dist/lib/processor.test.js +134 -0
- package/dist/lib/processor.test.js.map +1 -0
- package/dist/lib/registry.d.ts +109 -0
- package/dist/lib/registry.d.ts.map +1 -0
- package/dist/lib/registry.js +192 -0
- package/dist/lib/registry.js.map +1 -0
- package/dist/lib/registry.test.d.ts +2 -0
- package/dist/lib/registry.test.d.ts.map +1 -0
- package/dist/lib/registry.test.js +236 -0
- package/dist/lib/registry.test.js.map +1 -0
- package/dist/lib/session-thread.d.ts +75 -0
- package/dist/lib/session-thread.d.ts.map +1 -0
- package/dist/lib/session-thread.js +132 -0
- package/dist/lib/session-thread.js.map +1 -0
- package/dist/lib/session-thread.test.d.ts +2 -0
- package/dist/lib/session-thread.test.d.ts.map +1 -0
- package/dist/lib/session-thread.test.js +235 -0
- package/dist/lib/session-thread.test.js.map +1 -0
- package/dist/lib/session.d.ts +150 -0
- package/dist/lib/session.d.ts.map +1 -0
- package/dist/lib/session.js +183 -0
- package/dist/lib/session.js.map +1 -0
- package/dist/lib/session.test.d.ts +2 -0
- package/dist/lib/session.test.d.ts.map +1 -0
- package/dist/lib/session.test.js +336 -0
- package/dist/lib/session.test.js.map +1 -0
- package/dist/lib/types/channel.d.ts +4 -0
- package/dist/lib/types/channel.d.ts.map +1 -1
- package/dist/lib/types/persona.d.ts +49 -6
- package/dist/lib/types/persona.d.ts.map +1 -1
- package/internal/personas/_base/PERSONA.md +222 -39
- package/internal/skills/channels/list/SKILL.md +76 -0
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -15,6 +15,8 @@ dot-agents lets you define **personas** (agent configurations) and **workflows**
|
|
|
15
15
|
|
|
16
16
|
## Installation
|
|
17
17
|
|
|
18
|
+
Requires Node.js 20+.
|
|
19
|
+
|
|
18
20
|
No installation required - use `npx` to run directly:
|
|
19
21
|
|
|
20
22
|
```bash
|
|
@@ -28,111 +30,20 @@ Or install globally:
|
|
|
28
30
|
npm install -g dot-agents
|
|
29
31
|
```
|
|
30
32
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
## Project Setup
|
|
34
|
-
|
|
35
|
-
The easiest way to set up dot-agents is with the `init` command:
|
|
33
|
+
## Quick Start
|
|
36
34
|
|
|
37
35
|
```bash
|
|
38
|
-
#
|
|
36
|
+
# Initialize a new project
|
|
39
37
|
npx dot-agents init
|
|
40
38
|
|
|
41
|
-
#
|
|
42
|
-
npx dot-agents
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
If you already have a `.agents/` directory, `init` will analyze it and guide you through migration.
|
|
46
|
-
|
|
47
|
-
### Fresh Install
|
|
48
|
-
|
|
49
|
-
Running `dot-agents init` in a directory without `.agents/` will:
|
|
50
|
-
|
|
51
|
-
1. Create the directory structure (`.agents/personas/`, `.agents/workflows/`, etc.)
|
|
52
|
-
2. Create a default `claude` persona
|
|
53
|
-
3. Create a sample `hello-world` workflow
|
|
54
|
-
|
|
55
|
-
You can also set up manually:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
mkdir -p .agents/personas/claude .agents/workflows/hello
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
**Required persona fields:**
|
|
62
|
-
|
|
63
|
-
```yaml
|
|
64
|
-
---
|
|
65
|
-
name: my-persona # Required: unique identifier
|
|
66
|
-
cmd: "claude --print" # Required for root personas (can be inherited)
|
|
67
|
-
description: "..." # Optional but recommended
|
|
68
|
-
---
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
**Required workflow fields:**
|
|
72
|
-
|
|
73
|
-
```yaml
|
|
74
|
-
---
|
|
75
|
-
name: my-workflow # Required: unique identifier
|
|
76
|
-
description: "..." # Required: human-readable description
|
|
77
|
-
persona: my-persona # Required: must match a persona name/path
|
|
78
|
-
---
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
See [Quick Start](#quick-start) for a complete example.
|
|
82
|
-
|
|
83
|
-
### Migrating Existing `.agents/` Directory
|
|
84
|
-
|
|
85
|
-
If you have an existing `.agents/` directory with skills or workflows:
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
dot-agents init
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
The init command will:
|
|
92
|
-
|
|
93
|
-
1. Analyze your existing structure
|
|
94
|
-
2. Create a `personas/` directory with a default persona if missing
|
|
95
|
-
3. Report which workflows need frontmatter updates
|
|
96
|
-
|
|
97
|
-
**Workflow migration changes:**
|
|
98
|
-
|
|
99
|
-
| Old Field | New Field | Notes |
|
|
100
|
-
| -------------- | ----------------- | -------------------------------------- |
|
|
101
|
-
| `goal:` | `description:` | Rename the field |
|
|
102
|
-
| (missing) | `persona: claude` | Add reference to your persona |
|
|
103
|
-
| `skills_used:` | (move to persona) | Skills belong in persona, not workflow |
|
|
104
|
-
|
|
105
|
-
Before:
|
|
106
|
-
|
|
107
|
-
```yaml
|
|
108
|
-
---
|
|
109
|
-
name: my-workflow
|
|
110
|
-
goal: Do something useful
|
|
111
|
-
skills_used:
|
|
112
|
-
- osx/calendar
|
|
113
|
-
- productivity/query-todos
|
|
114
|
-
---
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
After:
|
|
118
|
-
|
|
119
|
-
```yaml
|
|
120
|
-
---
|
|
121
|
-
name: my-workflow
|
|
122
|
-
description: Do something useful
|
|
123
|
-
persona: claude
|
|
124
|
-
on:
|
|
125
|
-
manual: true
|
|
126
|
-
---
|
|
39
|
+
# Run the sample workflow
|
|
40
|
+
npx dot-agents run hello-world
|
|
127
41
|
```
|
|
128
42
|
|
|
129
|
-
|
|
43
|
+
That's it! The `init` command creates:
|
|
130
44
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
dot-agents list workflows
|
|
134
|
-
dot-agents run my-workflow --dry-run
|
|
135
|
-
```
|
|
45
|
+
- `.agents/personas/claude/PERSONA.md` - Default Claude persona
|
|
46
|
+
- `.agents/workflows/hello/WORKFLOW.md` - Sample hello-world workflow
|
|
136
47
|
|
|
137
48
|
### Directory Discovery
|
|
138
49
|
|
|
@@ -143,9 +54,11 @@ dot-agents searches for `.agents/` in these locations (in order):
|
|
|
143
54
|
|
|
144
55
|
This means you can run `dot-agents` from any subdirectory of a project.
|
|
145
56
|
|
|
146
|
-
##
|
|
57
|
+
## Manual Setup
|
|
58
|
+
|
|
59
|
+
If you prefer to set up manually (or want to understand the structure):
|
|
147
60
|
|
|
148
|
-
### 1. Create
|
|
61
|
+
### 1. Create directories
|
|
149
62
|
|
|
150
63
|
```bash
|
|
151
64
|
mkdir -p .agents/personas/claude .agents/workflows/hello
|
|
@@ -159,9 +72,7 @@ Create `.agents/personas/claude/PERSONA.md`:
|
|
|
159
72
|
---
|
|
160
73
|
name: claude
|
|
161
74
|
description: Base Claude persona
|
|
162
|
-
cmd:
|
|
163
|
-
- "claude --print"
|
|
164
|
-
- "claude -p"
|
|
75
|
+
cmd: "claude --print" # Or array for fallbacks: ["claude --print", "claude -p"]
|
|
165
76
|
env:
|
|
166
77
|
CLAUDE_MODEL: sonnet
|
|
167
78
|
---
|
|
@@ -191,8 +102,67 @@ Say hello and tell me today's date.
|
|
|
191
102
|
dot-agents run hello-world
|
|
192
103
|
```
|
|
193
104
|
|
|
105
|
+
### Required Fields Reference
|
|
106
|
+
|
|
107
|
+
**Persona fields:**
|
|
108
|
+
|
|
109
|
+
```yaml
|
|
110
|
+
---
|
|
111
|
+
name: my-persona # Required: unique identifier
|
|
112
|
+
cmd: "claude --print" # Required for root personas (can be inherited)
|
|
113
|
+
description: "..." # Optional but recommended
|
|
114
|
+
---
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Workflow fields:**
|
|
118
|
+
|
|
119
|
+
```yaml
|
|
120
|
+
---
|
|
121
|
+
name: my-workflow # Required: unique identifier
|
|
122
|
+
description: "..." # Required: human-readable description
|
|
123
|
+
persona: my-persona # Required: must match a persona name/path
|
|
124
|
+
---
|
|
125
|
+
```
|
|
126
|
+
|
|
194
127
|
## Core Concepts
|
|
195
128
|
|
|
129
|
+
### Mental Model
|
|
130
|
+
|
|
131
|
+
dot-agents has four core primitives that work together:
|
|
132
|
+
|
|
133
|
+
| Primitive | Defines | Description |
|
|
134
|
+
| ------------- | ------------ | -------------------------------------- |
|
|
135
|
+
| **Personas** | HOW | Agent configuration (cmd, env, skills) |
|
|
136
|
+
| **Workflows** | WHAT | Tasks with triggers and inputs |
|
|
137
|
+
| **Sessions** | WHERE | Execution context with state |
|
|
138
|
+
| **Channels** | COORDINATION | Messaging between sessions |
|
|
139
|
+
|
|
140
|
+
**Typical flows:**
|
|
141
|
+
|
|
142
|
+
- `personas run developer` - Create session, run persona interactively
|
|
143
|
+
- `run daily-standup` - Create session, execute workflow task
|
|
144
|
+
- `channels publish @dev "..."` - Queue message for async persona invocation
|
|
145
|
+
- Daemon watches channels, creates sessions when messages arrive
|
|
146
|
+
|
|
147
|
+
### Directory Structure
|
|
148
|
+
|
|
149
|
+
```text
|
|
150
|
+
.agents/
|
|
151
|
+
├── personas/ # Agent configurations
|
|
152
|
+
│ └── claude/
|
|
153
|
+
│ ├── PERSONA.md # Base Claude persona
|
|
154
|
+
│ └── autonomous/
|
|
155
|
+
│ ├── PERSONA.md # Inherits from claude
|
|
156
|
+
│ └── productivity/
|
|
157
|
+
│ └── PERSONA.md # Inherits from autonomous
|
|
158
|
+
├── workflows/ # Task definitions
|
|
159
|
+
│ └── daily-standup/
|
|
160
|
+
│ └── WORKFLOW.md
|
|
161
|
+
├── skills/ # Reusable capabilities (optional)
|
|
162
|
+
├── channels/ # Message storage
|
|
163
|
+
└── sessions/ # Execution logs
|
|
164
|
+
```
|
|
165
|
+
|
|
196
166
|
### Personas
|
|
197
167
|
|
|
198
168
|
Personas define **how** an agent behaves. They specify the command to run, environment variables, available skills, and a system prompt.
|
|
@@ -211,6 +181,23 @@ skills:
|
|
|
211
181
|
System prompt goes here in the markdown body...
|
|
212
182
|
```
|
|
213
183
|
|
|
184
|
+
**Command formats:** The `cmd` field supports three formats:
|
|
185
|
+
|
|
186
|
+
```yaml
|
|
187
|
+
# String - single command
|
|
188
|
+
cmd: "claude --print"
|
|
189
|
+
|
|
190
|
+
# Array - fallback alternatives (tries first, falls back to second, etc.)
|
|
191
|
+
cmd:
|
|
192
|
+
- "claude --print"
|
|
193
|
+
- "claude -p"
|
|
194
|
+
|
|
195
|
+
# Object - mode-specific commands
|
|
196
|
+
cmd:
|
|
197
|
+
headless: ["claude", "--print"] # Used with --headless flag
|
|
198
|
+
interactive: ["claude"] # Used with TTY or --interactive flag
|
|
199
|
+
```
|
|
200
|
+
|
|
214
201
|
**Persona inheritance:** Personas cascade through directories. A persona at `personas/claude/autonomous/productivity/` inherits from `personas/claude/autonomous/` which inherits from `personas/claude/`.
|
|
215
202
|
|
|
216
203
|
- Scalar fields (name, description, cmd) - child overrides parent
|
|
@@ -245,7 +232,8 @@ Focus on: what was accomplished, what's in progress, any blockers.
|
|
|
245
232
|
|
|
246
233
|
- `manual: true` - Can be run on-demand
|
|
247
234
|
- `schedule` - Cron-based scheduling (requires daemon)
|
|
248
|
-
-
|
|
235
|
+
- `channel` - Trigger on channel messages (requires daemon)
|
|
236
|
+
- Planned: `file_change`, `webhook`, `git`
|
|
249
237
|
|
|
250
238
|
### Variable Expansion
|
|
251
239
|
|
|
@@ -273,10 +261,18 @@ Commands:
|
|
|
273
261
|
daemon status Check daemon status
|
|
274
262
|
daemon jobs List scheduled jobs
|
|
275
263
|
daemon trigger <name> Manually trigger a workflow
|
|
264
|
+
channels list List all channels
|
|
265
|
+
channels publish Publish a message to a channel
|
|
266
|
+
channels read Read messages from a channel
|
|
267
|
+
channels reply Reply to a message thread
|
|
268
|
+
channels process Process pending DM messages (one-shot)
|
|
269
|
+
personas run <name> Run a persona interactively or headless
|
|
270
|
+
projects list List registered projects
|
|
271
|
+
projects add <name> Register a project for cross-project routing
|
|
272
|
+
projects remove <name> Unregister a project
|
|
276
273
|
|
|
277
274
|
Aliases:
|
|
278
|
-
workflows List all workflows
|
|
279
|
-
personas List all personas
|
|
275
|
+
workflows List all workflows (alias for 'list workflows')
|
|
280
276
|
```
|
|
281
277
|
|
|
282
278
|
### Running Workflows
|
|
@@ -363,7 +359,7 @@ dot-agents daemon run -p 8080
|
|
|
363
359
|
dot-agents daemon run --no-watch
|
|
364
360
|
```
|
|
365
361
|
|
|
366
|
-
|
|
362
|
+
> **⚠️ Important:** The daemon must be run from a directory containing `.agents/` (or a subdirectory of one).
|
|
367
363
|
|
|
368
364
|
### Managing the Daemon
|
|
369
365
|
|
|
@@ -477,24 +473,145 @@ Common cron patterns:
|
|
|
477
473
|
|
|
478
474
|
Use `dot-agents check` to validate your cron expressions.
|
|
479
475
|
|
|
480
|
-
##
|
|
476
|
+
## Channels
|
|
481
477
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
478
|
+
Channels enable messaging between sessions, personas, and projects. They're the coordination backbone for async agent communication.
|
|
479
|
+
|
|
480
|
+
### Channel Types
|
|
481
|
+
|
|
482
|
+
| Prefix | Type | Purpose |
|
|
483
|
+
| ------ | -------------- | -------------------------------- |
|
|
484
|
+
| `@` | Direct Message | Private inbox for a persona |
|
|
485
|
+
| `#` | Public Channel | Shared topic-based communication |
|
|
486
|
+
|
|
487
|
+
### CLI Commands
|
|
488
|
+
|
|
489
|
+
```bash
|
|
490
|
+
# List all channels
|
|
491
|
+
dot-agents channels list
|
|
492
|
+
|
|
493
|
+
# Publish to a channel
|
|
494
|
+
dot-agents channels publish "#status" "Deployment complete"
|
|
495
|
+
|
|
496
|
+
# Publish to a persona's DM (triggers persona via daemon)
|
|
497
|
+
dot-agents channels publish "@developer" "Please review PR #123"
|
|
498
|
+
|
|
499
|
+
# Read recent messages
|
|
500
|
+
dot-agents channels read "#status"
|
|
501
|
+
dot-agents channels read "#status" --since 24h --limit 20
|
|
502
|
+
|
|
503
|
+
# Read a specific thread
|
|
504
|
+
dot-agents channels read "#status" --thread <thread-id>
|
|
505
|
+
|
|
506
|
+
# Reply to a message
|
|
507
|
+
dot-agents channels reply "#status" <message-id> "Acknowledged"
|
|
496
508
|
```
|
|
497
509
|
|
|
510
|
+
### Cross-Project Communication
|
|
511
|
+
|
|
512
|
+
Routes messages to other registered dot-agents projects using `project/` prefix:
|
|
513
|
+
|
|
514
|
+
```bash
|
|
515
|
+
# Publish to another project's entry persona (@project routes to root persona)
|
|
516
|
+
dot-agents channels publish "@other-project" "Handle this task"
|
|
517
|
+
|
|
518
|
+
# Publish to a specific persona in another project
|
|
519
|
+
dot-agents channels publish "@other-project/developer" "Review this PR"
|
|
520
|
+
|
|
521
|
+
# Read from another project's public channel
|
|
522
|
+
dot-agents channels read "#other-project/status" --since 24h
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
**Syntax patterns:**
|
|
526
|
+
|
|
527
|
+
- `@project` - Routes to project's root persona (entry point)
|
|
528
|
+
- `@project/persona` - Routes to specific persona in project
|
|
529
|
+
- `#project/channel` - Routes to public channel in project
|
|
530
|
+
|
|
531
|
+
Register projects first with `dot-agents projects add <name> <path>`. See [Projects](#projects) section.
|
|
532
|
+
|
|
533
|
+
### Daemon Integration
|
|
534
|
+
|
|
535
|
+
When the daemon is running:
|
|
536
|
+
|
|
537
|
+
- Messages to `@persona` automatically invoke that persona
|
|
538
|
+
- The persona receives the message content as input
|
|
539
|
+
- Enables fire-and-forget async delegation
|
|
540
|
+
|
|
541
|
+
```bash
|
|
542
|
+
# This triggers the developer persona asynchronously
|
|
543
|
+
dot-agents channels publish "@developer" "Fix the login bug"
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
## Sessions
|
|
547
|
+
|
|
548
|
+
Sessions are execution units that capture agent work. Every `personas run` creates a session.
|
|
549
|
+
|
|
550
|
+
### Session Basics
|
|
551
|
+
|
|
552
|
+
```bash
|
|
553
|
+
# Run a persona (creates session automatically)
|
|
554
|
+
dot-agents personas run developer
|
|
555
|
+
|
|
556
|
+
# Run with initial prompt
|
|
557
|
+
dot-agents personas run developer --prompt "Fix the bug in auth.ts"
|
|
558
|
+
|
|
559
|
+
# Resume a previous session
|
|
560
|
+
dot-agents personas run developer --session-id 2025-12-23T15-30-45
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
### Session Environment
|
|
564
|
+
|
|
565
|
+
Running agents receive these environment variables:
|
|
566
|
+
|
|
567
|
+
| Variable | Example | Purpose |
|
|
568
|
+
| ------------- | --------------------------------------- | ---------------------- |
|
|
569
|
+
| `SESSION_DIR` | `.agents/sessions/2025-12-23T15-30-45/` | Session directory path |
|
|
570
|
+
| `SESSION_ID` | `2025-12-23T15-30-45` | Session identifier |
|
|
571
|
+
|
|
572
|
+
Agents should write a `session.md` summary to `$SESSION_DIR` before exiting to enable resumption and handoff.
|
|
573
|
+
|
|
574
|
+
### Session Lifecycle
|
|
575
|
+
|
|
576
|
+
1. **Create** - `personas run` creates session directory and sets env vars
|
|
577
|
+
2. **Execute** - Agent runs with full context (persona + session history)
|
|
578
|
+
3. **Log** - Agent writes `session.md` summary to preserve state
|
|
579
|
+
4. **Resume** - `--session-id` reloads context for continuation
|
|
580
|
+
|
|
581
|
+
## Projects
|
|
582
|
+
|
|
583
|
+
Projects enable cross-project communication by registering other dot-agents installations.
|
|
584
|
+
|
|
585
|
+
### Managing Projects
|
|
586
|
+
|
|
587
|
+
```bash
|
|
588
|
+
# List registered projects
|
|
589
|
+
dot-agents projects list
|
|
590
|
+
|
|
591
|
+
# Register a project
|
|
592
|
+
dot-agents projects add my-docs /path/to/docs-project
|
|
593
|
+
|
|
594
|
+
# Remove a project
|
|
595
|
+
dot-agents projects remove my-docs
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
### Using Registered Projects
|
|
599
|
+
|
|
600
|
+
Once registered, you can communicate with other projects via channels:
|
|
601
|
+
|
|
602
|
+
```bash
|
|
603
|
+
# Send task to another project's entry persona
|
|
604
|
+
dot-agents channels publish "@my-docs" "Update the API reference"
|
|
605
|
+
|
|
606
|
+
# Send to specific persona in another project
|
|
607
|
+
dot-agents channels publish "@my-docs/writer" "Draft release notes"
|
|
608
|
+
|
|
609
|
+
# Read from another project's channel
|
|
610
|
+
dot-agents channels read "#my-docs/updates"
|
|
611
|
+
```
|
|
612
|
+
|
|
613
|
+
Projects are stored in `~/.dot-agents/projects.json`.
|
|
614
|
+
|
|
498
615
|
## Skills
|
|
499
616
|
|
|
500
617
|
dot-agents also supports skills - focused, reusable capabilities that agents can load. Skills follow the [Anthropic Skills Specification](https://github.com/anthropics/skills/blob/main/agent_skills_spec.md).
|
|
@@ -1,3 +1,22 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
+
/**
|
|
3
|
+
* Parsed from address with optional thread context
|
|
4
|
+
*/
|
|
5
|
+
export interface ParsedFromAddress {
|
|
6
|
+
/** The channel or identity (e.g., "#docs/sessions", "@docs", "human:tnez") */
|
|
7
|
+
address: string;
|
|
8
|
+
/** Optional thread ID for callbacks */
|
|
9
|
+
thread?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Parse a from address that may include a thread suffix
|
|
13
|
+
* Format: <address>:<thread-id> or just <address>
|
|
14
|
+
*
|
|
15
|
+
* Examples:
|
|
16
|
+
* - "#docs/sessions:2026-01-02T21:00:00.000Z" -> { address: "#docs/sessions", thread: "2026-01-02T21:00:00.000Z" }
|
|
17
|
+
* - "@docs" -> { address: "@docs", thread: undefined }
|
|
18
|
+
* - "human:tnez" -> { address: "human:tnez", thread: undefined }
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseFromAddress(from: string): ParsedFromAddress;
|
|
2
21
|
export declare const channelsCommand: Command;
|
|
3
22
|
//# sourceMappingURL=channel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgBpC;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,8EAA8E;IAC9E,OAAO,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,CAYhE;AA6BD,eAAO,MAAM,eAAe,SAIxB,CAAC"}
|