@renderinc/sdk 0.2.1 → 0.3.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.
Files changed (62) hide show
  1. package/dist/experimental/object/api.d.ts +2 -1
  2. package/dist/experimental/object/api.d.ts.map +1 -1
  3. package/dist/experimental/object/api.js +20 -3
  4. package/dist/experimental/object/client.d.ts +3 -1
  5. package/dist/experimental/object/client.d.ts.map +1 -1
  6. package/dist/experimental/object/client.js +47 -6
  7. package/dist/experimental/object/index.d.ts +1 -1
  8. package/dist/experimental/object/index.d.ts.map +1 -1
  9. package/dist/experimental/object/types.d.ts +17 -0
  10. package/dist/experimental/object/types.d.ts.map +1 -1
  11. package/dist/generated/schema.d.ts +167 -28
  12. package/dist/generated/schema.d.ts.map +1 -1
  13. package/dist/workflows/uds.d.ts.map +1 -1
  14. package/dist/workflows/uds.js +3 -2
  15. package/package.json +4 -1
  16. package/CHANGELOG.md +0 -33
  17. package/biome.json +0 -84
  18. package/examples/client/main.ts +0 -42
  19. package/examples/client/package-lock.json +0 -601
  20. package/examples/client/package.json +0 -16
  21. package/examples/client/tsconfig.json +0 -17
  22. package/examples/task/main.ts +0 -90
  23. package/examples/task/package-lock.json +0 -584
  24. package/examples/task/package.json +0 -16
  25. package/examples/task/tsconfig.json +0 -17
  26. package/src/errors.test.ts +0 -75
  27. package/src/errors.ts +0 -73
  28. package/src/experimental/experimental.ts +0 -56
  29. package/src/experimental/index.ts +0 -24
  30. package/src/experimental/object/api.ts +0 -91
  31. package/src/experimental/object/client.test.ts +0 -138
  32. package/src/experimental/object/client.ts +0 -317
  33. package/src/experimental/object/index.ts +0 -22
  34. package/src/experimental/object/types.test.ts +0 -87
  35. package/src/experimental/object/types.ts +0 -131
  36. package/src/generated/schema.ts +0 -12937
  37. package/src/index.ts +0 -7
  38. package/src/render.ts +0 -35
  39. package/src/utils/create-api-client.ts +0 -13
  40. package/src/utils/get-base-url.test.ts +0 -58
  41. package/src/utils/get-base-url.ts +0 -16
  42. package/src/version.ts +0 -37
  43. package/src/workflows/client/client.test.ts +0 -68
  44. package/src/workflows/client/client.ts +0 -142
  45. package/src/workflows/client/create-client.ts +0 -17
  46. package/src/workflows/client/index.ts +0 -3
  47. package/src/workflows/client/sse.ts +0 -95
  48. package/src/workflows/client/types.ts +0 -56
  49. package/src/workflows/executor.ts +0 -124
  50. package/src/workflows/index.ts +0 -7
  51. package/src/workflows/registry.test.ts +0 -76
  52. package/src/workflows/registry.ts +0 -88
  53. package/src/workflows/runner.ts +0 -38
  54. package/src/workflows/schema.ts +0 -348
  55. package/src/workflows/task.ts +0 -117
  56. package/src/workflows/types.test.ts +0 -52
  57. package/src/workflows/types.ts +0 -89
  58. package/src/workflows/uds.ts +0 -139
  59. package/test-types.ts +0 -14
  60. package/tsconfig.build.json +0 -4
  61. package/tsconfig.json +0 -23
  62. package/vitest.config.ts +0 -8
@@ -1 +1 @@
1
- {"version":3,"file":"uds.d.ts","sourceRoot":"","sources":["../../src/workflows/uds.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,gBAAgB,EAEhB,wBAAwB,EAIxB,YAAY,EACb,MAAM,YAAY,CAAC;AAKpB,qBAAa,SAAS;IACR,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,MAAM;IAKzC,QAAQ,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAI3C,OAAO,CAAC,iBAAiB;IAyBnB,YAAY,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAO1D,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAa3D,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAUtE,aAAa,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;YAa3C,OAAO;CA2CtB"}
1
+ {"version":3,"file":"uds.d.ts","sourceRoot":"","sources":["../../src/workflows/uds.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,gBAAgB,EAEhB,wBAAwB,EAIxB,YAAY,EACb,MAAM,YAAY,CAAC;AAKpB,qBAAa,SAAS;IACR,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,MAAM;IAKzC,QAAQ,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAI3C,OAAO,CAAC,iBAAiB;IAyBnB,YAAY,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAO1D,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAa3D,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAUtE,aAAa,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;YAa3C,OAAO;CA4CtB"}
@@ -60,13 +60,14 @@ class UDSClient {
60
60
  await this.request("/register-tasks", "POST", body);
61
61
  }
62
62
  async request(path, method, body) {
63
+ const bodyString = body ? JSON.stringify(body) : "";
63
64
  return new Promise((resolve, reject) => {
64
65
  const req = node_http_1.default.request({
65
66
  socketPath: this.socketPath,
66
67
  path: path,
67
68
  method: method,
68
69
  headers: {
69
- "Content-Length": body ? JSON.stringify(body).length : 0,
70
+ "Content-Length": Buffer.byteLength(bodyString),
70
71
  "Content-Type": "application/json",
71
72
  "User-Agent": (0, version_js_1.getUserAgent)(),
72
73
  },
@@ -93,7 +94,7 @@ class UDSClient {
93
94
  req.on("error", (error) => {
94
95
  reject(error);
95
96
  });
96
- req.end(body ? JSON.stringify(body) : "");
97
+ req.end(bodyString);
97
98
  });
98
99
  }
99
100
  }
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "@renderinc/sdk",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "Render SDK for TypeScript",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
7
10
  "scripts": {
8
11
  "build": "tsc -p tsconfig.build.json",
9
12
  "test": "vitest",
package/CHANGELOG.md DELETED
@@ -1,33 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to the `@renderinc/sdk` TypeScript SDK will be documented in this file.
4
-
5
- This project follows [Semantic Versioning](https://semver.org/).
6
-
7
- ## [0.2.1] - 2026-01-29
8
-
9
- ### Changed
10
- - Updated package name in README from @render/sdk to @renderinc/sdk
11
- - Renamed experimental blob storage API to object storage (Blob* -> Object*)
12
- - Switched internal workflows task communication from SSE to HTTP requests
13
-
14
- ## [0.2.0] - 2026-01-26
15
-
16
- ### Added
17
- - Add experimental blob storage API with `BlobClient` and `ScopedBlobClient`
18
- - Add plan support for task execution
19
- - Add per-task timeout override via `timeoutSeconds` option
20
-
21
- ### Changed
22
- - Auto-start task server on task registration (no need to call `startTaskServer()` manually)
23
- - Rename `wait_duration` to `wait_duration_ms` for cross-SDK consistency
24
- - Move generated API schema to `generated/` directory
25
-
26
- ## [0.1.0] - 2025-12-15
27
-
28
- ### Added
29
- - Add initial TypeScript SDK for Render Workflows
30
- - Add task registration and execution via `@renderinc/sdk/workflows`
31
- - Add `TaskContext` for task metadata and subtask execution
32
- - Add configurable retry policies with exponential backoff
33
- - Add generated OpenAPI types for full type safety
package/biome.json DELETED
@@ -1,84 +0,0 @@
1
- {
2
- "$schema": "https://biomejs.dev/schemas/2.3.8/schema.json",
3
- "vcs": {
4
- "enabled": true,
5
- "clientKind": "git",
6
- "useIgnoreFile": true
7
- },
8
- "files": {
9
- "ignoreUnknown": false,
10
- "includes": ["**", "!!**/src/generated/**/*"]
11
- },
12
- "formatter": {
13
- "enabled": true,
14
- "indentStyle": "space",
15
- "indentWidth": 2,
16
- "lineWidth": 100
17
- },
18
- "linter": {
19
- "enabled": true,
20
- "rules": {
21
- "recommended": true,
22
- "performance": {
23
- "noAccumulatingSpread": "error",
24
- "noDelete": "error",
25
- "noDynamicNamespaceImportAccess": "error",
26
- "noNamespaceImport": "error",
27
- "useTopLevelRegex": "error"
28
- },
29
- "complexity": {
30
- "noCommaOperator": "error",
31
- "noForEach": "error",
32
- "noUselessConstructor": "error",
33
- "noUselessEmptyExport": "error",
34
- "noUselessFragments": "error",
35
- "noUselessLabel": "error",
36
- "noUselessLoneBlockStatements": "error",
37
- "noUselessRename": "error",
38
- "noUselessSwitchCase": "error",
39
- "noUselessTypeConstraint": "error",
40
- "useArrowFunction": "error",
41
- "useLiteralKeys": "error"
42
- },
43
- "suspicious": {
44
- "noExplicitAny": "off"
45
- },
46
- "style": {
47
- "noImplicitBoolean": "error",
48
- "noNegationElse": "error",
49
- "noParameterAssign": "warn",
50
- "noRestrictedGlobals": "error",
51
- "noRestrictedImports": {
52
- "level": "error",
53
- "options": {
54
- "paths": {
55
- "vitest": {
56
- "message": "Vitest functions are automatically imported.",
57
- "allowImportNames": ["Mock"]
58
- }
59
- }
60
- }
61
- },
62
- "useDefaultParameterLast": "error",
63
- "useExponentiationOperator": "error",
64
- "useNodejsImportProtocol": "error",
65
- "useNumberNamespace": "error",
66
- "useSingleVarDeclarator": "error",
67
- "noCommonJs": "error",
68
- "useNumericSeparators": "error",
69
- "useReadonlyClassProperties": "error",
70
- "useUnifiedTypeSignatures": "error"
71
- }
72
- }
73
- },
74
- "javascript": {
75
- "formatter": {
76
- "quoteStyle": "double",
77
- "trailingCommas": "all",
78
- "semicolons": "always",
79
- "quoteProperties": "asNeeded",
80
- "bracketSpacing": true,
81
- "arrowParentheses": "always"
82
- }
83
- }
84
- }
@@ -1,42 +0,0 @@
1
- import { Render, ServerError } from "@renderinc/sdk";
2
-
3
- /**
4
- * Example: Using the REST API client to run tasks
5
- */
6
- async function main() {
7
- const render = new Render();
8
-
9
- try {
10
- // Run a task
11
- console.log("Running task...");
12
-
13
- const result = await render.workflows.runTask("scott-go/square", [4]);
14
-
15
- console.log("Task completed!");
16
- console.log("Status:", result.status);
17
- console.log("Results:", result.results);
18
-
19
- // List recent task runs
20
- console.log("\nListing recent task runs...");
21
- const taskRuns = await render.workflows.listTaskRuns({ limit: 5 });
22
- console.log(`Found ${taskRuns.length} task runs:`);
23
- for (const run of taskRuns) {
24
- console.log(` - ${run.id}: ${run.status} (${run.taskId})`);
25
- }
26
-
27
- if (result) {
28
- // Get specific task run details
29
- console.log("\nGetting task run details...");
30
- const details = await render.workflows.getTaskRun(result.id);
31
- console.log("Task run details:", details);
32
- }
33
- } catch (error) {
34
- if (error instanceof ServerError) {
35
- console.error("server error", error.name, error.message);
36
- }
37
- console.error("Error:", error);
38
- process.exit(1);
39
- }
40
- }
41
-
42
- main();