deepline 0.3.258 → 0.3.260

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 (69) hide show
  1. package/dist/bundling-sources/sdk/src/api-error.ts +45 -0
  2. package/dist/bundling-sources/sdk/src/client.ts +98 -459
  3. package/dist/bundling-sources/sdk/src/http.ts +1 -34
  4. package/dist/bundling-sources/sdk/src/index.ts +8 -0
  5. package/dist/bundling-sources/sdk/src/plays/csv-data-input.ts +139 -0
  6. package/dist/bundling-sources/sdk/src/plays/run-request.ts +855 -0
  7. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  8. package/dist/bundling-sources/sdk/src/runs/overview.ts +45 -2
  9. package/dist/bundling-sources/sdk/src/types.ts +5 -0
  10. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +8 -0
  11. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +42 -10
  12. package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +3 -0
  13. package/dist/bundling-sources/shared_libs/play-runtime/launch-source-policy.ts +23 -0
  14. package/dist/bundling-sources/shared_libs/play-runtime/live-state-contract.ts +3 -0
  15. package/dist/bundling-sources/shared_libs/play-runtime/play-admission-outcome.ts +23 -5
  16. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/gateway-adapter.ts +1 -1
  17. package/dist/bundling-sources/shared_libs/play-runtime/run-execution-state.ts +845 -0
  18. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +106 -6
  19. package/dist/bundling-sources/shared_libs/play-runtime/run-observation.ts +440 -0
  20. package/dist/bundling-sources/shared_libs/play-runtime/run-snapshot-stream.ts +35 -2
  21. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +66 -7
  22. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-crash-details.ts +95 -0
  23. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +13 -2
  24. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +0 -29
  25. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-row-transition.ts +47 -2
  26. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +6 -0
  27. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +475 -36
  28. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +78 -11
  29. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +550 -42
  30. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +181 -8
  31. package/dist/bundling-sources/shared_libs/play-runtime/step-lifecycle-tracker.ts +0 -18
  32. package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +80 -7
  33. package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +37 -2
  34. package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +148 -18
  35. package/dist/bundling-sources/shared_libs/plays/cascade-falloff.ts +86 -0
  36. package/dist/bundling-sources/shared_libs/plays/docflow-unreached-reason.ts +611 -0
  37. package/dist/bundling-sources/shared_libs/plays/docflow.ts +21 -0
  38. package/dist/bundling-sources/shared_libs/plays/play-exports.ts +28 -5
  39. package/dist/bundling-sources/shared_libs/plays/settings-contract.ts +92 -10
  40. package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +5 -0
  41. package/dist/bundling-sources/shared_libs/plays/trigger-config-contract.ts +222 -0
  42. package/dist/bundling-sources/shared_libs/plays/trigger-config-route.ts +15 -0
  43. package/dist/cli/index.js +4957 -771
  44. package/dist/cli/index.mjs +4957 -771
  45. package/dist/client-B5XbKrrs.d.mts +6564 -0
  46. package/dist/client-C9Y49yya.d.ts +6564 -0
  47. package/dist/{compiler-manifest-C4mdRJOP.d.mts → compiler-manifest-CUuh8C3b.d.mts} +14 -1
  48. package/dist/{compiler-manifest-C4mdRJOP.d.ts → compiler-manifest-CUuh8C3b.d.ts} +14 -1
  49. package/dist/index.d.mts +7 -6275
  50. package/dist/index.d.ts +7 -6275
  51. package/dist/index.js +360 -326
  52. package/dist/index.mjs +360 -326
  53. package/dist/install-integrity.json +22 -2
  54. package/dist/plays/bundle-play-file.d.mts +2 -2
  55. package/dist/plays/bundle-play-file.d.ts +2 -2
  56. package/dist/plays/bundle-play-file.mjs +117 -18
  57. package/dist/plays/csv-data-input.d.mts +37 -0
  58. package/dist/plays/csv-data-input.d.ts +37 -0
  59. package/dist/plays/csv-data-input.js +3135 -0
  60. package/dist/plays/csv-data-input.mjs +3108 -0
  61. package/dist/plays/run-request.d.mts +6 -0
  62. package/dist/plays/run-request.d.ts +6 -0
  63. package/dist/plays/run-request.js +664 -0
  64. package/dist/plays/run-request.mjs +614 -0
  65. package/dist/release.d.mts +1 -1
  66. package/dist/release.d.ts +1 -1
  67. package/dist/release.js +1 -1
  68. package/dist/release.mjs +1 -1
  69. package/package.json +12 -1
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Decode a Deepline API error envelope. Shared by the SDK's `HttpClient` and
3
+ * the dashboard's same-origin session transport so both surface the same
4
+ * message and code for the same response. Browser-safe.
5
+ */
6
+
7
+ function asRecord(value: unknown): Record<string, unknown> | null {
8
+ return typeof value === 'object' && value !== null
9
+ ? (value as Record<string, unknown>)
10
+ : null;
11
+ }
12
+
13
+ export function apiErrorCodeFromResponse(parsed: unknown): string {
14
+ const response = asRecord(parsed);
15
+ const error = asRecord(response?.error);
16
+ const code = error?.code ?? response?.code;
17
+ return typeof code === 'string' ? code : 'API_ERROR';
18
+ }
19
+
20
+ export function apiErrorMessage(parsed: unknown, status: number): string {
21
+ const errorValue =
22
+ typeof parsed === 'object' && parsed && 'error' in parsed
23
+ ? (parsed as Record<string, unknown>).error
24
+ : undefined;
25
+ if (typeof errorValue === 'string') {
26
+ return errorValue;
27
+ }
28
+ if (
29
+ errorValue &&
30
+ typeof errorValue === 'object' &&
31
+ 'message' in errorValue &&
32
+ typeof (errorValue as Record<string, unknown>).message === 'string'
33
+ ) {
34
+ return (errorValue as Record<string, string>).message;
35
+ }
36
+ if (
37
+ typeof parsed === 'object' &&
38
+ parsed &&
39
+ 'message' in parsed &&
40
+ typeof (parsed as Record<string, unknown>).message === 'string'
41
+ ) {
42
+ return (parsed as Record<string, string>).message;
43
+ }
44
+ return `HTTP ${status}`;
45
+ }