@rudderhq/agent-runtime-opencode-local 0.4.2 → 0.4.3-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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rudderhq/agent-runtime-opencode-local",
3
- "version": "0.4.2",
3
+ "version": "0.4.3-canary.0",
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.4.2",
70
+ "@rudderhq/agent-runtime-utils": "0.4.3-canary.0",
71
71
  "picocolors": "^1.1.1"
72
72
  },
73
73
  "devDependencies": {
@@ -163,7 +163,7 @@ Important files and conventions:
163
163
  - If you encounter older `library-file://...` or `library-doc://...` links, treat them as legacy Rudder Library references. Prefer project Library resources going forward.
164
164
  - If you need broader org-wide resources, query the org resource catalog or inspect Library files explicitly instead of assuming they are already in the prompt.
165
165
  - Use Workspaces for disk-backed shared files and skill packages.
166
- - In local trusted runs, durable generated project work files belong under `$RUDDER_PROJECT_LIBRARY_ROOT`. Use `$RUDDER_PROJECT_LIBRARY_PATH/<relative-file>` only when asking Rudder for a renderable reference. Use `/tmp` only for transient scratch files and temporary verification files.
166
+ - In local trusted runs with project context, durable generated project work files belong under `$RUDDER_PROJECT_LIBRARY_ROOT`. Use `$RUDDER_PROJECT_LIBRARY_PATH/<relative-file>` only when asking Rudder for a renderable reference. When there is no project context, write durable generated chat/work artifacts under the organization Library artifacts fallback `$RUDDER_ORG_WORKSPACE_ROOT/artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>` and cite the product locator `library:artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>`. Do not choose an existing project, such as Getting Started, just to obtain a project Library path. Use `/tmp` only for transient scratch files and temporary verification files.
167
167
  - If a `resources.md` file exists, treat it like a normal workspace file rather than a reserved Rudder surface.
168
168
  - Agent-specific files live under `workspaces/agents/<workspace-key>/...`.
169
169
  - New projects do not create or configure their own workspace roots.
@@ -220,7 +220,9 @@ Do not fall back to raw `curl` for this workflow in local adapters or packaged d
220
220
 
221
221
  If asked to make or revise durable project work files, use the Library as a local file workspace. In local trusted runs with project context, write files directly under `$RUDDER_PROJECT_LIBRARY_ROOT` with normal filesystem tools. `library:projects/<project-key>/...` is the Rudder product locator for those files, not the Markdown link syntax and not a reason to route ordinary local edits through the CLI.
222
222
 
223
- 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.
223
+ If there is no project context, write durable generated chat/work artifacts under the organization Library artifacts fallback instead: `$RUDDER_ORG_WORKSPACE_ROOT/artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>`, with product locator `library:artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>`. Use the current date and a concise slug of the current chat/thread title for `<conversation-title>`. Do not choose an existing project, such as Getting Started, just to obtain a project Library path.
224
+
225
+ 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` with project context, or `rudder library file ref "artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>" --json` without project context. Do not hand-write `library-entry://...` URLs.
224
226
 
225
227
  Strong Library links look like normal Markdown. The stable Library entry id is
226
228
  the identity; Rudder may add a `p` query parameter as a synchronous path hint so
@@ -247,7 +249,7 @@ The `ref`, `put`, and `get` JSON responses include:
247
249
  Rudder-generated `?p=<url-encoded-path-hint>`
248
250
  - `markdownLink`: the Markdown link to paste into the comment body
249
251
 
250
- 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`.
252
+ 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>` or `artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>`, not an absolute filesystem path. If `$RUDDER_PROJECT_LIBRARY_ROOT` is unset or inaccessible but `$RUDDER_PROJECT_LIBRARY_PATH` exists, use `rudder library file get/put "$RUDDER_PROJECT_LIBRARY_PATH/<relative-file>"` as the remote or restricted runtime fallback. If there is no project context, use the organization artifacts fallback path instead. Use older `library-file://...` links only when you are preserving or reading legacy content that has no `libraryEntryId`.
251
253
 
252
254
  Planning rules:
253
255
 
@@ -182,9 +182,13 @@ Project mutation policy:
182
182
  ### Library Workspace Files
183
183
 
184
184
  Local trusted agents should use normal filesystem tools under
185
- `$RUDDER_PROJECT_LIBRARY_ROOT` for durable project files. API fallback for
186
- Library files is for debugging, compatibility, remote runtimes, or restricted
187
- runtimes that cannot access the local Library filesystem.
185
+ `$RUDDER_PROJECT_LIBRARY_ROOT` for durable project files when the run has project
186
+ context. When there is no project context, durable generated chat/work artifacts
187
+ belong under the organization Library artifacts fallback:
188
+ `$RUDDER_ORG_WORKSPACE_ROOT/artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>`
189
+ with product locator `library:artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>`.
190
+ API fallback for Library files is for debugging, compatibility, remote runtimes,
191
+ or restricted runtimes that cannot access the local Library filesystem.
188
192
 
189
193
  - `GET /api/orgs/:orgId/workspace/files?path=:directory`
190
194
  - `GET /api/orgs/:orgId/workspace/file?path=:file`
@@ -204,15 +208,19 @@ Workspace file detail responses include renderable reference fields:
204
208
  ```
205
209
 
206
210
  Agents should paste `markdownLink` into issue comments and close-out notes. In
207
- normal local runs, obtain that field with
211
+ normal local project-context runs, obtain that field with
208
212
  `rudder library file ref "$RUDDER_PROJECT_LIBRARY_PATH/<relative-file>" --json`
209
- after writing the file directly. The `ref` path is Library-relative, not the
210
- absolute `$RUDDER_PROJECT_LIBRARY_ROOT/...` filesystem path. Posting that
211
- returned link is the Rudder-visible handoff checkpoint for direct filesystem
212
- writes. If `$RUDDER_PROJECT_LIBRARY_ROOT` is unset or inaccessible, use
213
+ after writing the file directly. With no project context, obtain it with
214
+ `rudder library file ref "artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>" --json`.
215
+ The `ref` path is Library-relative, not an absolute filesystem path such as
216
+ `$RUDDER_PROJECT_LIBRARY_ROOT/...` or `$RUDDER_ORG_WORKSPACE_ROOT/...`. Posting
217
+ that returned link is the Rudder-visible handoff checkpoint for direct filesystem
218
+ writes. If `$RUDDER_PROJECT_LIBRARY_ROOT` is unset or inaccessible but
219
+ `$RUDDER_PROJECT_LIBRARY_PATH` exists, use
213
220
  `rudder library file get/put "$RUDDER_PROJECT_LIBRARY_PATH/<relative-file>"` as
214
- the remote or restricted runtime fallback. `library-file://...` is legacy weak
215
- path syntax and should not be used for new durable Library references when
221
+ the remote or restricted runtime fallback. If there is no project context, use
222
+ the organization artifacts fallback path instead. `library-file://...` is legacy
223
+ weak path syntax and should not be used for new durable Library references when
216
224
  `libraryEntryId` is available.
217
225
 
218
226
  The `libraryEntryId` remains the strong identity. The optional `p` query value
@@ -123,7 +123,12 @@ If `RUDDER_WAKE_REASON=issue_passive_followup`, the run is issue follow-up for t
123
123
 
124
124
  Agents should not hand-write `library-entry://...` URLs. Local trusted agents
125
125
  should create and update durable project files directly under
126
- `$RUDDER_PROJECT_LIBRARY_ROOT` with normal filesystem tools. After creating,
126
+ `$RUDDER_PROJECT_LIBRARY_ROOT` with normal filesystem tools when the run has
127
+ project context. When there is no project context, write durable generated
128
+ chat/work artifacts under
129
+ `$RUDDER_ORG_WORKSPACE_ROOT/artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>`
130
+ and reference the Library-relative product path
131
+ `artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>`. After creating,
127
132
  updating, or reading a durable Library file, use `rudder library file ref` to
128
133
  get the CLI-returned `markdownLink` for issue comments, review comments,
129
134
  blocker notes, done comments, and chat replies.
@@ -132,6 +137,11 @@ blocker notes, done comments, and chat replies.
132
137
  printf '%s\n' "<markdown body>" > "$RUDDER_PROJECT_LIBRARY_ROOT/<issue>.md"
133
138
  result="$(rudder library file ref "$RUDDER_PROJECT_LIBRARY_PATH/<issue>.md" --json)"
134
139
  printf '%s\n' "$result" | jq -r .markdownLink
140
+
141
+ mkdir -p "$RUDDER_ORG_WORKSPACE_ROOT/artifacts/YYYY-MM-DD/<conversation-title>"
142
+ printf '%s\n' "<markdown body>" > "$RUDDER_ORG_WORKSPACE_ROOT/artifacts/YYYY-MM-DD/<conversation-title>/<artifact>.md"
143
+ result="$(rudder library file ref "artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>" --json)"
144
+ printf '%s\n' "$result" | jq -r .markdownLink
135
145
  ```
136
146
 
137
147
  The relevant JSON fields are:
@@ -148,13 +158,17 @@ Use `rudder library file get/put` only when local filesystem access to the
148
158
  Library is unavailable, such as remote or restricted runtimes. `rudder library
149
159
  file link <path> --json` remains as a compatibility alias for `ref`. The
150
160
  `ref` path is Library-relative, for example
151
- `$RUDDER_PROJECT_LIBRARY_PATH/<relative-file>`; do not pass the absolute
152
- `$RUDDER_PROJECT_LIBRARY_ROOT/...` filesystem path. Posting the returned
153
- `markdownLink` is the Rudder-visible handoff checkpoint for direct filesystem
154
- writes. If `$RUDDER_PROJECT_LIBRARY_ROOT` is unset or inaccessible, use
161
+ `$RUDDER_PROJECT_LIBRARY_PATH/<relative-file>` with project context or
162
+ `artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>` without project
163
+ context; do not pass absolute filesystem paths such as
164
+ `$RUDDER_PROJECT_LIBRARY_ROOT/...` or `$RUDDER_ORG_WORKSPACE_ROOT/...`. Posting
165
+ the returned `markdownLink` is the Rudder-visible handoff checkpoint for direct
166
+ filesystem writes. If `$RUDDER_PROJECT_LIBRARY_ROOT` is unset or inaccessible
167
+ but `$RUDDER_PROJECT_LIBRARY_PATH` exists, use
155
168
  `rudder library file get/put "$RUDDER_PROJECT_LIBRARY_PATH/<relative-file>"` as
156
- the remote or restricted runtime fallback. Treat `library-file://...` as legacy
157
- weak path syntax and use it only when preserving old content that has no
169
+ the remote or restricted runtime fallback. If there is no project context, use
170
+ the organization artifacts fallback path instead. Treat `library-file://...` as
171
+ legacy weak path syntax and use it only when preserving old content that has no
158
172
  `libraryEntryId`.
159
173
 
160
174
  ## Git Identity Policy