@withgateway/sdk 0.2.3 → 0.2.4

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 (50) hide show
  1. package/dist/cli.js +12557 -5244
  2. package/dist/cli.js.map +1 -1
  3. package/dist/cli.mjs +12557 -5244
  4. package/dist/cli.mjs.map +1 -1
  5. package/dist/files/index.js +65 -29
  6. package/dist/files/index.js.map +1 -1
  7. package/dist/files/index.mjs +53 -18
  8. package/dist/files/index.mjs.map +1 -1
  9. package/dist/hooks/index.d.mts +1 -0
  10. package/dist/hooks/index.d.ts +1 -0
  11. package/dist/hooks/index.js +4355 -0
  12. package/dist/hooks/index.js.map +1 -0
  13. package/dist/hooks/index.mjs +4243 -0
  14. package/dist/hooks/index.mjs.map +1 -0
  15. package/dist/{index-Dpo-t8iO.d.ts → index-1xnxt0Cc.d.ts} +58 -2
  16. package/dist/index-B0R3IgsV.d.mts +1279 -0
  17. package/dist/index-B0R3IgsV.d.ts +1279 -0
  18. package/dist/{index-B5HUQQDE.d.mts → index-C1wDEwH4.d.mts} +58 -2
  19. package/dist/index.d.mts +4 -3
  20. package/dist/index.d.ts +4 -3
  21. package/dist/index.js +6538 -1549
  22. package/dist/index.js.map +1 -1
  23. package/dist/index.mjs +6628 -1652
  24. package/dist/index.mjs.map +1 -1
  25. package/dist/traces/index.js +54 -18
  26. package/dist/traces/index.js.map +1 -1
  27. package/dist/traces/index.mjs +45 -10
  28. package/dist/traces/index.mjs.map +1 -1
  29. package/dist/tracing/index.d.mts +1 -1
  30. package/dist/tracing/index.d.ts +1 -1
  31. package/dist/tracing/index.js +46 -3
  32. package/dist/tracing/index.js.map +1 -1
  33. package/dist/tracing/index.mjs +41 -2
  34. package/dist/tracing/index.mjs.map +1 -1
  35. package/dist/worlds/index.d.mts +365 -6
  36. package/dist/worlds/index.d.ts +365 -6
  37. package/dist/worlds/index.js +2037 -216
  38. package/dist/worlds/index.js.map +1 -1
  39. package/dist/worlds/index.mjs +2026 -205
  40. package/dist/worlds/index.mjs.map +1 -1
  41. package/package.json +6 -1
  42. package/runtime/gatewaysdk/environment/_materialize.py +3 -3
  43. package/runtime/gatewaysdk/environment/schema/api.py +116 -2
  44. package/runtime/gatewaysdk/environment/schema/compiler.py +14 -0
  45. package/runtime/gatewaysdk/environment/schema/host.py +37 -11
  46. package/runtime/gatewaysdk/environment/schema/skills/hooks-getting-started/SKILL.md +154 -0
  47. package/runtime/gatewaysdk/environment/schema/snapshot.py +6 -5
  48. package/runtime/gatewaysdk/environment/schema/tasks.py +12 -2
  49. package/runtime/gatewaysdk/environment/schema/workers.py +30 -13
  50. package/skills/hooks-getting-started/SKILL.md +154 -0
@@ -60,17 +60,50 @@ var init_tasks = __esm({
60
60
  }
61
61
  });
62
62
 
63
+ // src/worlds/taskSessions.ts
64
+ var init_taskSessions = __esm({
65
+ "src/worlds/taskSessions.ts"() {
66
+ "use strict";
67
+ init_worlds();
68
+ init_browser();
69
+ init_session();
70
+ }
71
+ });
72
+
73
+ // src/worlds/evals.ts
74
+ var init_evals = __esm({
75
+ "src/worlds/evals.ts"() {
76
+ "use strict";
77
+ init_worlds();
78
+ }
79
+ });
80
+
81
+ // src/worlds/taskRun.ts
82
+ var import_node_crypto2, fs, path;
83
+ var init_taskRun = __esm({
84
+ "src/worlds/taskRun.ts"() {
85
+ "use strict";
86
+ import_node_crypto2 = require("crypto");
87
+ fs = __toESM(require("fs"));
88
+ path = __toESM(require("path"));
89
+ init_browser();
90
+ init_evals();
91
+ init_session();
92
+ init_taskSessions();
93
+ }
94
+ });
95
+
63
96
  // src/worlds/hub.ts
64
- var import_node_crypto2, import_node_zlib, fs, path, META_RELPATH;
97
+ var import_node_crypto3, import_node_zlib, fs2, path2, META_RELPATH;
65
98
  var init_hub = __esm({
66
99
  "src/worlds/hub.ts"() {
67
100
  "use strict";
68
- import_node_crypto2 = require("crypto");
101
+ import_node_crypto3 = require("crypto");
69
102
  import_node_zlib = require("zlib");
70
- fs = __toESM(require("fs"));
71
- path = __toESM(require("path"));
103
+ fs2 = __toESM(require("fs"));
104
+ path2 = __toESM(require("path"));
72
105
  init_worlds();
73
- META_RELPATH = path.join(".gateway", ".env-metadata.json");
106
+ META_RELPATH = path2.join(".gateway", ".env-metadata.json");
74
107
  }
75
108
  });
76
109
 
@@ -99,11 +132,11 @@ var init_json = __esm({
99
132
  });
100
133
 
101
134
  // src/worlds/transforms.ts
102
- var import_node_crypto3, WHITESPACE_EDGES, WHITESPACE_RUN, NOT_DIGIT, STRIP_PREFIX, trim, emailLocalPart, emailDomain, hex, SIMPLE, TRANSFORMS;
135
+ var import_node_crypto4, WHITESPACE_EDGES, WHITESPACE_RUN, NOT_DIGIT, STRIP_PREFIX, trim, emailLocalPart, emailDomain, hex, SIMPLE, TRANSFORMS;
103
136
  var init_transforms = __esm({
104
137
  "src/worlds/transforms.ts"() {
105
138
  "use strict";
106
- import_node_crypto3 = require("crypto");
139
+ import_node_crypto4 = require("crypto");
107
140
  init_json();
108
141
  WHITESPACE_EDGES = /^[ \t\n\r\f\v]+|[ \t\n\r\f\v]+$/g;
109
142
  WHITESPACE_RUN = /[ \t\n\r\f\v]+/g;
@@ -118,7 +151,7 @@ var init_transforms = __esm({
118
151
  const at = value.lastIndexOf("@");
119
152
  return at === -1 ? "" : value.slice(at + 1).toLowerCase();
120
153
  };
121
- hex = (algorithm, value) => (0, import_node_crypto3.createHash)(algorithm).update(value, "utf8").digest("hex");
154
+ hex = (algorithm, value) => (0, import_node_crypto4.createHash)(algorithm).update(value, "utf8").digest("hex");
122
155
  SIMPLE = {
123
156
  lower: (value) => value.toLowerCase(),
124
157
  upper: (value) => value.toUpperCase(),
@@ -138,11 +171,11 @@ var init_transforms = __esm({
138
171
  });
139
172
 
140
173
  // src/worlds/redaction.ts
141
- var import_node_crypto4;
174
+ var import_node_crypto5;
142
175
  var init_redaction = __esm({
143
176
  "src/worlds/redaction.ts"() {
144
177
  "use strict";
145
- import_node_crypto4 = require("crypto");
178
+ import_node_crypto5 = require("crypto");
146
179
  init_json();
147
180
  init_transforms();
148
181
  }
@@ -165,13 +198,13 @@ var init_migrate = __esm({
165
198
  });
166
199
 
167
200
  // src/worlds/ingest.ts
168
- var fs2, os, path2;
201
+ var fs3, os, path3;
169
202
  var init_ingest = __esm({
170
203
  "src/worlds/ingest.ts"() {
171
204
  "use strict";
172
- fs2 = __toESM(require("fs"));
205
+ fs3 = __toESM(require("fs"));
173
206
  os = __toESM(require("os"));
174
- path2 = __toESM(require("path"));
207
+ path3 = __toESM(require("path"));
175
208
  init_worlds();
176
209
  }
177
210
  });
@@ -188,9 +221,9 @@ function resolveEnv(options) {
188
221
  }
189
222
  return { host: host.replace(/\/+$/, ""), publicKey, secretKey };
190
223
  }
191
- async function apiRequest(options, method, path3, body) {
224
+ async function apiRequest(options, method, path4, body) {
192
225
  const { host, publicKey, secretKey } = resolveEnv(options);
193
- const res = await fetch(`${host}${path3}`, {
226
+ const res = await fetch(`${host}${path4}`, {
194
227
  method,
195
228
  headers: {
196
229
  "content-type": "application/json",
@@ -199,7 +232,7 @@ async function apiRequest(options, method, path3, body) {
199
232
  ...body === void 0 ? {} : { body: JSON.stringify(body) }
200
233
  });
201
234
  const text = await res.text();
202
- if (!res.ok) throw new ApiError(res.status, method, path3, text.slice(0, 400));
235
+ if (!res.ok) throw new ApiError(res.status, method, path4, text.slice(0, 400));
203
236
  return JSON.parse(text);
204
237
  }
205
238
  var ApiError;
@@ -208,6 +241,9 @@ var init_worlds = __esm({
208
241
  "use strict";
209
242
  init_session();
210
243
  init_tasks();
244
+ init_taskSessions();
245
+ init_taskRun();
246
+ init_evals();
211
247
  init_browser();
212
248
  init_hub();
213
249
  init_validate();
@@ -218,8 +254,8 @@ var init_worlds = __esm({
218
254
  init_migrate();
219
255
  init_ingest();
220
256
  ApiError = class extends Error {
221
- constructor(status, method, path3, body) {
222
- super(`${method} ${path3} -> ${status}: ${body}`);
257
+ constructor(status, method, path4, body) {
258
+ super(`${method} ${path4} -> ${status}: ${body}`);
223
259
  this.status = status;
224
260
  this.name = "ApiError";
225
261
  }