keystone-cli 0.1.0 β 0.2.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 +326 -59
- package/package.json +1 -1
- package/src/cli.ts +90 -81
- package/src/db/workflow-db.ts +0 -7
- package/src/expression/evaluator.test.ts +42 -0
- package/src/expression/evaluator.ts +28 -0
- package/src/parser/agent-parser.test.ts +10 -0
- package/src/parser/agent-parser.ts +2 -1
- package/src/parser/config-schema.ts +13 -5
- package/src/parser/workflow-parser.ts +0 -5
- package/src/runner/llm-adapter.test.ts +0 -8
- package/src/runner/llm-adapter.ts +33 -10
- package/src/runner/llm-executor.test.ts +59 -18
- package/src/runner/llm-executor.ts +1 -1
- package/src/runner/mcp-client.test.ts +166 -88
- package/src/runner/mcp-client.ts +156 -22
- package/src/runner/mcp-manager.test.ts +73 -15
- package/src/runner/mcp-manager.ts +44 -18
- package/src/runner/mcp-server.test.ts +4 -1
- package/src/runner/mcp-server.ts +25 -11
- package/src/runner/shell-executor.ts +3 -3
- package/src/runner/step-executor.ts +10 -9
- package/src/runner/tool-integration.test.ts +21 -14
- package/src/runner/workflow-runner.ts +25 -5
- package/src/templates/agents/explore.md +54 -0
- package/src/templates/agents/general.md +8 -0
- package/src/templates/agents/keystone-architect.md +54 -0
- package/src/templates/agents/my-agent.md +3 -0
- package/src/templates/agents/summarizer.md +28 -0
- package/src/templates/agents/test-agent.md +10 -0
- package/src/templates/approval-process.yaml +36 -0
- package/src/templates/basic-inputs.yaml +19 -0
- package/src/templates/basic-shell.yaml +20 -0
- package/src/templates/batch-processor.yaml +43 -0
- package/src/templates/cleanup-finally.yaml +22 -0
- package/src/templates/composition-child.yaml +13 -0
- package/src/templates/composition-parent.yaml +14 -0
- package/src/templates/data-pipeline.yaml +38 -0
- package/src/templates/full-feature-demo.yaml +64 -0
- package/src/templates/human-interaction.yaml +12 -0
- package/src/templates/invalid.yaml +5 -0
- package/src/templates/llm-agent.yaml +8 -0
- package/src/templates/loop-parallel.yaml +37 -0
- package/src/templates/retry-policy.yaml +36 -0
- package/src/templates/scaffold-feature.yaml +48 -0
- package/src/templates/state.db +0 -0
- package/src/templates/state.db-shm +0 -0
- package/src/templates/state.db-wal +0 -0
- package/src/templates/stop-watch.yaml +17 -0
- package/src/templates/workflow.db +0 -0
- package/src/utils/config-loader.test.ts +2 -2
package/README.md
CHANGED
|
@@ -1,136 +1,403 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="logo.png" width="250" alt="Keystone CLI Logo">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
# ποΈ Keystone CLI
|
|
2
6
|
|
|
3
7
|
[](https://bun.sh)
|
|
4
|
-
[](https://www.npmjs.com/package/keystone-cli)
|
|
5
9
|
[](https://opensource.org/licenses/MIT)
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
A local-first, declarative, agentic workflow orchestrator built on **Bun**.
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
Keystone allows you to define complex automation workflows using a simple YAML syntax, with first-class support for LLM agents, state persistence, and parallel execution.
|
|
10
14
|
|
|
11
15
|
---
|
|
12
16
|
|
|
13
|
-
## β¨
|
|
17
|
+
## β¨ Features
|
|
14
18
|
|
|
15
|
-
- β‘ **Local-First
|
|
16
|
-
- π§© **Declarative
|
|
17
|
-
- π€ **Agentic
|
|
18
|
-
-
|
|
19
|
-
- π **Resilient
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
19
|
+
- β‘ **Local-First:** Built on Bun with a local SQLite database for state management.
|
|
20
|
+
- π§© **Declarative:** Define workflows in YAML with automatic dependency tracking (DAG).
|
|
21
|
+
- π€ **Agentic:** First-class support for LLM agents defined in Markdown with YAML frontmatter.
|
|
22
|
+
- π§βπ» **Human-in-the-Loop:** Support for manual approval and text input steps.
|
|
23
|
+
- π **Resilient:** Built-in retries, timeouts, and state persistence. Resume failed or paused runs exactly where they left off.
|
|
24
|
+
- π **TUI Dashboard:** Built-in interactive dashboard for monitoring and managing runs.
|
|
25
|
+
- π οΈ **Extensible:** Support for shell, file, HTTP request, LLM, and sub-workflow steps.
|
|
26
|
+
- π **MCP Support:** Integrated Model Context Protocol server.
|
|
27
|
+
- π‘οΈ **Secret Redaction:** Automatically redacts environment variables and secrets from logs and outputs.
|
|
23
28
|
|
|
24
29
|
---
|
|
25
30
|
|
|
26
31
|
## π Installation
|
|
27
32
|
|
|
28
|
-
Ensure you have [Bun](https://bun.sh) installed
|
|
33
|
+
Ensure you have [Bun](https://bun.sh) installed.
|
|
34
|
+
|
|
35
|
+
### Global Install (Recommended)
|
|
36
|
+
```bash
|
|
37
|
+
bun install -g keystone-cli
|
|
38
|
+
```
|
|
29
39
|
|
|
40
|
+
### From Source
|
|
30
41
|
```bash
|
|
31
|
-
#
|
|
32
|
-
|
|
42
|
+
# Clone the repository
|
|
43
|
+
git clone https://github.com/mhingston/keystone-cli.git
|
|
44
|
+
cd keystone-cli
|
|
45
|
+
|
|
46
|
+
# Install dependencies
|
|
47
|
+
bun install
|
|
33
48
|
|
|
34
|
-
#
|
|
35
|
-
|
|
49
|
+
# Link CLI globally
|
|
50
|
+
bun link
|
|
36
51
|
```
|
|
37
52
|
|
|
38
53
|
### Shell Completion
|
|
39
54
|
|
|
40
|
-
To enable tab completion for
|
|
55
|
+
To enable tab completion for your shell, add the following to your `.zshrc` or `.bashrc`:
|
|
41
56
|
|
|
42
|
-
**Zsh:**
|
|
43
|
-
|
|
57
|
+
**Zsh:**
|
|
58
|
+
```bash
|
|
59
|
+
source <(keystone completion zsh)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Bash:**
|
|
63
|
+
```bash
|
|
64
|
+
source <(keystone completion bash)
|
|
65
|
+
```
|
|
44
66
|
|
|
45
67
|
---
|
|
46
68
|
|
|
47
|
-
##
|
|
69
|
+
## π¦ Quick Start
|
|
48
70
|
|
|
49
71
|
### 1. Initialize a Project
|
|
50
72
|
```bash
|
|
51
73
|
keystone init
|
|
52
74
|
```
|
|
53
|
-
This creates
|
|
75
|
+
This creates the `.keystone/` directory for configuration and seeds `.keystone/workflows/` with default automation files and agents (like `scaffold-feature` and `keystone-architect`).
|
|
54
76
|
|
|
55
|
-
### 2. Configure Environment
|
|
77
|
+
### 2. Configure your Environment
|
|
56
78
|
Add your API keys to the generated `.env` file:
|
|
57
79
|
```env
|
|
58
80
|
OPENAI_API_KEY=sk-...
|
|
59
81
|
ANTHROPIC_API_KEY=sk-ant-...
|
|
60
82
|
```
|
|
61
83
|
|
|
62
|
-
### 3. Run
|
|
84
|
+
### 3. Run a Workflow
|
|
63
85
|
```bash
|
|
64
86
|
keystone run basic-shell
|
|
65
87
|
```
|
|
88
|
+
Keystone automatically looks in `.keystone/workflows/` (locally and in your home directory) for `.yaml` or `.yml` files.
|
|
89
|
+
|
|
90
|
+
### 4. Monitor with the Dashboard
|
|
91
|
+
```bash
|
|
92
|
+
keystone ui
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## βοΈ Configuration
|
|
98
|
+
|
|
99
|
+
Keystone uses a local configuration file at `.keystone/config.yaml` to manage model providers and model mappings.
|
|
100
|
+
|
|
101
|
+
```yaml
|
|
102
|
+
default_provider: openai
|
|
103
|
+
|
|
104
|
+
providers:
|
|
105
|
+
openai:
|
|
106
|
+
type: openai
|
|
107
|
+
base_url: https://api.openai.com/v1
|
|
108
|
+
api_key_env: OPENAI_API_KEY
|
|
109
|
+
default_model: gpt-4o
|
|
110
|
+
anthropic:
|
|
111
|
+
type: anthropic
|
|
112
|
+
base_url: https://api.anthropic.com/v1
|
|
113
|
+
api_key_env: ANTHROPIC_API_KEY
|
|
114
|
+
default_model: claude-3-5-sonnet-20240620
|
|
115
|
+
groq:
|
|
116
|
+
type: openai
|
|
117
|
+
base_url: https://api.groq.com/openai/v1
|
|
118
|
+
api_key_env: GROQ_API_KEY
|
|
119
|
+
default_model: llama-3.3-70b-versatile
|
|
120
|
+
|
|
121
|
+
model_mappings:
|
|
122
|
+
"gpt-*": openai
|
|
123
|
+
"claude-*": anthropic
|
|
124
|
+
"o1-*": openai
|
|
125
|
+
"llama-*": groq
|
|
126
|
+
|
|
127
|
+
mcp_servers:
|
|
128
|
+
filesystem:
|
|
129
|
+
command: npx
|
|
130
|
+
args: ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/directory"]
|
|
131
|
+
github:
|
|
132
|
+
command: npx
|
|
133
|
+
args: ["-y", "@modelcontextprotocol/server-github"]
|
|
134
|
+
env:
|
|
135
|
+
GITHUB_PERSONAL_ACCESS_TOKEN: "your-github-pat" # Or omit if GITHUB_TOKEN is in your .env
|
|
136
|
+
|
|
137
|
+
storage:
|
|
138
|
+
|
|
139
|
+
retention_days: 30
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Model & Provider Resolution
|
|
143
|
+
|
|
144
|
+
Keystone resolves which provider to use for a model in the following order:
|
|
145
|
+
|
|
146
|
+
1. **Explicit Provider:** Use the `provider` field in an agent or step definition.
|
|
147
|
+
2. **Provider Prefix:** Use the `provider:model` syntax (e.g., `model: copilot:gpt-4o`).
|
|
148
|
+
3. **Model Mappings:** Matches the model name against the `model_mappings` in your config (supports suffix `*` for prefix matching).
|
|
149
|
+
4. **Default Provider:** Falls back to the `default_provider` defined in your config.
|
|
150
|
+
|
|
151
|
+
#### Example: Explicit Provider in Agent
|
|
152
|
+
**`.keystone/workflows/agents/summarizer.md`**
|
|
153
|
+
```markdown
|
|
154
|
+
---
|
|
155
|
+
name: summarizer
|
|
156
|
+
provider: anthropic
|
|
157
|
+
model: claude-3-5-sonnet-latest
|
|
158
|
+
---
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
#### Example: Provider Prefix in Step
|
|
162
|
+
```yaml
|
|
163
|
+
- id: notify
|
|
164
|
+
type: llm
|
|
165
|
+
agent: summarizer
|
|
166
|
+
model: copilot:gpt-4o
|
|
167
|
+
prompt: ...
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### OpenAI Compatible Providers
|
|
171
|
+
You can add any OpenAI-compatible provider (Groq, Together AI, Perplexity, Local Ollama, etc.) by setting the `type` to `openai` and providing the `base_url` and `api_key_env`.
|
|
172
|
+
|
|
173
|
+
### GitHub Copilot Support
|
|
174
|
+
|
|
175
|
+
Keystone supports using your GitHub Copilot subscription directly. To authenticate (using the GitHub Device Flow):
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
keystone auth login
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Then, you can use Copilot in your configuration:
|
|
182
|
+
|
|
183
|
+
```yaml
|
|
184
|
+
providers:
|
|
185
|
+
copilot:
|
|
186
|
+
type: copilot
|
|
187
|
+
default_model: gpt-4o
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Authentication tokens for Copilot are managed automatically after the initial login. For other providers, API keys should be stored in a `.env` file in your project root:
|
|
191
|
+
- `OPENAI_API_KEY`
|
|
192
|
+
- `ANTHROPIC_API_KEY`
|
|
66
193
|
|
|
67
194
|
---
|
|
68
195
|
|
|
69
|
-
##
|
|
196
|
+
## π Workflow Example
|
|
70
197
|
|
|
71
|
-
|
|
72
|
-
Workflows are defined by steps. Steps run in **parallel** by default unless a dependency is defined via `needs` or detected in an expression like `${{ steps.previous_step.output }}`.
|
|
198
|
+
Workflows are defined in YAML. Dependencies are automatically resolved based on the `needs` field, and **Keystone also automatically detects implicit dependencies** from your `${{ }}` expressions.
|
|
73
199
|
|
|
74
200
|
```yaml
|
|
75
|
-
name:
|
|
201
|
+
name: build-and-notify
|
|
202
|
+
description: Build the project and notify the team
|
|
203
|
+
|
|
204
|
+
inputs:
|
|
205
|
+
branch:
|
|
206
|
+
type: string
|
|
207
|
+
default: main
|
|
208
|
+
|
|
76
209
|
steps:
|
|
77
|
-
- id:
|
|
210
|
+
- id: checkout
|
|
211
|
+
type: shell
|
|
212
|
+
run: git checkout ${{ inputs.branch }}
|
|
213
|
+
|
|
214
|
+
- id: install
|
|
215
|
+
type: shell
|
|
216
|
+
# Implicit dependency on 'checkout' detected from expression below
|
|
217
|
+
if: ${{ steps.checkout.status == 'success' }}
|
|
218
|
+
run: bun install
|
|
219
|
+
|
|
220
|
+
- id: build
|
|
78
221
|
type: shell
|
|
79
|
-
|
|
80
|
-
|
|
222
|
+
needs: [install] # Explicit dependency
|
|
223
|
+
run: bun run build
|
|
224
|
+
retry:
|
|
225
|
+
count: 3
|
|
226
|
+
backoff: exponential
|
|
81
227
|
|
|
82
|
-
- id:
|
|
228
|
+
- id: notify
|
|
83
229
|
type: llm
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
230
|
+
# Implicit dependency on 'build' detected from expression below
|
|
231
|
+
agent: summarizer
|
|
232
|
+
prompt: |
|
|
233
|
+
The build for branch "${{ inputs.branch }}" was successful.
|
|
234
|
+
Result: ${{ steps.build.output }}
|
|
235
|
+
Please write a concise 1-sentence summary for Slack.
|
|
236
|
+
|
|
237
|
+
outputs:
|
|
238
|
+
slack_message: ${{ steps.notify.output }}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## ποΈ Step Types
|
|
244
|
+
|
|
245
|
+
Keystone supports several specialized step types:
|
|
246
|
+
|
|
247
|
+
- `shell`: Run arbitrary shell commands.
|
|
248
|
+
- `llm`: Prompt an agent and get structured or unstructured responses. Supports `schema` (JSON Schema) for structured output.
|
|
249
|
+
- `request`: Make HTTP requests (GET, POST, etc.).
|
|
250
|
+
- `file`: Read, write, or append to files.
|
|
251
|
+
- `human`: Pause execution for manual confirmation or text input.
|
|
252
|
+
- `inputType: confirm`: Simple Enter-to-continue prompt.
|
|
253
|
+
- `inputType: text`: Prompt for a string input, available via `${{ steps.id.output }}`.
|
|
254
|
+
- `workflow`: Trigger another workflow as a sub-step.
|
|
255
|
+
- `sleep`: Pause execution for a specified duration.
|
|
256
|
+
|
|
257
|
+
All steps support common features like `needs` (dependencies), `if` (conditionals), `retry`, `timeout`, `foreach` (parallel iteration), and `transform` (post-process output using expressions).
|
|
258
|
+
|
|
259
|
+
#### Example: Transform & Foreach Concurrency
|
|
260
|
+
```yaml
|
|
261
|
+
- id: list_files
|
|
262
|
+
type: shell
|
|
263
|
+
run: ls *.txt
|
|
264
|
+
# Post-process stdout into an array of filenames
|
|
265
|
+
transform: ${{ stdout.trim().split('\n') }}
|
|
266
|
+
|
|
267
|
+
- id: process_files
|
|
268
|
+
type: shell
|
|
269
|
+
foreach: ${{ steps.list_files.output }}
|
|
270
|
+
concurrency: 5 # Process 5 files at a time
|
|
271
|
+
run: echo "Processing ${{ item }}"
|
|
88
272
|
```
|
|
89
273
|
|
|
90
|
-
|
|
91
|
-
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## π€ Agent Definitions
|
|
92
277
|
|
|
278
|
+
Agents are defined in Markdown files with YAML frontmatter, making them easy to read and version control.
|
|
279
|
+
|
|
280
|
+
**`.keystone/workflows/agents/summarizer.md`**
|
|
93
281
|
```markdown
|
|
94
282
|
---
|
|
95
|
-
name:
|
|
96
|
-
|
|
283
|
+
name: summarizer
|
|
284
|
+
provider: openai
|
|
285
|
+
model: gpt-4o
|
|
286
|
+
description: Summarizes technical logs into human-readable messages
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
You are a technical communications expert. Your goal is to take technical output
|
|
290
|
+
(like build logs or test results) and provide a concise, professional summary.
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### Agent Tools
|
|
294
|
+
|
|
295
|
+
Agents can be equipped with tools, which are essentially workflow steps they can choose to execute. You can define tools in the agent definition, or directly in an LLM step within a workflow.
|
|
296
|
+
|
|
297
|
+
**`.keystone/workflows/agents/developer.md`**
|
|
298
|
+
```markdown
|
|
299
|
+
---
|
|
300
|
+
name: developer
|
|
97
301
|
tools:
|
|
98
|
-
- name:
|
|
302
|
+
- name: list_files
|
|
303
|
+
description: List files in the current directory
|
|
99
304
|
execution:
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
305
|
+
id: list-files-tool
|
|
306
|
+
type: shell
|
|
307
|
+
run: ls -F
|
|
103
308
|
---
|
|
104
|
-
You are
|
|
309
|
+
You are a software developer. You can use tools to explore the codebase.
|
|
105
310
|
```
|
|
106
311
|
|
|
312
|
+
### Keystone as an MCP Server
|
|
313
|
+
|
|
314
|
+
Keystone can itself act as an MCP server, allowing other agents (like Claude Desktop or GitHub Copilot) to discover and run your workflows as tools.
|
|
315
|
+
|
|
316
|
+
```bash
|
|
317
|
+
keystone mcp
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
> **Note:** Workflow execution via the Keystone MCP server is synchronous. This provides a better experience for agents as they receive the final results directly, though it means the connection remains open for the duration of the workflow run.
|
|
321
|
+
|
|
322
|
+
#### Global MCP Servers
|
|
323
|
+
Define shared MCP servers in `.keystone/config.yaml` to reuse them across different workflows. Keystone ensures that multiple steps using the same global server will share a single running process.
|
|
324
|
+
|
|
325
|
+
Keystone supports both local (stdio) and remote (SSE) MCP servers.
|
|
326
|
+
|
|
327
|
+
```yaml
|
|
328
|
+
mcp_servers:
|
|
329
|
+
# Local server (stdio)
|
|
330
|
+
filesystem:
|
|
331
|
+
type: local # Default
|
|
332
|
+
command: npx
|
|
333
|
+
args: ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/directory"]
|
|
334
|
+
|
|
335
|
+
# Remote server (SSE)
|
|
336
|
+
atlassian:
|
|
337
|
+
type: remote
|
|
338
|
+
url: https://mcp.atlassian.com/v1/sse
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
#### Using MCP in Steps
|
|
342
|
+
You can use global servers, define local ones, or include all global servers at once.
|
|
343
|
+
|
|
344
|
+
```yaml
|
|
345
|
+
- id: analyze_code
|
|
346
|
+
type: llm
|
|
347
|
+
agent: developer
|
|
348
|
+
# Option 1: Explicitly include global servers by name
|
|
349
|
+
# Option 2: Define a local one-off server (standard object syntax)
|
|
350
|
+
mcpServers:
|
|
351
|
+
- filesystem
|
|
352
|
+
- name: custom-tool
|
|
353
|
+
command: node
|
|
354
|
+
args: ["./scripts/custom-mcp.js"]
|
|
355
|
+
|
|
356
|
+
# Option 3: Automatically include ALL global servers
|
|
357
|
+
useGlobalMcp: true
|
|
358
|
+
|
|
359
|
+
prompt: "Analyze the architecture of this project."
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
In these examples, the agent will have access to all tools provided by the MCP servers (like `list_directory`, `read_file`, etc.) in addition to any tools defined in the agent or the step itself.
|
|
363
|
+
|
|
107
364
|
---
|
|
108
365
|
|
|
109
|
-
## π οΈ CLI
|
|
366
|
+
## π οΈ CLI Commands
|
|
110
367
|
|
|
111
368
|
| Command | Description |
|
|
112
369
|
| :--- | :--- |
|
|
113
370
|
| `init` | Initialize a new Keystone project |
|
|
114
|
-
| `run <workflow>` | Execute a workflow (
|
|
115
|
-
| `resume <run_id>` | Resume a
|
|
371
|
+
| `run <workflow>` | Execute a workflow (use `-i key=val` for inputs) |
|
|
372
|
+
| `resume <run_id>` | Resume a failed or paused workflow |
|
|
373
|
+
| `validate [path]` | Check workflow files for errors |
|
|
374
|
+
| `workflows` | List available workflows |
|
|
375
|
+
| `history` | Show recent workflow runs |
|
|
376
|
+
| `logs <run_id>` | View logs and step status for a specific run |
|
|
377
|
+
| `graph <workflow>` | Generate a Mermaid diagram of the workflow |
|
|
378
|
+
| `config` | Show current configuration and providers |
|
|
379
|
+
| `auth status` | Show authentication status |
|
|
380
|
+
| `auth login` | Login to an authentication provider (GitHub) |
|
|
381
|
+
| `auth logout` | Logout and clear authentication tokens |
|
|
116
382
|
| `ui` | Open the interactive TUI dashboard |
|
|
117
|
-
| `mcp` | Start the MCP server
|
|
118
|
-
| `
|
|
119
|
-
| `
|
|
120
|
-
| `auth login` | Authenticate with GitHub for Copilot support |
|
|
121
|
-
| `validate` | Check workflow files for schema and logic errors |
|
|
383
|
+
| `mcp` | Start the Keystone MCP server |
|
|
384
|
+
| `completion [shell]` | Generate shell completion script (zsh, bash) |
|
|
385
|
+
| `prune [--days N]` | Cleanup old run data from the database |
|
|
122
386
|
|
|
123
387
|
---
|
|
124
388
|
|
|
125
|
-
##
|
|
389
|
+
## π Project Structure
|
|
126
390
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
391
|
+
- `src/db/`: SQLite persistence layer.
|
|
392
|
+
- `src/runner/`: The core execution engine, handles parallelization and retries.
|
|
393
|
+
- `src/parser/`: Zod-powered validation for workflows and agents.
|
|
394
|
+
- `src/expression/`: `${{ }}` expression evaluator.
|
|
395
|
+
- `src/ui/`: Ink-powered TUI dashboard.
|
|
396
|
+
- `src/utils/`: Shared utilities (auth, redaction, config loading).
|
|
397
|
+
- `.keystone/workflows/`: Your YAML workflow definitions.
|
|
131
398
|
|
|
132
399
|
---
|
|
133
400
|
|
|
134
401
|
## π License
|
|
135
402
|
|
|
136
|
-
MIT
|
|
403
|
+
MIT
|