@rudderhq/agent-runtime-codex-local 0.3.5-canary.9 → 0.3.5

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 (45) hide show
  1. package/dist/index.d.ts +2 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +14 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/server/codex-home.d.ts +1 -1
  6. package/dist/server/codex-home.d.ts.map +1 -1
  7. package/dist/server/codex-home.js +19 -2
  8. package/dist/server/codex-home.js.map +1 -1
  9. package/dist/server/codex-home.test.d.ts +2 -0
  10. package/dist/server/codex-home.test.d.ts.map +1 -0
  11. package/dist/server/codex-home.test.js +52 -0
  12. package/dist/server/codex-home.test.js.map +1 -0
  13. package/dist/server/cost.d.ts +9 -0
  14. package/dist/server/cost.d.ts.map +1 -0
  15. package/dist/server/cost.js +73 -0
  16. package/dist/server/cost.js.map +1 -0
  17. package/dist/server/cost.test.d.ts +2 -0
  18. package/dist/server/cost.test.d.ts.map +1 -0
  19. package/dist/server/cost.test.js +56 -0
  20. package/dist/server/cost.test.js.map +1 -0
  21. package/dist/server/execute.d.ts.map +1 -1
  22. package/dist/server/execute.js +15 -4
  23. package/dist/server/execute.js.map +1 -1
  24. package/dist/server/index.d.ts +2 -1
  25. package/dist/server/index.d.ts.map +1 -1
  26. package/dist/server/index.js +1 -0
  27. package/dist/server/index.js.map +1 -1
  28. package/dist/server/test.d.ts.map +1 -1
  29. package/dist/server/test.js +9 -1
  30. package/dist/server/test.js.map +1 -1
  31. package/dist/server/test.test.d.ts +2 -0
  32. package/dist/server/test.test.d.ts.map +1 -0
  33. package/dist/server/test.test.js +105 -0
  34. package/dist/server/test.test.js.map +1 -0
  35. package/dist/ui/build-config.d.ts.map +1 -1
  36. package/dist/ui/build-config.js +7 -1
  37. package/dist/ui/build-config.js.map +1 -1
  38. package/package.json +2 -2
  39. package/skills/para-memory-files/SKILL.md +80 -4
  40. package/skills/para-memory-files/evals/conversation-capture.md +128 -0
  41. package/skills/para-memory-files/references/schemas.md +31 -0
  42. package/skills/rudder/SKILL.md +29 -6
  43. package/skills/rudder/references/api-reference.md +8 -2
  44. package/skills/rudder/references/cli-reference.md +8 -3
  45. package/skills/rudder/references/organization-skills.md +2 -1
@@ -0,0 +1,128 @@
1
+ # Conversation and Agent Work Capture Evals
2
+
3
+ Use these lightweight cases when changing the `para-memory-files` skill's
4
+ Rudder chat and agent work capture behavior. They are written for human or
5
+ agent review, not a dedicated automated harness.
6
+
7
+ ### Case: User Corrects Memory Behavior
8
+
9
+ Input:
10
+
11
+ A user says: "No, do not just leave this in your personal MEMORY.md. This
12
+ should become an org skill rule so other agents stop missing chat context."
13
+
14
+ Expected behavior:
15
+
16
+ - Write a concise daily-note chat capture with context, user intent,
17
+ conclusion/action, reusable lesson, and follow-up/risk.
18
+ - Route the stable behavior change toward the relevant skill package or skill
19
+ patch proposal.
20
+ - Update personal MEMORY.md only if there is also a personal operating
21
+ preference for this agent.
22
+
23
+ Must not:
24
+
25
+ - Copy the full transcript into memory.
26
+ - Treat the correction as only a personal preference.
27
+ - Hide the organization-wide fix in one agent's private memory.
28
+
29
+ ### Case: Issue Close-Out Without New Signal
30
+
31
+ Input:
32
+
33
+ An issue comment says: "Done, tests passed, commit abc123." It repeats the
34
+ same evidence already present in the issue and contains no new preference,
35
+ decision, correction, or reusable lesson.
36
+
37
+ Expected behavior:
38
+
39
+ - No daily-note capture is required.
40
+ - If the agent needs an audit trail, rely on the issue itself as the source of
41
+ truth.
42
+
43
+ Must not:
44
+
45
+ - Record low-signal close-out chatter just because it happened in chat.
46
+ - Promote repeated issue status into personal memory.
47
+
48
+ ### Case: Automation Work Produces Reusable Lesson
49
+
50
+ Input:
51
+
52
+ During a scheduled CI patrol automation, the agent discovers that a recurring
53
+ workflow failure should be repaired directly when credentials and local
54
+ reproduction are available, and only escalated when the platform is down or a
55
+ non-substitutable secret is missing.
56
+
57
+ Expected behavior:
58
+
59
+ - Write a concise daily-note memory capture that names the automation context,
60
+ durable escalation rule, action taken, reusable lesson, and follow-up risk.
61
+ - Promote the shared operating rule to the relevant project know-how, skill, or
62
+ agent instruction when it affects future agents or recurring automations.
63
+ - Keep raw logs, credentials, and noisy command output out of memory.
64
+
65
+ Must not:
66
+
67
+ - Ignore the event because it came from automation instead of chat.
68
+ - Store the complete automation transcript or secrets in a personal memory file.
69
+ - Hide an organization-wide automation rule only in one agent's private memory.
70
+
71
+ ### Case: Low-Signal Chat
72
+
73
+ Input:
74
+
75
+ A chat contains greetings, thanks, and "I'll check later" with no task
76
+ definition or durable preference.
77
+
78
+ Expected behavior:
79
+
80
+ - Do not write a memory entry.
81
+ - Continue the conversation normally.
82
+
83
+ Must not:
84
+
85
+ - Create a daily note from politeness or temporary scheduling chatter.
86
+
87
+ ### Case: Project-Level Decision
88
+
89
+ Input:
90
+
91
+ A user explains that future Rudder proposals for non-trivial architecture work
92
+ must live in the project Library first, receive two critique rounds, and only
93
+ then be implemented.
94
+
95
+ Expected behavior:
96
+
97
+ - Capture the chat signal in the daily note.
98
+ - Promote the project-level policy to shared project knowledge under the
99
+ project Library or organization workspace.
100
+ - If it changes agent behavior generally, propose or update the relevant skill.
101
+
102
+ Must not:
103
+
104
+ - Store the policy only in `$AGENT_HOME/instructions/MEMORY.md`.
105
+ - Skip the shared knowledge artifact when the rule affects multiple agents.
106
+
107
+ ### Case: Attachment Changes Task Interpretation
108
+
109
+ Input:
110
+
111
+ A user attaches a screenshot and says the real problem is not the visible
112
+ button style but the workflow confusion shown by the screenshot.
113
+
114
+ Expected behavior:
115
+
116
+ - Capture the daily-note context, including the conversation or issue reference
117
+ and a short description of how the attachment changed the task.
118
+ - Route any reusable product or execution lesson to shared project knowledge
119
+ when it affects future project work.
120
+ - Keep the attachment details summarized and avoid sensitive visual content
121
+ that is not needed for future behavior.
122
+
123
+ Must not:
124
+
125
+ - Preserve the entire image transcript or private visual details in personal
126
+ memory.
127
+ - Ignore the attachment-driven reinterpretation when forming future task
128
+ context.
@@ -17,6 +17,37 @@
17
17
  access_count: 0
18
18
  ```
19
19
 
20
+ ## Daily Note Conversation and Agent Work Capture Entry
21
+
22
+ Daily notes are lightweight chronological logs. Use this structure when a
23
+ Rudder chat, issue run, automation, review, close-out, or other agent execution
24
+ event contains durable signal worth retaining.
25
+
26
+ ```md
27
+ ## HH:MM - Memory capture
28
+
29
+ - Context: conversation, issue, automation, run, or evidence reference; project;
30
+ and why this mattered.
31
+ - User intent: durable correction, preference, constraint, decision, or task
32
+ interpretation.
33
+ - Conclusion/action: what changed, what was done, or where it was routed.
34
+ - Reusable lesson: future behavior, command, validation signal, or routing rule.
35
+ - Follow-up/risk: unresolved uncertainty, owner, promotion target, or none.
36
+ ```
37
+
38
+ Keep entries summarized and redacted:
39
+
40
+ - Do not copy full private transcripts.
41
+ - Do not copy raw automation logs, command output, or routine close-out text
42
+ when they add no durable signal beyond the source artifact.
43
+ - Do not store secrets, tokens, credentials, private keys, session cookies, or
44
+ auth headers.
45
+ - Do not turn one-off sensitive context into durable memory unless the future
46
+ behavioral lesson can be safely stated without the sensitive detail.
47
+ - If the information belongs in shared project knowledge, note the routing
48
+ decision in the daily note and promote it to the project Library or
49
+ organization workspace.
50
+
20
51
  ## Memory Decay
21
52
 
22
53
  Facts decay in retrieval priority over time so stale info does not crowd out recent context.
@@ -21,7 +21,7 @@ organization-skill operations.
21
21
 
22
22
  ## Control-Plane Interface
23
23
 
24
- - Use `rudder ... --json` for normal control-plane work.
24
+ - Use `rudder ... --json` for normal control-plane work. CLI output renders IDs as short IDs by default; `rudder runs ...` commands accept short run IDs. Add `--full-ids` only for debugging or compatibility checks that need raw UUIDs.
25
25
  - Use `rudder agent capabilities --json` when you need machine-readable discovery of supported commands.
26
26
  - Use `references/cli-reference.md` for the stable command catalog.
27
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.
@@ -77,6 +77,7 @@ rudder issue review "<issue-id-or-identifier>" --decision request_changes --comm
77
77
  rudder issue review "<issue-id-or-identifier>" --decision needs_followup --comment-file "<path>" --json
78
78
  rudder issue review "<issue-id-or-identifier>" --decision blocked --comment-file "<path>" --json
79
79
  rudder issue create --org-id "$RUDDER_ORG_ID" ... --json
80
+ rudder user activity --user me --since today --json
80
81
  ```
81
82
 
82
83
  Issue comment and close-out commands accept comment bodies only from files or
@@ -90,6 +91,23 @@ should include local screenshots or images. Do not leave only a local `/tmp/...`
90
91
  or workspace image path in the comment, because board users may not be able to
91
92
  inspect it from Rudder.
92
93
 
94
+ ## User Activity Context
95
+
96
+ Use `rudder user activity --user me --since today --json` when you need a
97
+ user-centered view of recent Rudder behavior before claiming context is missing,
98
+ before answering questions like "what did I do today?", "which agents did I
99
+ talk to?", or "what feedback did I give?", and before turning broad recent
100
+ activity into daily notes, handoff context, or preference candidates.
101
+
102
+ The ledger returns safe excerpts plus source/provenance pointers across
103
+ user-authored chat messages, issue comments, approval comments, and user actor
104
+ activity events. Treat summaries and excerpts as pointers, not ground truth
105
+ when exact wording matters. Inspect the cited source before writing durable
106
+ memory, taste/profile updates, or conclusions about stable user preference. Do
107
+ not use the ledger to bypass organization or project permissions, and do not
108
+ store private content in long-term memory unless it is an explicit durable
109
+ preference or operating lesson.
110
+
93
111
  ## Authentication
94
112
 
95
113
  Rudder injects the runtime context for you. Common env vars:
@@ -120,7 +138,9 @@ Rules:
120
138
 
121
139
  Each organization has one system-managed shared workspace root at:
122
140
 
123
- - `~/.rudder/instances/<instance>/organizations/<org-id>/workspaces`
141
+ - `~/.rudder/instances/<instance>/organizations/<org-storage-key>/workspaces`
142
+
143
+ `<org-storage-key>` is the filesystem-safe storage key for the organization. For UUID-backed organizations it is the Rudder short ID form: the first 12 lowercase hex characters of the UUID with dashes removed. The API and database still use the full organization id.
124
144
 
125
145
  Important files and conventions:
126
146
 
@@ -191,9 +211,11 @@ If asked to make or revise durable project work files, use the Library as a loca
191
211
 
192
212
  When you need to cite a Library file in a chat reply, issue comment, review, blocker, or done comment, use the `markdownLink` returned by `rudder library file ref "$RUDDER_PROJECT_LIBRARY_PATH/<relative-file>" --json`. Do not hand-write `library-entry://...` URLs.
193
213
 
194
- Strong Library links look like normal Markdown, but the target contains only
195
- the stable Library entry id. Title and path are display or lookup details
196
- returned by Rudder, not URL metadata agents should encode:
214
+ Strong Library links look like normal Markdown. The stable Library entry id is
215
+ the identity; Rudder may add a `p` query parameter as a synchronous path hint so
216
+ the UI can navigate immediately before entry metadata finishes loading. Agents
217
+ must not hand-write that query parameter; copy the `mentionHref` or
218
+ `markdownLink` returned by Rudder:
197
219
 
198
220
  ```md
199
221
  [Project work file](library-entry://<entry-id>)
@@ -210,7 +232,8 @@ rudder issue comment "<issue-id-or-identifier>" --body-file "<path>" --json
210
232
  The `ref`, `put`, and `get` JSON responses include:
211
233
 
212
234
  - `libraryEntryId`: stable Library file identity
213
- - `mentionHref`: the raw `library-entry://<entry-id>` target
235
+ - `mentionHref`: the raw `library-entry://<entry-id>` target, optionally with
236
+ Rudder-generated `?p=<url-encoded-path-hint>`
214
237
  - `markdownLink`: the Markdown link to paste into the comment body
215
238
 
216
239
  For close-out comments, copy `markdownLink` from the JSON response into your temporary Markdown comment file and post that link as the Rudder-visible handoff checkpoint. Direct filesystem writes are not complete handoff evidence until the file is cited with the returned `markdownLink`. The `ref` argument is a Library-relative path such as `$RUDDER_PROJECT_LIBRARY_PATH/<relative-file>`, not the absolute `$RUDDER_PROJECT_LIBRARY_ROOT/...` filesystem path. If `$RUDDER_PROJECT_LIBRARY_ROOT` is unset or inaccessible, use `rudder library file get/put "$RUDDER_PROJECT_LIBRARY_PATH/<relative-file>"` as the remote or restricted runtime fallback. Use older `library-file://...` links only when you are preserving or reading legacy content that has no `libraryEntryId`.
@@ -139,6 +139,7 @@ Use the incremental `after` form when you already know the thread.
139
139
  - `GET /api/orgs/:orgId/goals`
140
140
  - `POST /api/orgs/:orgId/goals`
141
141
  - `GET /api/orgs/:orgId/activity`
142
+ - `GET /api/orgs/:orgId/users/:userId/activity-ledger`
142
143
  - `GET /api/orgs/:orgId/costs/summary`
143
144
  - `GET /api/orgs/:orgId/costs/by-agent`
144
145
  - `GET /api/orgs/:orgId/costs/by-project`
@@ -197,8 +198,8 @@ Workspace file detail responses include renderable reference fields:
197
198
  {
198
199
  "filePath": "projects/rudder/RUD-123.md",
199
200
  "libraryEntryId": "entry-uuid",
200
- "mentionHref": "library-entry://entry-uuid",
201
- "markdownLink": "[RUD-123.md](library-entry://entry-uuid)"
201
+ "mentionHref": "library-entry://entry-uuid?p=projects%2Frudder%2FRUD-123.md",
202
+ "markdownLink": "[RUD-123.md](library-entry://entry-uuid?p=projects%2Frudder%2FRUD-123.md)"
202
203
  }
203
204
  ```
204
205
 
@@ -214,6 +215,11 @@ the remote or restricted runtime fallback. `library-file://...` is legacy weak
214
215
  path syntax and should not be used for new durable Library references when
215
216
  `libraryEntryId` is available.
216
217
 
218
+ The `libraryEntryId` remains the strong identity. The optional `p` query value
219
+ is a Rudder-generated synchronous path hint for fast UI navigation before entry
220
+ metadata is available; agents should copy returned links instead of constructing
221
+ or editing that URL by hand.
222
+
217
223
  ## Approval Workflows
218
224
 
219
225
  - `GET /api/approvals/:approvalId`
@@ -5,13 +5,14 @@ Stable CLI contract for agents using the bundled `rudder` skill. Prefer these co
5
5
  ## Defaults
6
6
 
7
7
  - All commands support `--json`.
8
+ - CLI output renders IDs as short IDs by default; `rudder runs ...` commands accept short run IDs. Add `--full-ids` only when a debugging or compatibility workflow needs raw UUIDs.
8
9
  - `--org-id` defaults to `RUDDER_ORG_ID` when relevant.
9
10
  - `--run-id` defaults to `RUDDER_RUN_ID` and is attached to mutating requests when available.
10
11
  - `issue checkout` defaults `--agent-id` from `RUDDER_AGENT_ID`.
11
12
 
12
13
  ## JSON Output Contract
13
14
 
14
- `rudder ... --json` commands must write valid JSON to stdout on success. If a command cannot produce the requested JSON, it must exit nonzero and write a diagnostic error to stderr. An exit-0 command with empty stdout is a CLI/runtime defect, not a valid empty result.
15
+ `rudder ... --json` commands must write valid JSON to stdout on success. ID fields in CLI JSON use short display IDs by default; pass `--full-ids` to preserve raw UUIDs. Short run IDs returned by CLI output can be passed back into `rudder runs get`, `events`, `log`, `transcript`, `errors`, `cancel`, and `retry`. If a command cannot produce the requested JSON, it must exit nonzero and write a diagnostic error to stderr. An exit-0 command with empty stdout is a CLI/runtime defect, not a valid empty result.
15
16
 
16
17
  Direct API fallback is allowed for heartbeat close-out only when a required CLI command fails diagnostically or returns exit 0 with empty stdout. When using fallback, note the affected command and reason in the issue comment or run notes so the CLI path can be fixed.
17
18
 
@@ -42,6 +43,7 @@ Direct API fallback is allowed for heartbeat close-out only when a required CLI
42
43
  | `rudder project get <project-id-or-shortname> [--org-id <id>]` | Read one project by ID or shortname. | no | no | no | no |
43
44
  | `rudder project create --org-id <id> --name <name>` | Create a project in the organization. | yes | required | no | attached when available |
44
45
  | `rudder project update <project-id-or-shortname> [--org-id <id>]` | Update mutable project fields such as name, description, status, goals, lead agent, target date, color, or archivedAt. | yes | no | no | attached when available |
46
+ | `rudder user activity --user me --since today --json` | Read a user-centered activity ledger with safe excerpts and provenance across chats, issue comments, approval comments, and user actor activity. | no | required | no | no |
45
47
  | `rudder library file list [directory]` | List Library files and folders; file rows include `libraryEntryId` when a strong reference can be generated. | no | required | no | no |
46
48
  | `rudder library file get <path>` | Fallback read when local filesystem access is unavailable; JSON includes `mentionHref` and `markdownLink`. | no | required | no | no |
47
49
  | `rudder library file ref <path>` | Return the stable Markdown reference for one Library file without printing file content. | no | required | no | no |
@@ -132,9 +134,12 @@ printf '%s\n' "$result" | jq -r .markdownLink
132
134
  The relevant JSON fields are:
133
135
 
134
136
  - `libraryEntryId`: stable identity for the Library file.
135
- - `mentionHref`: raw `library-entry://<id>` target.
137
+ - `mentionHref`: raw `library-entry://<id>` target, optionally with a
138
+ Rudder-generated `p` query parameter as a path hint for the current Library
139
+ path.
136
140
  - `markdownLink`: complete Markdown link that the renderer turns into a Library
137
- chip and that continues resolving after Rudder-managed rename or move.
141
+ chip. Its identity remains the entry id; any `p` query value is only a
142
+ synchronous navigation hint and agents should not hand-write it.
138
143
 
139
144
  Use `rudder library file get/put` only when local filesystem access to the
140
145
  Library is unavailable, such as remote or restricted runtimes. `rudder library
@@ -98,7 +98,8 @@ rudder skill scan-projects \
98
98
 
99
99
  Notes:
100
100
 
101
- - Rudder now uses one fixed org workspace root at `~/.rudder/instances/<instance>/organizations/<org-id>/workspaces`.
101
+ - Rudder now uses one fixed org workspace root at `~/.rudder/instances/<instance>/organizations/<org-storage-key>/workspaces`.
102
+ - `<org-storage-key>` is the filesystem storage key. For UUID-backed organizations, use the short ID form: the first 12 lowercase hex characters of the UUID with dashes removed. API calls still use the full organization id.
102
103
  - `scan-projects` should be treated as a compatibility command that scans the shared org workspace plus any legacy project workspace records that still exist.
103
104
  - The org `Resources` catalog is the canonical place to register shared repos, docs, URLs, and connector objects for agents.
104
105
  - Workspaces remains the disk-backed shared file surface. In local trusted runs, durable project work should be written directly under `$RUDDER_PROJECT_LIBRARY_ROOT`; use `$RUDDER_PROJECT_LIBRARY_PATH/<relative-file>` when asking Rudder for a renderable reference. When a run creates or updates a durable Library file, its final chat reply or issue comment should include a user-visible Markdown link to that file.