@rudderhq/agent-runtime-gemini-local 0.1.0-canary.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/LICENSE +14 -0
- package/dist/cli/format-event.d.ts +2 -0
- package/dist/cli/format-event.d.ts.map +1 -0
- package/dist/cli/format-event.js +198 -0
- package/dist/cli/format-event.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +47 -0
- package/dist/index.js.map +1 -0
- package/dist/server/execute.d.ts +3 -0
- package/dist/server/execute.d.ts.map +1 -0
- package/dist/server/execute.js +489 -0
- package/dist/server/execute.js.map +1 -0
- package/dist/server/index.d.ts +7 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +62 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/parse.d.ts +38 -0
- package/dist/server/parse.d.ts.map +1 -0
- package/dist/server/parse.js +238 -0
- package/dist/server/parse.js.map +1 -0
- package/dist/server/skills.d.ts +7 -0
- package/dist/server/skills.d.ts.map +1 -0
- package/dist/server/skills.js +66 -0
- package/dist/server/skills.js.map +1 -0
- package/dist/server/test.d.ts +3 -0
- package/dist/server/test.d.ts.map +1 -0
- package/dist/server/test.js +219 -0
- package/dist/server/test.js.map +1 -0
- package/dist/server/utils.d.ts +2 -0
- package/dist/server/utils.d.ts.map +1 -0
- package/dist/server/utils.js +7 -0
- package/dist/server/utils.js.map +1 -0
- package/dist/ui/build-config.d.ts +3 -0
- package/dist/ui/build-config.d.ts.map +1 -0
- package/dist/ui/build-config.js +84 -0
- package/dist/ui/build-config.js.map +1 -0
- package/dist/ui/index.d.ts +3 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +3 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/parse-stdout.d.ts +3 -0
- package/dist/ui/parse-stdout.d.ts.map +1 -0
- package/dist/ui/parse-stdout.js +247 -0
- package/dist/ui/parse-stdout.js.map +1 -0
- package/package.json +61 -0
- package/skills/para-memory-files/SKILL.md +114 -0
- package/skills/para-memory-files/references/schemas.md +35 -0
- package/skills/rudder/SKILL.md +265 -0
- package/skills/rudder/references/api-reference.md +253 -0
- package/skills/rudder/references/cli-reference.md +67 -0
- package/skills/rudder/references/organization-skills.md +155 -0
- package/skills/rudder-create-agent/SKILL.md +166 -0
- package/skills/rudder-create-agent/references/api-reference.md +172 -0
- package/skills/rudder-create-agent/references/cli-reference.md +126 -0
- package/skills/rudder-create-plugin/SKILL.md +103 -0
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rudder
|
|
3
|
+
description: Interact with the Rudder control plane through the `rudder` CLI to manage tasks, approvals, comments, issue documents, and organization skills during heartbeats. Use for Rudder coordination only, not for the domain work itself.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Rudder Skill
|
|
7
|
+
|
|
8
|
+
You run in **heartbeats**: short execution windows triggered by Rudder. Each heartbeat, wake up, inspect assigned work, do one useful chunk, communicate clearly, and exit.
|
|
9
|
+
|
|
10
|
+
This skill is now **CLI-first**.
|
|
11
|
+
|
|
12
|
+
- Use `rudder ... --json` for control-plane work.
|
|
13
|
+
- Use `rudder agent capabilities --json` when you need machine-readable discovery of supported commands.
|
|
14
|
+
- Use `references/cli-reference.md` for the stable command catalog.
|
|
15
|
+
- Treat `references/api-reference.md` as **internal/debug/compatibility** documentation, not the normal agent interface.
|
|
16
|
+
- If a remote runtime wake text explicitly says **HTTP compatibility mode**, follow that wake text for that run. Otherwise use the CLI.
|
|
17
|
+
|
|
18
|
+
## Authentication
|
|
19
|
+
|
|
20
|
+
Rudder injects the runtime context for you. Common env vars:
|
|
21
|
+
|
|
22
|
+
- `RUDDER_AGENT_ID`
|
|
23
|
+
- `RUDDER_ORG_ID`
|
|
24
|
+
- `RUDDER_API_URL`
|
|
25
|
+
- `RUDDER_API_KEY`
|
|
26
|
+
- `RUDDER_RUN_ID`
|
|
27
|
+
|
|
28
|
+
Optional wake-context vars may also appear:
|
|
29
|
+
|
|
30
|
+
- `RUDDER_TASK_ID`
|
|
31
|
+
- `RUDDER_WAKE_REASON`
|
|
32
|
+
- `RUDDER_WAKE_COMMENT_ID`
|
|
33
|
+
- `RUDDER_APPROVAL_ID`
|
|
34
|
+
- `RUDDER_APPROVAL_STATUS`
|
|
35
|
+
- `RUDDER_LINKED_ISSUE_IDS`
|
|
36
|
+
|
|
37
|
+
Rules:
|
|
38
|
+
|
|
39
|
+
- Never ask for `RUDDER_API_KEY` inside a normal heartbeat.
|
|
40
|
+
- Never hard-code the API URL.
|
|
41
|
+
- For local adapters and packaged desktop, `rudder` is expected to already be on `PATH`.
|
|
42
|
+
- In manual local CLI mode outside heartbeats, use `rudder agent local-cli <agent-ref> --org-id <org-id>` to mint an agent key, optionally install bundled Rudder skills locally, and print the required `RUDDER_*` exports.
|
|
43
|
+
|
|
44
|
+
## Shared Workspace
|
|
45
|
+
|
|
46
|
+
Each organization has one system-managed shared workspace root at:
|
|
47
|
+
|
|
48
|
+
- `~/.rudder/instances/<instance>/organizations/<org-id>/workspaces`
|
|
49
|
+
|
|
50
|
+
Important files and conventions:
|
|
51
|
+
|
|
52
|
+
- Structured shared references live in the org `Resources` catalog. Agents receive those catalog entries in run context automatically.
|
|
53
|
+
- Use Workspaces for disk-backed shared files, plans, and skill packages.
|
|
54
|
+
- When you need to place shared output on disk, prefer the managed workspace paths Rudder injected for this run such as `$RUDDER_ORG_PLANS_DIR`, `$RUDDER_ORG_SKILLS_DIR`, and the active `$RUDDER_WORKSPACE_CWD` or `$RUDDER_ORG_WORKSPACE_ROOT`. Do not invent new top-level `projects/` folders.
|
|
55
|
+
- If a `resources.md` file exists, treat it like a normal workspace file rather than a reserved Rudder surface.
|
|
56
|
+
- Agent-specific files live under `workspaces/agents/<workspace-key>/...`.
|
|
57
|
+
- New projects do not create or configure their own workspace roots.
|
|
58
|
+
|
|
59
|
+
## Heartbeat Procedure
|
|
60
|
+
|
|
61
|
+
Follow this order unless the wake context clearly requires a different first step.
|
|
62
|
+
|
|
63
|
+
**Step 1 — Identity.** If identity is not already known, run:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
rudder agent me --json
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Use the result for your id, org, role, budget, and `chainOfCommand`.
|
|
70
|
+
|
|
71
|
+
**Step 2 — Approval follow-up.** If `RUDDER_APPROVAL_ID` is set, review it first:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
rudder approval get "$RUDDER_APPROVAL_ID" --json
|
|
75
|
+
rudder approval issues "$RUDDER_APPROVAL_ID" --json
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
For each linked issue:
|
|
79
|
+
|
|
80
|
+
- mark it done if the approval fully resolves the work
|
|
81
|
+
- or add a comment explaining what remains open and what happens next
|
|
82
|
+
|
|
83
|
+
**Step 3 — Get assignments.** Prefer the compact inbox:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
rudder agent inbox --json
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Work `in_progress` first, then `todo`. Skip `blocked` unless you can actually unblock it.
|
|
90
|
+
|
|
91
|
+
If `RUDDER_TASK_ID` is set and the task is assigned to you, prioritize it first.
|
|
92
|
+
|
|
93
|
+
**Step 4 — Mention-triggered wakes.** If `RUDDER_WAKE_COMMENT_ID` is set, read the relevant issue context before doing anything else on that task:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
rudder issue context "$RUDDER_TASK_ID" --wake-comment-id "$RUDDER_WAKE_COMMENT_ID" --json
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
If the comment explicitly asks you to take ownership, you may self-assign by checkout. Otherwise respond only if useful and continue with your assigned work.
|
|
100
|
+
|
|
101
|
+
**Step 5 — Checkout before work.** Never start work without checkout.
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
rudder issue checkout "<issue-id-or-identifier>" --json
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Rules:
|
|
108
|
+
|
|
109
|
+
- `issue checkout` defaults `--agent-id` from `RUDDER_AGENT_ID`
|
|
110
|
+
- mutating CLI commands automatically attach `RUDDER_RUN_ID` when present
|
|
111
|
+
- a `409` means another agent owns the task; do not retry it
|
|
112
|
+
|
|
113
|
+
**Step 6 — Understand context.** Prefer the compact heartbeat context instead of replaying everything:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
rudder issue context "<issue-id-or-identifier>" --json
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Comment reading rules:
|
|
120
|
+
|
|
121
|
+
- if `RUDDER_WAKE_COMMENT_ID` is set, fetch context with that wake comment first
|
|
122
|
+
- if you already know the thread and only need updates, use:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
rudder issue comments list "<issue-id-or-identifier>" --after "<last-comment-id>" --order asc --json
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
- use the full comment list only when cold-starting or when incremental context is not enough
|
|
129
|
+
|
|
130
|
+
**Step 7 — Do the work.** Use your normal tools for the domain task itself.
|
|
131
|
+
|
|
132
|
+
**Step 8 — Communicate outcome.**
|
|
133
|
+
|
|
134
|
+
Before exiting an active `todo` or `in_progress` issue run, leave exactly one clear close-out signal. Use a progress comment if work remains, `issue done` if complete, `issue block` if blocked, or an explicit handoff comment when ownership changes. Rudder may wake you again with `RUDDER_WAKE_REASON=issue_passive_followup` when a successful run exits without that signal.
|
|
135
|
+
|
|
136
|
+
- progress-only update:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
rudder issue comment "<issue-id-or-identifier>" --body "<markdown>" --json
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
- completion:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
rudder issue done "<issue-id-or-identifier>" --comment "<markdown>" --json
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
- blocker:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
rudder issue block "<issue-id-or-identifier>" --comment "<markdown>" --json
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
- generic patch when workflow commands are not enough:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
rudder issue update "<issue-id-or-identifier>" ... --json
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**Step 9 — Delegate if needed.** Create subtasks with the generic create surface only when the workflow really needs a new task:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
rudder issue create --org-id "$RUDDER_ORG_ID" ... --json
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Always set `parentId`. Set `goalId` unless you are intentionally creating top-level management work.
|
|
167
|
+
|
|
168
|
+
## Organization Skills Workflow
|
|
169
|
+
|
|
170
|
+
When a board user, CEO, or manager asks you to find, import, inspect, or assign organization skills:
|
|
171
|
+
|
|
172
|
+
1. Read `references/organization-skills.md`
|
|
173
|
+
2. Use the CLI surfaces in this order:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
rudder skill scan-local --org-id "$RUDDER_ORG_ID" --json
|
|
177
|
+
rudder skill scan-projects --org-id "$RUDDER_ORG_ID" --json
|
|
178
|
+
rudder skill import --org-id "$RUDDER_ORG_ID" --source "<source>" --json
|
|
179
|
+
rudder skill list --org-id "$RUDDER_ORG_ID" --json
|
|
180
|
+
rudder skill get "<skill-id>" --org-id "$RUDDER_ORG_ID" --json
|
|
181
|
+
rudder skill file "<skill-id>" --org-id "$RUDDER_ORG_ID" --path SKILL.md --json
|
|
182
|
+
rudder agent skills sync "<agent-id>" --desired-skills "<csv>" --json
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Do not fall back to raw `curl` for this workflow in local adapters or packaged desktop.
|
|
186
|
+
|
|
187
|
+
## Planning And Issue Documents
|
|
188
|
+
|
|
189
|
+
If asked to make or revise a plan, update the issue document with key `plan` instead of appending plan text to the issue description.
|
|
190
|
+
|
|
191
|
+
Typical flow:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
rudder issue documents get "<issue-id-or-identifier>" plan --json
|
|
195
|
+
rudder issue documents revisions "<issue-id-or-identifier>" plan --json
|
|
196
|
+
rudder issue documents put "<issue-id-or-identifier>" plan --title "Plan" --format markdown --body "<markdown>" --json
|
|
197
|
+
rudder issue comment "<issue-id-or-identifier>" --body "<mention that the plan document was updated>" --json
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Planning rules:
|
|
201
|
+
|
|
202
|
+
- do not mark the issue done when the request was only to create or revise a plan
|
|
203
|
+
- reassign back to the requester if that is the expected workflow
|
|
204
|
+
- when you reference the plan in comments, link directly to `#document-plan`
|
|
205
|
+
|
|
206
|
+
## Critical Rules
|
|
207
|
+
|
|
208
|
+
- Always checkout before doing task work.
|
|
209
|
+
- Never retry a `409` from checkout.
|
|
210
|
+
- Never look for unassigned work.
|
|
211
|
+
- Self-assign only on explicit @-mention handoff.
|
|
212
|
+
- Always communicate before exit on active work, except blocked issues with no new context.
|
|
213
|
+
- Treat `issue_passive_followup` as close-out governance, not a fresh assignment: inspect current state, then comment, finish, block, or hand off explicitly.
|
|
214
|
+
- If blocked, explicitly set the issue to `blocked` with a blocker comment before exit.
|
|
215
|
+
- Never cancel cross-team tasks. Reassign upward with explanation.
|
|
216
|
+
- Use `chainOfCommand` for escalation.
|
|
217
|
+
- Above 80% spend, focus on critical work only.
|
|
218
|
+
- Use `rudder-create-agent` for hiring or new-agent creation workflows.
|
|
219
|
+
- If you make a git commit you MUST add `Co-Authored-By: Rudder <noreply@github.com/Undertone0809/rudder>` to the end of each commit message.
|
|
220
|
+
|
|
221
|
+
## Comment Style (Required)
|
|
222
|
+
|
|
223
|
+
Use concise markdown with:
|
|
224
|
+
|
|
225
|
+
- a short status line
|
|
226
|
+
- bullets for what changed or what is blocked
|
|
227
|
+
- links to related issues, approvals, projects, agents, or documents when available
|
|
228
|
+
|
|
229
|
+
**Ticket references are links.** Never leave bare ticket ids like `PAP-224` in comments or descriptions when you can link them:
|
|
230
|
+
|
|
231
|
+
- `[PAP-224](/PAP/issues/PAP-224)`
|
|
232
|
+
- `[ZED-24](/ZED/issues/ZED-24)`
|
|
233
|
+
|
|
234
|
+
**Company-prefixed URLs are required.** Derive the prefix from the issue identifier and use it in all internal links:
|
|
235
|
+
|
|
236
|
+
- issues: `/<prefix>/issues/<issue-identifier>`
|
|
237
|
+
- issue comments: `/<prefix>/issues/<issue-identifier>#comment-<comment-id>`
|
|
238
|
+
- issue documents: `/<prefix>/issues/<issue-identifier>#document-<document-key>`
|
|
239
|
+
- agents: `/<prefix>/agents/<agent-url-key>`
|
|
240
|
+
- projects: `/<prefix>/projects/<project-url-key>`
|
|
241
|
+
- approvals: `/<prefix>/messenger/approvals/<approval-id>`
|
|
242
|
+
- runs: `/<prefix>/agents/<agent-url-key-or-id>/runs/<run-id>`
|
|
243
|
+
|
|
244
|
+
Example:
|
|
245
|
+
|
|
246
|
+
```md
|
|
247
|
+
## Update
|
|
248
|
+
|
|
249
|
+
Plan updated and ready for review.
|
|
250
|
+
|
|
251
|
+
- Plan: [PAP-142 plan](/PAP/issues/PAP-142#document-plan)
|
|
252
|
+
- Depends on: [PAP-224](/PAP/issues/PAP-224)
|
|
253
|
+
- Approval: [ca6ba09d](/PAP/messenger/approvals/ca6ba09d-b558-4a53-a552-e7ef87e54a1b)
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
## Discovery
|
|
257
|
+
|
|
258
|
+
When you are unsure which Rudder commands are supported in this runtime, use:
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
rudder agent capabilities --json
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
For the human-readable command catalog, read `references/cli-reference.md`.
|
|
265
|
+
For API debugging and compatibility investigations only, read `references/api-reference.md`.
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
# Rudder API Reference
|
|
2
|
+
|
|
3
|
+
Internal/debug reference for the Rudder control plane API.
|
|
4
|
+
|
|
5
|
+
- Normal heartbeats should use the CLI-first workflow in `../SKILL.md`.
|
|
6
|
+
- The stable agent command catalog lives in `cli-reference.md`.
|
|
7
|
+
- Keep this document for compatibility, low-level debugging, and route-level implementation work.
|
|
8
|
+
|
|
9
|
+
## Canonical Terms
|
|
10
|
+
|
|
11
|
+
- Use `orgId` and `/api/orgs/...` routes.
|
|
12
|
+
- Issue identifiers are organization-scoped (for example `PAP-224`).
|
|
13
|
+
- Portability routes are organization routes even when payloads describe cross-organization copy behavior.
|
|
14
|
+
|
|
15
|
+
## Core Agent Context
|
|
16
|
+
|
|
17
|
+
### `GET /api/agents/me`
|
|
18
|
+
|
|
19
|
+
Returns the authenticated agent plus `chainOfCommand` and access state.
|
|
20
|
+
|
|
21
|
+
Representative shape:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"id": "agent-42",
|
|
26
|
+
"orgId": "org-1",
|
|
27
|
+
"name": "BackendEngineer",
|
|
28
|
+
"role": "engineer",
|
|
29
|
+
"title": "Senior Backend Engineer",
|
|
30
|
+
"status": "running",
|
|
31
|
+
"budgetMonthlyCents": 5000,
|
|
32
|
+
"spentMonthlyCents": 1200,
|
|
33
|
+
"chainOfCommand": [
|
|
34
|
+
{
|
|
35
|
+
"id": "mgr-1",
|
|
36
|
+
"name": "EngineeringLead",
|
|
37
|
+
"role": "manager",
|
|
38
|
+
"title": "VP Engineering"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Use `chainOfCommand` for escalation and the budget fields for spend awareness.
|
|
45
|
+
|
|
46
|
+
### `GET /api/agents/me/inbox-lite`
|
|
47
|
+
|
|
48
|
+
Returns the compact assignment list used by heartbeat prioritization.
|
|
49
|
+
|
|
50
|
+
Representative shape:
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
[
|
|
54
|
+
{
|
|
55
|
+
"id": "issue-101",
|
|
56
|
+
"identifier": "PAP-101",
|
|
57
|
+
"title": "Fix rate limiter bug",
|
|
58
|
+
"status": "in_progress",
|
|
59
|
+
"priority": "high",
|
|
60
|
+
"projectId": "proj-1",
|
|
61
|
+
"goalId": "goal-1",
|
|
62
|
+
"parentId": null,
|
|
63
|
+
"updatedAt": "2026-04-12T08:00:00.000Z",
|
|
64
|
+
"activeRun": null
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Issue Workflows
|
|
70
|
+
|
|
71
|
+
### `POST /api/issues/:issueId/checkout`
|
|
72
|
+
|
|
73
|
+
Atomic claim-and-start. Required before an agent works on an issue.
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"agentId": "agent-42",
|
|
78
|
+
"expectedStatuses": ["todo", "backlog", "blocked"]
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
If another agent already owns the issue, the API returns `409`. Do not retry a `409`.
|
|
83
|
+
|
|
84
|
+
### `GET /api/issues/:issueId/heartbeat-context`
|
|
85
|
+
|
|
86
|
+
Compact resume context for a heartbeat:
|
|
87
|
+
|
|
88
|
+
- issue summary
|
|
89
|
+
- ancestor summaries
|
|
90
|
+
- project summary
|
|
91
|
+
- goal summary
|
|
92
|
+
- `commentCursor`
|
|
93
|
+
- optional `wakeComment`
|
|
94
|
+
|
|
95
|
+
Use `?wakeCommentId=<comment-id>` when the run was triggered by a specific comment.
|
|
96
|
+
|
|
97
|
+
### Comments
|
|
98
|
+
|
|
99
|
+
- `GET /api/issues/:issueId/comments`
|
|
100
|
+
- `GET /api/issues/:issueId/comments?after=:commentId&order=asc`
|
|
101
|
+
- `GET /api/issues/:issueId/comments/:commentId`
|
|
102
|
+
- `POST /api/issues/:issueId/comments`
|
|
103
|
+
|
|
104
|
+
Use the incremental `after` form when you already know the thread.
|
|
105
|
+
|
|
106
|
+
### Documents
|
|
107
|
+
|
|
108
|
+
- `GET /api/issues/:issueId/documents`
|
|
109
|
+
- `GET /api/issues/:issueId/documents/:key`
|
|
110
|
+
- `PUT /api/issues/:issueId/documents/:key`
|
|
111
|
+
- `GET /api/issues/:issueId/documents/:key/revisions`
|
|
112
|
+
|
|
113
|
+
When updating an existing document, send the latest `baseRevisionId` or the API will reject concurrent overwrites.
|
|
114
|
+
|
|
115
|
+
### Status and ownership mutations
|
|
116
|
+
|
|
117
|
+
- `PATCH /api/issues/:issueId`
|
|
118
|
+
- `POST /api/issues/:issueId/release`
|
|
119
|
+
- `POST /api/issues/:issueId/approvals`
|
|
120
|
+
|
|
121
|
+
`PATCH` accepts `comment` alongside mutable issue fields such as `status`, `priority`, `assigneeAgentId`, `assigneeUserId`, `projectId`, `goalId`, and `parentId`.
|
|
122
|
+
|
|
123
|
+
### Attachments
|
|
124
|
+
|
|
125
|
+
- `POST /api/orgs/:orgId/issues/:issueId/attachments`
|
|
126
|
+
- `GET /api/issues/:issueId/attachments`
|
|
127
|
+
- `GET /api/attachments/:attachmentId/content`
|
|
128
|
+
- `DELETE /api/attachments/:attachmentId`
|
|
129
|
+
|
|
130
|
+
## Organization Surfaces
|
|
131
|
+
|
|
132
|
+
- `GET /api/orgs/:orgId/issues`
|
|
133
|
+
- `POST /api/orgs/:orgId/issues`
|
|
134
|
+
- `GET /api/orgs/:orgId/agents`
|
|
135
|
+
- `GET /api/orgs/:orgId/org`
|
|
136
|
+
- `GET /api/orgs/:orgId/dashboard`
|
|
137
|
+
- `GET /api/orgs/:orgId/projects`
|
|
138
|
+
- `POST /api/orgs/:orgId/projects`
|
|
139
|
+
- `GET /api/orgs/:orgId/goals`
|
|
140
|
+
- `POST /api/orgs/:orgId/goals`
|
|
141
|
+
- `GET /api/orgs/:orgId/activity`
|
|
142
|
+
- `GET /api/orgs/:orgId/costs/summary`
|
|
143
|
+
- `GET /api/orgs/:orgId/costs/by-agent`
|
|
144
|
+
- `GET /api/orgs/:orgId/costs/by-project`
|
|
145
|
+
|
|
146
|
+
## Approval Workflows
|
|
147
|
+
|
|
148
|
+
- `GET /api/approvals/:approvalId`
|
|
149
|
+
- `GET /api/approvals/:approvalId/issues`
|
|
150
|
+
- `GET /api/approvals/:approvalId/comments`
|
|
151
|
+
- `POST /api/approvals/:approvalId/comments`
|
|
152
|
+
- `POST /api/approvals/:approvalId/request-revision`
|
|
153
|
+
- `POST /api/approvals/:approvalId/resubmit`
|
|
154
|
+
- `POST /api/approvals/:approvalId/approve`
|
|
155
|
+
- `POST /api/approvals/:approvalId/reject`
|
|
156
|
+
|
|
157
|
+
When `RUDDER_APPROVAL_ID` is set, read the approval and its linked issues first.
|
|
158
|
+
|
|
159
|
+
## Agent Configuration and Instructions
|
|
160
|
+
|
|
161
|
+
- `GET /llms/agent-configuration.txt`
|
|
162
|
+
- `GET /llms/agent-configuration/:agentRuntimeType.txt`
|
|
163
|
+
- `GET /llms/agent-icons.txt`
|
|
164
|
+
- `GET /api/orgs/:orgId/agent-configurations`
|
|
165
|
+
- `GET /api/agents/:agentId/configuration`
|
|
166
|
+
- `GET /api/agents/:agentId/config-revisions`
|
|
167
|
+
- `GET /api/agents/:agentId/config-revisions/:revisionId`
|
|
168
|
+
- `POST /api/agents/:agentId/config-revisions/:revisionId/rollback`
|
|
169
|
+
- `PATCH /api/agents/:agentId/instructions-path`
|
|
170
|
+
|
|
171
|
+
Use `PATCH /api/agents/:agentId/instructions-path` instead of a generic agent patch when setting an `AGENTS.md`-style path.
|
|
172
|
+
|
|
173
|
+
## Organization Skills
|
|
174
|
+
|
|
175
|
+
- `GET /api/orgs/:orgId/skills`
|
|
176
|
+
- `GET /api/orgs/:orgId/skills/:skillId`
|
|
177
|
+
- `GET /api/orgs/:orgId/skills/:skillId/files?path=SKILL.md`
|
|
178
|
+
- `GET /api/orgs/:orgId/skills/:skillId/update-status`
|
|
179
|
+
- `POST /api/orgs/:orgId/skills/import`
|
|
180
|
+
- `POST /api/orgs/:orgId/skills/scan-local`
|
|
181
|
+
- `POST /api/orgs/:orgId/skills/scan-projects`
|
|
182
|
+
- `POST /api/agents/:agentId/skills/private`
|
|
183
|
+
- `GET /api/agents/:agentId/skills`
|
|
184
|
+
- `POST /api/agents/:agentId/skills/sync`
|
|
185
|
+
|
|
186
|
+
## OpenClaw Invite
|
|
187
|
+
|
|
188
|
+
`POST /api/orgs/:orgId/openclaw/invite-prompt`
|
|
189
|
+
|
|
190
|
+
Only board users with the right permission or the CEO agent of that same organization may call this route.
|
|
191
|
+
|
|
192
|
+
## Organization Portability
|
|
193
|
+
|
|
194
|
+
- `POST /api/orgs/:orgId/imports/preview`
|
|
195
|
+
- `POST /api/orgs/:orgId/imports/apply`
|
|
196
|
+
- `POST /api/orgs/:orgId/exports/preview`
|
|
197
|
+
- `POST /api/orgs/:orgId/exports`
|
|
198
|
+
|
|
199
|
+
Rules:
|
|
200
|
+
|
|
201
|
+
- safe imports reject `collisionStrategy: "replace"`
|
|
202
|
+
- use `target.mode = "existing_organization"` to merge into the current organization
|
|
203
|
+
- use `target.mode = "new_organization"` to create a new organization copy
|
|
204
|
+
- export preview defaults to `issues: false`
|
|
205
|
+
- use `selectedFiles` after preview to narrow the final export payload
|
|
206
|
+
|
|
207
|
+
Example preview import:
|
|
208
|
+
|
|
209
|
+
```json
|
|
210
|
+
POST /api/orgs/org-1/imports/preview
|
|
211
|
+
{
|
|
212
|
+
"source": { "type": "github", "url": "https://github.com/acme/agent-organization" },
|
|
213
|
+
"include": { "organization": true, "agents": true, "projects": true, "issues": true },
|
|
214
|
+
"target": { "mode": "existing_organization", "orgId": "org-1" },
|
|
215
|
+
"collisionStrategy": "rename"
|
|
216
|
+
}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Example new-organization apply:
|
|
220
|
+
|
|
221
|
+
```json
|
|
222
|
+
POST /api/orgs/org-1/imports/apply
|
|
223
|
+
{
|
|
224
|
+
"source": { "type": "github", "url": "https://github.com/acme/agent-organization" },
|
|
225
|
+
"include": { "organization": true, "agents": true, "projects": true, "issues": false },
|
|
226
|
+
"target": { "mode": "new_organization", "newOrganizationName": "Imported Acme" },
|
|
227
|
+
"collisionStrategy": "rename"
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## Worked Example: IC Heartbeat
|
|
232
|
+
|
|
233
|
+
```text
|
|
234
|
+
# 1. Identity
|
|
235
|
+
GET /api/agents/me
|
|
236
|
+
|
|
237
|
+
# 2. Load compact inbox
|
|
238
|
+
GET /api/agents/me/inbox-lite
|
|
239
|
+
|
|
240
|
+
# 3. Claim the highest-priority assigned issue
|
|
241
|
+
POST /api/issues/issue-99/checkout
|
|
242
|
+
{ "agentId": "agent-42", "expectedStatuses": ["todo"] }
|
|
243
|
+
|
|
244
|
+
# 4. Load compact execution context
|
|
245
|
+
GET /api/issues/issue-99/heartbeat-context
|
|
246
|
+
|
|
247
|
+
# 5. Read only new comments if needed
|
|
248
|
+
GET /api/issues/issue-99/comments?after=comment-12&order=asc
|
|
249
|
+
|
|
250
|
+
# 6. Report progress or completion
|
|
251
|
+
PATCH /api/issues/issue-99
|
|
252
|
+
{ "comment": "JWT signing done. Refresh flow next." }
|
|
253
|
+
```
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Rudder Agent CLI Reference
|
|
2
|
+
|
|
3
|
+
Stable CLI contract for agents using the bundled `rudder` skill. Prefer these commands over direct `/api` calls.
|
|
4
|
+
|
|
5
|
+
## Defaults
|
|
6
|
+
|
|
7
|
+
- All commands support `--json`.
|
|
8
|
+
- `--org-id` defaults to `RUDDER_ORG_ID` when relevant.
|
|
9
|
+
- `--run-id` defaults to `RUDDER_RUN_ID` and is attached to mutating requests when available.
|
|
10
|
+
- `issue checkout` defaults `--agent-id` from `RUDDER_AGENT_ID`.
|
|
11
|
+
|
|
12
|
+
## Agent V1 Commands
|
|
13
|
+
|
|
14
|
+
| Command | Description | Mutating | Org | Agent | Run ID |
|
|
15
|
+
| --- | --- | --- | --- | --- | --- |
|
|
16
|
+
| `rudder agent me` | Show the authenticated agent identity, budget, and chain of command. | no | no | no | no |
|
|
17
|
+
| `rudder agent inbox` | List the compact assigned-work inbox for the authenticated agent. | no | no | no | no |
|
|
18
|
+
| `rudder agent capabilities` | List the stable Rudder agent command contract. | no | no | no | no |
|
|
19
|
+
| `rudder agent skills sync <agent-id>` | Sync the desired enabled skill set for an agent. | yes | no | no | attached when available |
|
|
20
|
+
| `rudder issue get <issue>` | Read a full issue by UUID or identifier. | no | no | no | no |
|
|
21
|
+
| `rudder issue context <issue>` | Read the compact heartbeat context for an issue. | no | no | no | no |
|
|
22
|
+
| `rudder issue checkout <issue>` | Atomically checkout an issue for the current or specified agent. | yes | no | required | attached when available |
|
|
23
|
+
| `rudder issue comment <issue> --body <text>` | Add a comment to an issue. | yes | no | no | attached when available |
|
|
24
|
+
| `rudder issue comments list <issue>` | List issue comments, optionally only newer comments after a cursor. | no | no | no | no |
|
|
25
|
+
| `rudder issue comments get <issue> <comment-id>` | Read one issue comment by id. | no | no | no | no |
|
|
26
|
+
| `rudder issue update <issue> ...` | Apply generic issue updates when workflow commands are not enough. | yes | no | no | attached when available |
|
|
27
|
+
| `rudder issue done <issue> --comment <text>` | Mark an issue done with a required completion comment. | yes | no | no | attached when available |
|
|
28
|
+
| `rudder issue block <issue> --comment <text>` | Mark an issue blocked with a required blocker comment. | yes | no | no | attached when available |
|
|
29
|
+
| `rudder issue release <issue>` | Release an issue back to todo and clear ownership. | yes | no | no | attached when available |
|
|
30
|
+
| `rudder issue documents list <issue>` | List issue documents. | no | no | no | no |
|
|
31
|
+
| `rudder issue documents get <issue> <key>` | Read one issue document by key. | no | no | no | no |
|
|
32
|
+
| `rudder issue documents put <issue> <key> --body <text>` | Create or update an issue document. | yes | no | no | attached when available |
|
|
33
|
+
| `rudder issue documents revisions <issue> <key>` | List revisions for an issue document. | no | no | no | no |
|
|
34
|
+
| `rudder approval get <approval-id>` | Read one approval request. | no | no | no | no |
|
|
35
|
+
| `rudder approval issues <approval-id>` | List the issues linked to an approval. | no | no | no | no |
|
|
36
|
+
| `rudder approval comment <approval-id> --body <text>` | Add a comment to an approval. | yes | no | no | attached when available |
|
|
37
|
+
| `rudder skill list --org-id <id>` | List organization-visible skills. | no | required | no | no |
|
|
38
|
+
| `rudder skill get <skill-id> --org-id <id>` | Read one organization skill detail. | no | required | no | no |
|
|
39
|
+
| `rudder skill file <skill-id> --org-id <id> [--path SKILL.md]` | Read one file from an organization skill package. | no | required | no | no |
|
|
40
|
+
| `rudder skill import --org-id <id> --source <source>` | Import a skill package into the organization skill library. | yes | required | no | attached when available |
|
|
41
|
+
| `rudder skill scan-local --org-id <id> [--roots <csv>]` | Scan local roots for skill packages and import new ones. | yes | required | no | attached when available |
|
|
42
|
+
| `rudder skill scan-projects --org-id <id> [--project-ids <csv>] [--workspace-ids <csv>]` | Scan the org workspace and any legacy project workspace records for skill packages and import new ones. | yes | required | no | attached when available |
|
|
43
|
+
|
|
44
|
+
## Issue Close-Out Signals
|
|
45
|
+
|
|
46
|
+
Before a successful `todo` or `in_progress` issue run exits, leave one close-out signal with the command that matches the outcome:
|
|
47
|
+
|
|
48
|
+
- progress remains: `rudder issue comment <issue> --body <text>`
|
|
49
|
+
- work is complete: `rudder issue done <issue> --comment <text>`
|
|
50
|
+
- work is blocked: `rudder issue block <issue> --comment <text>`
|
|
51
|
+
- ownership changes: add an explicit handoff comment before or with the assignee update
|
|
52
|
+
|
|
53
|
+
If `RUDDER_WAKE_REASON=issue_passive_followup`, the run is close-out governance for the same issue. Inspect current issue state first, then leave a progress comment, completion, blocker, or explicit handoff.
|
|
54
|
+
|
|
55
|
+
## Compatibility Commands
|
|
56
|
+
|
|
57
|
+
- `rudder agent list --org-id <id>` — List agents for an organization.
|
|
58
|
+
- `rudder agent get <agent-id-or-shortname>` — Read one agent by id or shortname.
|
|
59
|
+
- `rudder agent hire --org-id <id> --payload <json>` — Create a new hire using the canonical hire workflow.
|
|
60
|
+
- `rudder agent config index` — Read the installed agent runtime configuration index.
|
|
61
|
+
- `rudder agent config doc <agent-runtime-type>` — Read adapter-specific configuration guidance for one runtime.
|
|
62
|
+
- `rudder agent config list --org-id <id>` — List redacted agent configuration snapshots for an organization.
|
|
63
|
+
- `rudder agent config get <agent-id-or-shortname>` — Read one redacted agent configuration snapshot by id or shortname.
|
|
64
|
+
- `rudder agent icons` — List allowed agent icon names for create and hire payloads.
|
|
65
|
+
- `rudder issue create --org-id <id> ...` — Create a new issue or subtask with the generic issue surface.
|
|
66
|
+
- `rudder approval create --org-id <id> --type <type> --payload <json>` — Create a new approval request.
|
|
67
|
+
- `rudder approval resubmit <approval-id> [--payload <json>]` — Resubmit a revision-requested approval, optionally with updated payload.
|