@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.
- package/dist/cli.js +12557 -5244
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +12557 -5244
- package/dist/cli.mjs.map +1 -1
- package/dist/files/index.js +65 -29
- package/dist/files/index.js.map +1 -1
- package/dist/files/index.mjs +53 -18
- package/dist/files/index.mjs.map +1 -1
- package/dist/hooks/index.d.mts +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +4355 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/index.mjs +4243 -0
- package/dist/hooks/index.mjs.map +1 -0
- package/dist/{index-Dpo-t8iO.d.ts → index-1xnxt0Cc.d.ts} +58 -2
- package/dist/index-B0R3IgsV.d.mts +1279 -0
- package/dist/index-B0R3IgsV.d.ts +1279 -0
- package/dist/{index-B5HUQQDE.d.mts → index-C1wDEwH4.d.mts} +58 -2
- package/dist/index.d.mts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +6538 -1549
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6628 -1652
- package/dist/index.mjs.map +1 -1
- package/dist/traces/index.js +54 -18
- package/dist/traces/index.js.map +1 -1
- package/dist/traces/index.mjs +45 -10
- package/dist/traces/index.mjs.map +1 -1
- package/dist/tracing/index.d.mts +1 -1
- package/dist/tracing/index.d.ts +1 -1
- package/dist/tracing/index.js +46 -3
- package/dist/tracing/index.js.map +1 -1
- package/dist/tracing/index.mjs +41 -2
- package/dist/tracing/index.mjs.map +1 -1
- package/dist/worlds/index.d.mts +365 -6
- package/dist/worlds/index.d.ts +365 -6
- package/dist/worlds/index.js +2037 -216
- package/dist/worlds/index.js.map +1 -1
- package/dist/worlds/index.mjs +2026 -205
- package/dist/worlds/index.mjs.map +1 -1
- package/package.json +6 -1
- package/runtime/gatewaysdk/environment/_materialize.py +3 -3
- package/runtime/gatewaysdk/environment/schema/api.py +116 -2
- package/runtime/gatewaysdk/environment/schema/compiler.py +14 -0
- package/runtime/gatewaysdk/environment/schema/host.py +37 -11
- package/runtime/gatewaysdk/environment/schema/skills/hooks-getting-started/SKILL.md +154 -0
- package/runtime/gatewaysdk/environment/schema/snapshot.py +6 -5
- package/runtime/gatewaysdk/environment/schema/tasks.py +12 -2
- package/runtime/gatewaysdk/environment/schema/workers.py +30 -13
- package/skills/hooks-getting-started/SKILL.md +154 -0
package/dist/traces/index.mjs
CHANGED
|
@@ -35,17 +35,49 @@ var init_tasks = __esm({
|
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
+
// src/worlds/taskSessions.ts
|
|
39
|
+
var init_taskSessions = __esm({
|
|
40
|
+
"src/worlds/taskSessions.ts"() {
|
|
41
|
+
"use strict";
|
|
42
|
+
init_worlds();
|
|
43
|
+
init_browser();
|
|
44
|
+
init_session();
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
// src/worlds/evals.ts
|
|
49
|
+
var init_evals = __esm({
|
|
50
|
+
"src/worlds/evals.ts"() {
|
|
51
|
+
"use strict";
|
|
52
|
+
init_worlds();
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
// src/worlds/taskRun.ts
|
|
57
|
+
import { randomBytes } from "crypto";
|
|
58
|
+
import * as fs from "fs";
|
|
59
|
+
import * as path from "path";
|
|
60
|
+
var init_taskRun = __esm({
|
|
61
|
+
"src/worlds/taskRun.ts"() {
|
|
62
|
+
"use strict";
|
|
63
|
+
init_browser();
|
|
64
|
+
init_evals();
|
|
65
|
+
init_session();
|
|
66
|
+
init_taskSessions();
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
|
|
38
70
|
// src/worlds/hub.ts
|
|
39
71
|
import { createHash } from "crypto";
|
|
40
72
|
import { gzipSync, gunzipSync } from "zlib";
|
|
41
|
-
import * as
|
|
42
|
-
import * as
|
|
73
|
+
import * as fs2 from "fs";
|
|
74
|
+
import * as path2 from "path";
|
|
43
75
|
var META_RELPATH;
|
|
44
76
|
var init_hub = __esm({
|
|
45
77
|
"src/worlds/hub.ts"() {
|
|
46
78
|
"use strict";
|
|
47
79
|
init_worlds();
|
|
48
|
-
META_RELPATH =
|
|
80
|
+
META_RELPATH = path2.join(".gateway", ".env-metadata.json");
|
|
49
81
|
}
|
|
50
82
|
});
|
|
51
83
|
|
|
@@ -139,9 +171,9 @@ var init_migrate = __esm({
|
|
|
139
171
|
});
|
|
140
172
|
|
|
141
173
|
// src/worlds/ingest.ts
|
|
142
|
-
import * as
|
|
174
|
+
import * as fs3 from "fs";
|
|
143
175
|
import * as os from "os";
|
|
144
|
-
import * as
|
|
176
|
+
import * as path3 from "path";
|
|
145
177
|
var init_ingest = __esm({
|
|
146
178
|
"src/worlds/ingest.ts"() {
|
|
147
179
|
"use strict";
|
|
@@ -161,9 +193,9 @@ function resolveEnv(options) {
|
|
|
161
193
|
}
|
|
162
194
|
return { host: host.replace(/\/+$/, ""), publicKey, secretKey };
|
|
163
195
|
}
|
|
164
|
-
async function apiRequest(options, method,
|
|
196
|
+
async function apiRequest(options, method, path4, body) {
|
|
165
197
|
const { host, publicKey, secretKey } = resolveEnv(options);
|
|
166
|
-
const res = await fetch(`${host}${
|
|
198
|
+
const res = await fetch(`${host}${path4}`, {
|
|
167
199
|
method,
|
|
168
200
|
headers: {
|
|
169
201
|
"content-type": "application/json",
|
|
@@ -172,7 +204,7 @@ async function apiRequest(options, method, path3, body) {
|
|
|
172
204
|
...body === void 0 ? {} : { body: JSON.stringify(body) }
|
|
173
205
|
});
|
|
174
206
|
const text = await res.text();
|
|
175
|
-
if (!res.ok) throw new ApiError(res.status, method,
|
|
207
|
+
if (!res.ok) throw new ApiError(res.status, method, path4, text.slice(0, 400));
|
|
176
208
|
return JSON.parse(text);
|
|
177
209
|
}
|
|
178
210
|
var ApiError;
|
|
@@ -181,6 +213,9 @@ var init_worlds = __esm({
|
|
|
181
213
|
"use strict";
|
|
182
214
|
init_session();
|
|
183
215
|
init_tasks();
|
|
216
|
+
init_taskSessions();
|
|
217
|
+
init_taskRun();
|
|
218
|
+
init_evals();
|
|
184
219
|
init_browser();
|
|
185
220
|
init_hub();
|
|
186
221
|
init_validate();
|
|
@@ -191,8 +226,8 @@ var init_worlds = __esm({
|
|
|
191
226
|
init_migrate();
|
|
192
227
|
init_ingest();
|
|
193
228
|
ApiError = class extends Error {
|
|
194
|
-
constructor(status, method,
|
|
195
|
-
super(`${method} ${
|
|
229
|
+
constructor(status, method, path4, body) {
|
|
230
|
+
super(`${method} ${path4} -> ${status}: ${body}`);
|
|
196
231
|
this.status = status;
|
|
197
232
|
this.name = "ApiError";
|
|
198
233
|
}
|