@graphlit/durable-agents 1.0.20260614002 → 1.0.20260615005

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.
Files changed (2) hide show
  1. package/README.md +244 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,33 +1,268 @@
1
1
  # Graphlit Durable Agents CLI
2
2
 
3
- Command-line interface for Durable Agents.
3
+ The Durable CLI is the terminal surface for [Graphlit Durable Agents](https://www.durableagents.ai). Use it to authenticate a Durable workspace, connect source accounts, create synced data sources, manage Library content, configure agents, start and inspect runs, browse the read-only `/library` virtual filesystem, and wire agents to channels or MCP connectors.
4
+
5
+ The npm package is `@graphlit/durable-agents`. The executable is `durable`.
6
+
7
+ ## Install
8
+
9
+ Requires Node.js `>=22.20.0`.
4
10
 
5
11
  ```bash
6
12
  npm install -g @graphlit/durable-agents
13
+
14
+ durable --version
7
15
  durable --help
8
16
  ```
9
17
 
10
- The CLI defaults to the production Durable Agents API and uses `--json` for stable machine-readable output.
18
+ The CLI talks to the production Durable Agents API by default.
19
+
20
+ ## First Session
21
+
22
+ Authenticate once on each machine:
11
23
 
12
24
  ```bash
13
25
  durable login
26
+ durable whoami
27
+ durable status
28
+ ```
29
+
30
+ Then inspect the workspace:
31
+
32
+ ```bash
33
+ durable usage
34
+ durable models list
35
+ durable accounts list
36
+ durable sources list
37
+ durable agents list
38
+ durable library list
39
+ durable runs list
40
+ ```
41
+
42
+ Create and run a minimal agent:
43
+
44
+ ```bash
45
+ AGENT_ID="$(
46
+ durable --json agents create \
47
+ --name "CLI Assistant" \
48
+ --prompt "Answer from Library context when available." \
49
+ | jq -r '.id'
50
+ )"
51
+
52
+ durable library ingest \
53
+ --text "Sprint notes: focus on onboarding, channels, and CLI polish." \
54
+ --name "Sprint Notes" \
55
+ --label planning
56
+
57
+ durable agents start "$AGENT_ID" "Summarize the sprint notes."
14
58
  ```
15
59
 
16
- Login opens Durable Agents Hub, shows a pairing code in both the terminal and browser, and stores a claimed Durable API key in the local credentials file.
60
+ `durable agents start` streams by default. For scripts, use `--json`, `--no-stream`, `--wait`, and `--timeout` when you need structured or bounded output.
61
+
62
+ ## Agent Skills
17
63
 
18
- Agent mutations use the property-oriented grammar:
64
+ The README intentionally stays compact. The canonical task guides live in the [Graphlit skills repo](https://github.com/graphlit/skills):
65
+
66
+ | Skill | Use it for |
67
+ | --- | --- |
68
+ | [durable-cli](https://github.com/graphlit/skills/blob/main/skills/durable-cli/SKILL.md) | Installing, authenticating, scripting, connecting accounts, creating data sources, operating agents/runs, using Library/VFS commands, channels, email, messaging, and MCP connectors. |
69
+ | [durable-cli quickstart](https://github.com/graphlit/skills/blob/main/skills/durable-cli/references/quickstart.md) | The fastest path from install to a working Durable Agents session. |
70
+ | [durable-cli command surface](https://github.com/graphlit/skills/blob/main/skills/durable-cli/references/command-surface.md) | Choosing the right command family and avoiding naming mistakes such as accounts vs sources vs connectors vs channels. |
71
+ | [graphlit](https://github.com/graphlit/skills/blob/main/skills/graphlit/SKILL.md) | Building Graphlit-powered apps with ingestion, retrieval, collections, feeds, specifications, knowledge graph workflows, and `streamAgent()`. |
72
+ | [graphlit-agent-tools](https://github.com/graphlit/skills/blob/main/skills/graphlit-agent-tools/SKILL.md) | Giving tool-calling agents Graphlit retrieval, content inspection, resource reading, ingestion, enrichment, and media-generation tools through `@graphlit/agent-tools`. |
73
+
74
+ When you are asking a coding agent to use the CLI, point it at the `durable-cli` skill instead of copying command details into your prompt.
75
+
76
+ ## Common Workflows
77
+
78
+ ### Auth And Keys
79
+
80
+ ```bash
81
+ durable login
82
+ durable logout
83
+ durable whoami
84
+ durable status
85
+
86
+ durable auth import --stdin
87
+ durable auth import --env DURABLE_API_KEY
88
+ durable auth export
89
+
90
+ durable keys list
91
+ durable keys create --name "CI"
92
+ durable keys create --name "CI" --save
93
+ durable keys revoke <api-key-id>
94
+ ```
95
+
96
+ Local credentials are stored at `~/.config/graphlit/durable-agents/credentials.json`. `DURABLE_API_KEY` takes precedence over the stored credential.
97
+
98
+ ### Agents And Runs
99
+
100
+ ```bash
101
+ durable agents list
102
+ durable agents create --name "Research Assistant"
103
+ durable agents get <agent>
104
+ durable agents set <agent> prompt "Answer from the Library."
105
+ durable agents start <agent> "Summarize recent planning notes."
106
+
107
+ durable runs list --agent <agent>
108
+ durable runs get <run-id>
109
+ durable runs watch <run-id>
110
+ durable runs prompt <run-id> "Now turn that into three action items."
111
+ durable runs replay <run-id>
112
+ durable runs pause <run-id>
113
+ durable runs resume <run-id> --reply "Approved."
114
+ durable runs cancel <run-id>
115
+ ```
116
+
117
+ Agent edits use the property grammar:
19
118
 
20
119
  ```bash
21
120
  durable agents set <agent> prompt "Run the daily account sweep."
22
121
  durable agents set <agent> prompt --file ./prompt.md
23
122
  durable agents set <agent> schedule.cron "0 7 * * 1-5"
24
123
  durable agents set <agent> trigger.kinds text page
124
+ durable agents set <agent> mode interactive
25
125
  durable agents clear <agent> focus
26
- durable agents clear <agent> trigger.kinds
27
126
  ```
28
127
 
29
- Scalar values are positional by default. List-valued properties use repeated
30
- positional values. The global `--json` flag controls output only; it is not an
31
- input parser.
128
+ Scalar values are positional. List-valued properties use repeated positional values. The global `--json` flag controls output only; it is not an input parser.
129
+
130
+ ### Library And VFS
131
+
132
+ ```bash
133
+ durable library list
134
+ durable library ingest --url "https://example.com/docs" --name "Docs Home" --label docs
135
+ durable library ingest --text "Customer asked about onboarding." --name "Customer Note"
136
+ durable library upload ./README.md --label repo --wait
137
+ durable library search "planning"
138
+ durable library inspect <content-id>
139
+
140
+ durable fs ls /library
141
+ durable fs ls /library/labels/docs --long
142
+ durable fs find /library --kind document --long
143
+ durable fs grep "onboarding" /library
144
+ durable fs sgrep "accounts likely to expand" /library
145
+ durable fs cat /library/<content-id>
146
+ durable fs stat /library/<content-id>
147
+ ```
148
+
149
+ Use `durable library ...` to manage content objects. Use `durable fs ...` to navigate and search the derived `/library` filesystem view.
150
+
151
+ ### Source Accounts And Data Sources
152
+
153
+ ```bash
154
+ durable accounts connect github
155
+ durable accounts list
156
+ durable accounts reconnect <account>
157
+
158
+ durable sources create web --name "Docs Web" --url "https://example.com/docs"
159
+ durable sources discover github --account <account> --search repo-name
160
+ durable sources create github-code --account <account> --repo owner/repo
161
+ durable sources sync <source>
162
+ durable sources pause <source>
163
+ durable sources resume <source>
164
+ ```
165
+
166
+ Use `accounts` for external account OAuth state. Use `sources` for the synced external content Durable should ingest. Use `connectors` only for MCP servers.
167
+
168
+ ### MCP Connectors And Channels
169
+
170
+ ```bash
171
+ durable connectors create https://example.com/mcp --name "Example MCP" --type http
172
+ durable connectors connect <connector>
173
+ durable connectors list
174
+
175
+ durable channels setup slack
176
+ durable channels create slack --name "Workspace Slack" --bot-token "xoxb-..." --signing-secret "<secret>"
177
+ durable channels endpoints --provider slack --query ops
178
+ durable channels bind --provider slack --agent <agent> --channel "#ops" --workspace "My Workspace"
179
+
180
+ durable channels email create
181
+ durable channels email messages send <email-address> --to user@example.com --subject "Hello" --text "READY"
182
+ durable channels messaging status
183
+ durable channels messaging phones register --phone +15555550123
184
+ ```
185
+
186
+ ## JSON And Scripting
187
+
188
+ Put global flags before the command group:
189
+
190
+ ```bash
191
+ durable --json agents list
192
+ durable --quiet runs watch <run-id>
193
+ durable --verbose status
194
+ durable --debug status
195
+ ```
196
+
197
+ Capture IDs with `--json` for reliable automation:
198
+
199
+ ```bash
200
+ AGENT_ID="$(durable --json agents create --name "Scripted Agent" | jq -r '.id')"
201
+ RUN_ID="$(durable --json agents start "$AGENT_ID" --no-stream "Reply READY only." | jq -r '.id')"
32
202
 
33
- The older `durable agents update ...` flags remain available for compatibility.
203
+ durable --json runs get "$RUN_ID"
204
+ ```
205
+
206
+ Prompt text can be positional, read from `--file`, or piped through stdin:
207
+
208
+ ```bash
209
+ durable agents start <agent> "Review this."
210
+ durable agents start <agent> --file ./prompt.md
211
+ cat ./prompt.md | durable agents start <agent>
212
+ ```
213
+
214
+ ## Command Map
215
+
216
+ ```text
217
+ durable login | logout | whoami | status
218
+ durable auth import | export
219
+ durable keys list | create | revoke
220
+ durable usage
221
+ durable wallet fund | fund status
222
+ durable models list
223
+
224
+ durable agents list | create | get | set | clear | start | update | delete
225
+ durable runs list | get | events | watch | replay | pause | resume | prompt | cancel
226
+
227
+ durable personas list | create | get | update | delete
228
+ durable skills list | create | get | update | delete
229
+
230
+ durable library list | ingest | upload | get | inspect | update | delete | search
231
+ durable fs ls | cat | grep | sgrep | find | stat
232
+
233
+ durable accounts list | connect | get | reconnect | delete
234
+ durable sources list | get | discover | create | update | pause | resume | sync | delete
235
+
236
+ durable connectors list | create | get | update | connect | disconnect | delete
237
+ durable channels setup slack
238
+ durable channels list | create | delete | endpoints | bind | unbind
239
+ durable channels email list | create | delete
240
+ durable channels email messages list | get | send
241
+ durable channels messaging status
242
+ durable channels messaging phones register | list | delete
243
+ ```
244
+
245
+ When details matter, ask the installed CLI:
246
+
247
+ ```bash
248
+ durable agents start --help
249
+ durable sources create --help
250
+ durable channels bind --help
251
+ durable fs sgrep --help
252
+ ```
253
+
254
+ ## Development
255
+
256
+ This package is built from `apps/durable-cli`.
257
+
258
+ ```bash
259
+ npm run generate
260
+ npm run build
261
+ npm run check
262
+ ```
263
+
264
+ For local API development:
265
+
266
+ ```bash
267
+ export DURABLE_API_BASE_URL="http://localhost:3000"
268
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphlit/durable-agents",
3
- "version": "1.0.20260614002",
3
+ "version": "1.0.20260615005",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {