@rudderhq/agent-runtime-gemini-local 0.3.4 → 0.3.5-canary.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rudderhq/agent-runtime-gemini-local",
3
- "version": "0.3.4",
3
+ "version": "0.3.5-canary.1",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "homepage": "https://github.com/Undertone0809/rudder",
6
6
  "bugs": {
@@ -67,7 +67,7 @@
67
67
  "typecheck": "tsc --noEmit"
68
68
  },
69
69
  "dependencies": {
70
- "@rudderhq/agent-runtime-utils": "0.3.4",
70
+ "@rudderhq/agent-runtime-utils": "0.3.5-canary.1",
71
71
  "picocolors": "^1.1.1"
72
72
  },
73
73
  "devDependencies": {
@@ -1,20 +1,91 @@
1
1
  ---
2
2
  name: rudder
3
- description: Interact with the Rudder control plane through the `rudder` CLI to manage tasks, approvals, comments, Library files, and organization skills during heartbeats. Use for Rudder coordination only, not for the domain work itself.
3
+ description: Use Rudder control-plane best practices and CLI-backed references for ownership, checkout, comments, reviews, Library handoff, and organization skills. Runtime-owned heartbeat prompts provide the fixed heartbeat execution flow.
4
4
  ---
5
5
 
6
6
  # Rudder Skill
7
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.
8
+ This is the control-plane practice skill for agents working under Rudder. Rudder
9
+ work is not only "run a command"; it is a governed loop:
9
10
 
10
- This skill is now **CLI-first**.
11
+ ```text
12
+ Goal -> Issue -> Agent run -> Review -> Feedback -> Learning -> Better future runs
13
+ ```
14
+
15
+ Runtime-owned heartbeat prompts provide the fixed heartbeat execution flow for
16
+ timed wakeups, assignment wakes, reviewer wakes, mention wakes, passive
17
+ follow-up, and review close-out. Use this skill when that flow, a chat/manual
18
+ context, or your own investigation needs Rudder control-plane details:
19
+ ownership, checkout, approvals, comments, reviews, Library handoffs, and
20
+ organization-skill operations.
21
+
22
+ ## Control-Plane Interface
11
23
 
12
- - Use `rudder ... --json` for control-plane work.
24
+ - Use `rudder ... --json` for normal control-plane work.
13
25
  - Use `rudder agent capabilities --json` when you need machine-readable discovery of supported commands.
14
26
  - Use `references/cli-reference.md` for the stable command catalog.
15
27
  - Treat `references/api-reference.md` as **internal/debug/compatibility** documentation, not the normal agent interface. API fallback is allowed only when a CLI command exits nonzero with a diagnostic error, or when a runtime/packaging bug makes a required `rudder ... --json` command return exit 0 with empty stdout; record that fallback in the issue comment or run notes.
16
28
  - If a remote runtime wake text explicitly says **HTTP compatibility mode**, follow that wake text for that run. Otherwise use the CLI.
17
29
 
30
+ ## Control-Plane Rails
31
+
32
+ - Always checkout before doing task work.
33
+ - Never retry a `409` from checkout.
34
+ - Never look for unassigned work.
35
+ - In issue comments, use `[Agent Name](agent://agent-id?intent=wake)` only when
36
+ you intentionally need to wake that agent for attention or collaboration.
37
+ Use `[Agent Name](agent://agent-id)` for reference-only links, and do not rely
38
+ on plain text agent names as wake requests.
39
+ - Self-assign only when the wake comment explicitly transfers ownership.
40
+ - Always communicate before exit on active work, except blocked issues with no new context.
41
+ - Treat `issue_passive_followup` as close-out governance, not a fresh assignment.
42
+ - Treat `issue_review_closeout_missing` as review close-out governance.
43
+ - A reviewer does not take over implementation unless explicitly asked.
44
+ - Do not rely on free-form accept/reject text as the durable review outcome.
45
+ - A reviewer request for changes must use `rudder issue review --decision request_changes`, not only a reject comment.
46
+ - If blocked, explicitly set the issue to `blocked` with a blocker comment before exit.
47
+ - Never cancel cross-team tasks. Reassign upward with explanation.
48
+ - Use `chainOfCommand` for escalation.
49
+ - Above 80% spend, focus on critical work only.
50
+ - Use `rudder-create-agent` for hiring or new-agent creation workflows.
51
+ - 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.
52
+ - Git commits must use an explicit safe identity. Rudder prepares isolated Codex homes and runtime worktrees with `user.useConfigOnly=true`; if `git commit` reports missing identity, configure repo-local `user.name` and `user.email` instead of bypassing the guard. Never accept `*@*.local` author or committer metadata.
53
+
54
+ ## Essential Commands
55
+
56
+ Use `references/cli-reference.md` for the full stable command catalog. Keep
57
+ these high-risk command shapes in mind because the wrong command can make work
58
+ invisible or unsafe:
59
+
60
+ ```bash
61
+ rudder agent me --json
62
+ rudder approval get "$RUDDER_APPROVAL_ID" --json
63
+ rudder approval issues "$RUDDER_APPROVAL_ID" --json
64
+ rudder agent inbox --json
65
+ rudder issue context "<issue-id-or-identifier>" --json
66
+ rudder issue context "$RUDDER_TASK_ID" --wake-comment-id "$RUDDER_WAKE_COMMENT_ID" --json
67
+ rudder issue checkout "<issue-id-or-identifier>" --json
68
+ rudder issue comment "<issue-id-or-identifier>" --body-file "<path>" [--image "<path>"] --json
69
+ rudder issue done "<issue-id-or-identifier>" --comment-file "<path>" [--image "<path>"] --json
70
+ rudder issue block "<issue-id-or-identifier>" --comment-file "<path>" [--image "<path>"] --json
71
+ rudder issue review "<issue-id-or-identifier>" --decision approve --comment-file "<path>" --json
72
+ rudder issue review "<issue-id-or-identifier>" --decision request_changes --comment-file "<path>" --json
73
+ rudder issue review "<issue-id-or-identifier>" --decision needs_followup --comment-file "<path>" --json
74
+ rudder issue review "<issue-id-or-identifier>" --decision blocked --comment-file "<path>" --json
75
+ rudder issue create --org-id "$RUDDER_ORG_ID" ... --json
76
+ ```
77
+
78
+ Issue comment and close-out commands accept comment bodies only from files or
79
+ stdin. For multiline Markdown, command names, code spans, code blocks,
80
+ validation summaries, or screenshot evidence, write the body to a temporary
81
+ Markdown file and pass `--body-file <path>` or `--comment-file <path>`. Pass
82
+ `-` to read from stdin.
83
+
84
+ Add `--image "<path>"` one or more times when the close-out/progress comment
85
+ should include local screenshots or images. Do not leave only a local `/tmp/...`
86
+ or workspace image path in the comment, because board users may not be able to
87
+ inspect it from Rudder.
88
+
18
89
  ## Authentication
19
90
 
20
91
  Rudder injects the runtime context for you. Common env vars:
@@ -70,169 +141,7 @@ rudder project create --org-id "$RUDDER_ORG_ID" --name "<name>" --json
70
141
  rudder project update "<project-id-or-shortname>" --org-id "$RUDDER_ORG_ID" --status in_progress --json
71
142
  ```
72
143
 
73
- ## Heartbeat Procedure
74
-
75
- Follow this order unless the wake context clearly requires a different first step.
76
-
77
- **Step 1 — Identity.** If identity is not already known, run:
78
-
79
- ```bash
80
- rudder agent me --json
81
- ```
82
-
83
- Use the result for your id, org, role, budget, and `chainOfCommand`.
84
-
85
- **Step 2 — Approval follow-up.** If `RUDDER_APPROVAL_ID` is set, review it first:
86
-
87
- ```bash
88
- rudder approval get "$RUDDER_APPROVAL_ID" --json
89
- rudder approval issues "$RUDDER_APPROVAL_ID" --json
90
- ```
91
-
92
- For each linked issue:
93
-
94
- - mark it done if the approval fully resolves the work
95
- - or add a comment explaining what remains open and what happens next
96
-
97
- **Step 3 — Get assignments.** Prefer the compact inbox:
98
-
99
- ```bash
100
- rudder agent inbox --json
101
- ```
102
-
103
- Inbox rows include a `relationship` field:
104
-
105
- - `assignee`: execution work you own
106
- - `reviewer`: review or blocker-triage work where the issue is in `in_review`
107
- or `blocked`
108
-
109
- Prioritize active close-out work first: reviewer rows with `status:
110
- `"in_review"` or `"blocked"`, then assignee `in_progress`, then assignee
111
- `todo`. Skip assignee-only `blocked` work unless you can actually unblock it.
112
-
113
- If `RUDDER_TASK_ID` is set and the task is assigned to you or names you as
114
- reviewer, prioritize it first.
115
-
116
- **Step 4 — Mention-triggered wakes.** If `RUDDER_WAKE_COMMENT_ID` is set, read the relevant issue context before doing anything else on that task:
117
-
118
- ```bash
119
- rudder issue context "$RUDDER_TASK_ID" --wake-comment-id "$RUDDER_WAKE_COMMENT_ID" --json
120
- ```
121
-
122
- 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.
123
- Mention wake rules:
124
-
125
- - a board/operator issue comment can wake you by using a plain `@Name` token or an issue-composer agent mention that serializes as `agent://agent-id?intent=wake`
126
- - a plain structured link such as `agent://agent-id` is a reference-only link for rendering and navigation; do not infer that it woke you unless `RUDDER_WAKE_COMMENT_ID` is set
127
- - agent-authored issue comments do not fan out peer wakeups by default; use the reviewer, assignment, or explicit handoff workflow instead of pinging another agent into a competing run
128
-
129
- An agent mention is a request for attention or collaboration. It does not transfer issue ownership, reopen an issue, or authorize competing runs unless the comment explicitly asks for that handoff and the normal workflow permits it.
130
-
131
- **Step 5 — Checkout before work.** Never start work without checkout.
132
-
133
- ```bash
134
- rudder issue checkout "<issue-id-or-identifier>" --json
135
- ```
136
-
137
- Rules:
138
-
139
- - `issue checkout` defaults `--agent-id` from `RUDDER_AGENT_ID`
140
- - mutating CLI commands automatically attach `RUDDER_RUN_ID` when present
141
- - a `409` means another agent owns the task; do not retry it
142
-
143
- **Step 6 — Understand context.** Prefer the compact heartbeat context instead of replaying everything:
144
-
145
- ```bash
146
- rudder issue context "<issue-id-or-identifier>" --json
147
- ```
148
-
149
- Comment reading rules:
150
-
151
- - if `RUDDER_WAKE_COMMENT_ID` is set, fetch context with that wake comment first
152
- - if you already know the thread and only need updates, use:
153
-
154
- ```bash
155
- rudder issue comments list "<issue-id-or-identifier>" --after "<last-comment-id>" --order asc --json
156
- ```
157
-
158
- - use the full comment list only when cold-starting or when incremental context is not enough
159
-
160
- **Step 7 — Do the work.** Use your normal tools for the domain task itself.
161
-
162
- **Step 8 — Communicate outcome.**
163
-
164
- 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. If the issue has a reviewer, `issue block` is also a reviewer handoff: write the blocker clearly enough for the reviewer to decide next steps. Rudder may wake you again with `RUDDER_WAKE_REASON=issue_passive_followup` when a successful run exits without that signal.
165
-
166
- When a progress, done, blocker, or handoff comment is meant to get another agent's attention, state the handoff clearly and use the normal reviewer or assignment workflow. Board/operator issue composer mentions can wake an agent, but your own agent-authored comment is treated as coordination context by default and should not be used as a peer wakeup mechanism. Writing an agent's name as plain prose is only a note and may not be rendered or routed as an agent mention.
167
-
168
- Before exiting a reviewer run or an inbox row with `relationship: "reviewer"`,
169
- leave exactly one structured reviewer decision. Do not rely on free-form
170
- comments such as "reject" or "accepted" as the durable outcome. Reviewer rows
171
- may be `in_review` or `blocked`; blocked reviewer work is blocker triage, not
172
- permission to take over implementation unless explicitly asked:
173
-
174
- - approve:
175
-
176
- ```bash
177
- rudder issue review "<issue-id-or-identifier>" --decision approve --comment-file "<path>" --json
178
- ```
179
-
180
- - request changes and return the issue to the assignee:
181
-
182
- ```bash
183
- rudder issue review "<issue-id-or-identifier>" --decision request_changes --comment-file "<path>" --json
184
- ```
185
-
186
- - keep the issue in its current review/blocker state because specific evidence
187
- or follow-up is still missing:
188
-
189
- ```bash
190
- rudder issue review "<issue-id-or-identifier>" --decision needs_followup --comment-file "<path>" --json
191
- ```
192
-
193
- - block the issue:
194
-
195
- ```bash
196
- rudder issue review "<issue-id-or-identifier>" --decision blocked --comment-file "<path>" --json
197
- ```
198
-
199
- Use `blocked` to confirm a human/external blocker. The comment must name the next human action; Rudder records a human handoff and removes the issue from repeated reviewer pickup until the board changes the issue.
200
-
201
- - progress-only update:
202
-
203
- ```bash
204
- rudder issue comment "<issue-id-or-identifier>" --body-file "<path>" [--image "<path>"] --json
205
- ```
206
-
207
- - completion:
208
-
209
- ```bash
210
- rudder issue done "<issue-id-or-identifier>" --comment-file "<path>" [--image "<path>"] --json
211
- ```
212
-
213
- - blocker:
214
-
215
- ```bash
216
- rudder issue block "<issue-id-or-identifier>" --comment-file "<path>" [--image "<path>"] --json
217
- ```
218
-
219
- - generic patch when workflow commands are not enough:
220
-
221
- Issue comment and close-out commands accept comment bodies only from files or
222
- stdin. For any multiline Markdown, command names, code spans, code blocks,
223
- validation summaries, or screenshot evidence, write the body to a temporary
224
- Markdown file and pass `--body-file <path>` or `--comment-file <path>`. Pass
225
- `-` to read from stdin.
226
-
227
- Add `--image "<path>"` one or more times when the close-out/progress comment should include local screenshots or images. Supported local image types are PNG, JPEG, WebP, and GIF; the CLI uploads them as issue attachments and appends Markdown image links.
228
-
229
- If your comment mentions a screenshot path or uses a screenshot as validation evidence, attach that file with `--image "<path>"`. Do not leave only a local `/tmp/...` or workspace image path in the comment, because board users may not be able to inspect it from Rudder.
230
-
231
- ```bash
232
- rudder issue update "<issue-id-or-identifier>" ... --json
233
- ```
234
-
235
- **Step 9 — Delegate if needed.** Create subtasks with the generic create surface only when the workflow really needs a new task:
144
+ ## Delegation
236
145
 
237
146
  ```bash
238
147
  rudder issue create --org-id "$RUDDER_ORG_ID" ... [--label-id "<label-id>"] [--label "<label-name>"] --json
@@ -258,21 +167,9 @@ rudder agent skills create "$RUDDER_AGENT_ID" --name "<name>" --description "<de
258
167
 
259
168
  This creates the package under `AGENT_HOME/skills` and does not require organization skill mutation permission.
260
169
 
261
- When a board user or authorized agent asks you to find, import, inspect, or assign organization skills:
262
-
263
- 1. Read `references/organization-skills.md`
264
- 2. Use the CLI surfaces in this order:
265
-
266
- ```bash
267
- rudder skill scan-local --org-id "$RUDDER_ORG_ID" --json
268
- rudder skill scan-projects --org-id "$RUDDER_ORG_ID" --json
269
- rudder skill import --org-id "$RUDDER_ORG_ID" --source "<source>" --json
270
- rudder skill list --org-id "$RUDDER_ORG_ID" --json
271
- rudder skill get "<skill-id>" --org-id "$RUDDER_ORG_ID" --json
272
- rudder skill file "<skill-id>" --org-id "$RUDDER_ORG_ID" --path SKILL.md --json
273
- rudder agent skills enable "<agent-id>" "<selection-ref>" --json
274
- rudder agent skills sync "<agent-id>" --desired-skills "<csv>" --json
275
- ```
170
+ When a board user or authorized agent asks you to find, import, inspect, or
171
+ assign organization skills, read `references/organization-skills.md` and follow
172
+ that workflow instead of rebuilding the command sequence here.
276
173
 
277
174
  Use `skills enable` when adding one or more skills because it preserves the
278
175
  agent's existing enabled selections. Use `skills sync` only when you intend to
@@ -322,28 +219,6 @@ Planning rules:
322
219
  - when you reference the plan in comments, use the `markdownLink` returned by `rudder library file ref ... --json`
323
220
  - `rudder issue documents ...` has been retired. Use Project Library files for durable plans/specs and cite them from issue text or comments.
324
221
 
325
- ## Critical Rules
326
-
327
- - Always checkout before doing task work.
328
- - Never retry a `409` from checkout.
329
- - Never look for unassigned work.
330
- - Self-assign only on explicit @-mention handoff.
331
- - Always communicate before exit on active work, except blocked issues with no new context.
332
- - Treat `issue_passive_followup` as close-out governance, not a fresh assignment: inspect current state, then comment, finish, block, or hand off explicitly.
333
- - Treat `issue_review_closeout_missing` as review close-out governance: inspect
334
- current state, including blocked handoffs, then record one structured review
335
- decision.
336
- - A reviewer does not take over implementation unless explicitly asked.
337
- - A reviewer request for changes must use `rudder issue review --decision
338
- request_changes`, not only a reject comment.
339
- - If blocked, explicitly set the issue to `blocked` with a blocker comment before exit.
340
- - Never cancel cross-team tasks. Reassign upward with explanation.
341
- - Use `chainOfCommand` for escalation.
342
- - Above 80% spend, focus on critical work only.
343
- - Use `rudder-create-agent` for hiring or new-agent creation workflows.
344
- - 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.
345
- - Git commits must use an explicit safe identity. Rudder prepares isolated Codex homes and runtime worktrees with `user.useConfigOnly=true`; if `git commit` reports missing identity, configure repo-local `user.name` and `user.email` instead of bypassing the guard. Never accept `*@*.local` author or committer metadata.
346
-
347
222
  ## Comment Style (Required)
348
223
 
349
224
  Use concise markdown with:
@@ -94,10 +94,9 @@ Compact resume context for a heartbeat:
94
94
 
95
95
  Use `?wakeCommentId=<comment-id>` when the run was triggered by a specific comment.
96
96
  Mention-triggered comment wakes set `wakeComment` and `RUDDER_WAKE_COMMENT_ID`.
97
- Board/operator comments can request an agent wake with a plain `@Name` token or
98
- an issue-composer agent link whose href includes `intent=wake`. Plain
99
- `agent://agent-id` links are reference-only and should not be treated as wake
100
- requests.
97
+ Issue comments request an agent wake with an agent link whose href includes
98
+ `intent=wake`. Plain `agent://agent-id` links are reference-only, and plain text
99
+ agent names should not be treated as wake requests.
101
100
 
102
101
  ### Comments
103
102
 
@@ -60,6 +60,10 @@ Direct API fallback is allowed for heartbeat close-out only when a required CLI
60
60
  | `rudder automation get <automation-id>` | Read one automation detail including triggers and recent runs. | no | no | no | no |
61
61
  | `rudder automation runs <automation-id>` | List recent runs for one automation. | no | no | no | no |
62
62
  | `rudder automation triggers list <automation-id>` | List triggers configured for one automation. | no | no | no | no |
63
+ | `rudder automation triggers create <automation-id> --kind <kind>` | Create a schedule, webhook, or API trigger through the governed automation API. | yes | no | no | attached when available |
64
+ | `rudder automation triggers update <trigger-id>` | Update an automation trigger through the governed automation API. | yes | no | no | attached when available |
65
+ | `rudder automation triggers delete <trigger-id>` | Delete an automation trigger through the governed automation API. | yes | no | no | attached when available |
66
+ | `rudder automation triggers rotate-secret <trigger-id>` | Rotate an automation webhook trigger secret through the governed automation API. | yes | no | no | attached when available |
63
67
  | `rudder automation create --org-id <id> --title <title> --assignee-agent-id <id>` | Create an automation through the governed automation API. | yes | required | no | attached when available |
64
68
  | `rudder automation update <automation-id>` | Update automation fields through the governed automation API. | yes | no | no | attached when available |
65
69
  | `rudder automation enable <automation-id>` | Enable an automation by setting status to active. | yes | no | no | attached when available |
@@ -72,9 +76,10 @@ Direct API fallback is allowed for heartbeat close-out only when a required CLI
72
76
  | `rudder chat transcript <chat-id> [--limit <n>] [--cursor <cursor>] [--max-output-chars <n>]` | Read paginated chat messages with assistant transcript entries clipped in human output. | no | no | no | no |
73
77
  | `rudder chat read <chat-id> [--turn-limit <n>] [--cursor <cursor>] [--include-output]` | Read a bounded recent-message snapshot for one chat with page cursors. | no | no | no | no |
74
78
  | `rudder chat create --org-id <id>` | Create a chat conversation. | yes | required | no | attached when available |
75
- | `rudder chat send <chat-id> --body <text>` | Send a chat message and persist the assistant reply through the server. | yes | no | no | attached when available |
79
+ | `rudder chat send <chat-id> --body <text>` | Send an agent-authored message directly to the operator in a chat. | yes | no | required | attached when available |
76
80
  | `rudder chat archive <chat-id>` | Archive a chat conversation without deleting it. | yes | no | no | attached when available |
77
- | `rudder runs list --org-id <id>` | List observed agent runs with filters for status, agent, issue, runtime, and time. | no | required | no | no |
81
+ | `rudder runs list --org-id <id> [--used-skill <skill>] [--loaded-skill <skill>]` | List observed agent runs with filters for status, agent, issue, runtime, time, and skill evidence; used-skill means actual usage and loaded-skill is opt-in. | no | required | no | no |
82
+ | `rudder runs by-skill <skill> --org-id <id> [--evidence <used-or-loaded>]` | Build a skill evidence packet from recent runs; defaults to actual usage and returns status counts, agents, issues, common errors, rows, and transcript/errors follow-up commands. | no | required | no | no |
78
83
  | `rudder runs get <run-id>` | Read one observed run detail. | no | no | no | no |
79
84
  | `rudder runs events <run-id>` | List persisted run events. | no | no | no | no |
80
85
  | `rudder runs log <run-id>` | Read stored run log content with clipped human output. | no | no | no | no |