@bendyline/gezel-sdk 1.0.5 → 1.0.6

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/dist/index.d.ts CHANGED
@@ -328,10 +328,16 @@ interface GezelSDK<TInput = Record<string, unknown>> {
328
328
  /** Write (or overwrite) an artifact. */
329
329
  write(path: string, content: string): Promise<void>;
330
330
  /**
331
- * List artifacts, optionally filtered by path prefix.
332
- * @param prefix - Only return artifacts whose path starts with this.
331
+ * List artifacts in one directory of the drawer, or a whole subtree.
332
+ * @param prefix - Directory to list (default: the drawer root).
333
+ * @param opts.recursive - Walk the subtree under `prefix` instead of one
334
+ * level. Returned paths stay relative to the drawer root, so they can
335
+ * be passed straight back to {@link read}. Large subtrees are capped by
336
+ * the walker's entry budget; scope `prefix` to stay inside it.
333
337
  */
334
- list(prefix?: string): Promise<ArtifactEntry[]>;
338
+ list(prefix?: string, opts?: {
339
+ recursive?: boolean;
340
+ }): Promise<ArtifactEntry[]>;
335
341
  /** Delete an artifact. */
336
342
  delete(path: string): Promise<void>;
337
343
  };
package/dist/index.js CHANGED
@@ -174,7 +174,10 @@ var gezel = {
174
174
  artifacts: {
175
175
  read: (path) => rpc.call("artifact.read", { path }),
176
176
  write: (path, content) => rpc.call("artifact.write", { path, content }),
177
- list: (prefix) => rpc.call("artifact.list", { prefix }),
177
+ list: (prefix, opts) => rpc.call("artifact.list", {
178
+ prefix,
179
+ ...opts?.recursive ? { recursive: true } : {}
180
+ }),
178
181
  delete: (path) => rpc.call("artifact.delete", { path })
179
182
  },
180
183
  documents: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bendyline/gezel-sdk",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "SDK imported by scripts running in the Gezel sandbox. Exposes the `gezel` object and `defineScript` helper.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -59,7 +59,7 @@
59
59
  "!dist/**/*.map"
60
60
  ],
61
61
  "devDependencies": {
62
- "@bendyline/gezel": "1.0.5",
62
+ "@bendyline/gezel": "1.0.6",
63
63
  "tsup": "^8.5.1",
64
64
  "typescript": "^6.0.3",
65
65
  "vitest": "^4.1.10"