@withgateway/sdk 0.2.4 → 0.2.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/cli.js +4304 -2381
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +4266 -2343
- package/dist/cli.mjs.map +1 -1
- package/dist/files/index.js +56 -31
- package/dist/files/index.js.map +1 -1
- package/dist/files/index.mjs +52 -27
- package/dist/files/index.mjs.map +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +280 -8
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +272 -8
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/{index-1xnxt0Cc.d.ts → index-BO2SNSgy.d.ts} +12 -1
- package/dist/{index-B0R3IgsV.d.mts → index-BaKu5ZSU.d.mts} +124 -2
- package/dist/{index-B0R3IgsV.d.ts → index-BaKu5ZSU.d.ts} +124 -2
- package/dist/{index-C1wDEwH4.d.mts → index-Cz8Q6Keo.d.mts} +12 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1100 -438
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1079 -424
- package/dist/index.mjs.map +1 -1
- package/dist/traces/index.js +45 -20
- package/dist/traces/index.js.map +1 -1
- package/dist/traces/index.mjs +41 -16
- 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 +98 -61
- package/dist/tracing/index.js.map +1 -1
- package/dist/tracing/index.mjs +98 -61
- package/dist/tracing/index.mjs.map +1 -1
- package/dist/worlds/index.d.mts +179 -25
- package/dist/worlds/index.d.ts +179 -25
- package/dist/worlds/index.js +639 -284
- package/dist/worlds/index.js.map +1 -1
- package/dist/worlds/index.mjs +631 -276
- package/dist/worlds/index.mjs.map +1 -1
- package/package.json +2 -1
- package/runtime/gatewaysdk/environment/_bundle.py +15 -25
- package/runtime/gatewaysdk/environment/_materialize.py +53 -9
- package/runtime/gatewaysdk/environment/_toml.py +13 -0
- package/runtime/gatewaysdk/environment/schema/api.py +40 -25
- package/runtime/gatewaysdk/environment/schema/batch.py +15 -11
- package/runtime/gatewaysdk/environment/schema/bundle_runtime.py +24 -0
- package/runtime/gatewaysdk/environment/schema/compiler.py +60 -28
- package/runtime/gatewaysdk/environment/schema/conform.py +1 -1
- package/runtime/gatewaysdk/environment/schema/connector.py +1 -1
- package/runtime/gatewaysdk/environment/schema/connectors/google-drive/readers/merge.ingest.toml +25 -0
- package/runtime/gatewaysdk/environment/schema/connectors/google-drive/readers/merge.toml +17 -0
- package/runtime/gatewaysdk/environment/schema/data.py +21 -19
- package/runtime/gatewaysdk/environment/schema/extract.py +1 -5
- package/runtime/gatewaysdk/environment/schema/grading.py +225 -0
- package/runtime/gatewaysdk/environment/schema/host.py +156 -546
- package/runtime/gatewaysdk/environment/schema/host_surfaces.py +1 -5
- package/runtime/gatewaysdk/environment/schema/ingest.py +3 -11
- package/runtime/gatewaysdk/environment/schema/local.py +32 -126
- package/runtime/gatewaysdk/environment/schema/mapping.py +1 -1
- package/runtime/gatewaysdk/environment/schema/platform.py +30 -26
- package/runtime/gatewaysdk/environment/schema/proof.py +237 -0
- package/runtime/gatewaysdk/environment/schema/redaction.py +1 -1
- package/runtime/gatewaysdk/environment/schema/runtime.py +686 -0
- package/runtime/gatewaysdk/environment/schema/scaffold.py +9 -2
- package/runtime/gatewaysdk/environment/schema/skill.py +1 -0
- package/runtime/gatewaysdk/environment/schema/skills/benchmarks-getting-started/SKILL.md +67 -9
- package/runtime/gatewaysdk/environment/schema/skills/hooks-getting-started/SKILL.md +67 -6
- package/runtime/gatewaysdk/environment/schema/skills/world-data-ingestion/SKILL.md +4 -1
- package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/SKILL.md +11 -11
- package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/references/cli-mcp-map.md +17 -1
- package/runtime/gatewaysdk/environment/schema/snapshot.py +1 -5
- package/runtime/gatewaysdk/environment/schema/tools_world.py +71 -23
- package/runtime/gatewaysdk/environment/schema/ui.py +1 -5
- package/runtime/gatewaysdk/environment/schema/verbs.py +136 -0
- package/runtime/gatewaysdk/environment/schema/workers.py +14 -0
- package/runtime/gatewaysdk/environment/schema/world_tests.py +1 -1
- package/runtime/gatewaysdk/environment/world.py +507 -0
- package/skills/benchmarks-getting-started/SKILL.md +67 -9
- package/skills/connector-schema-authoring/connector-worlds.md +8 -1
- package/skills/connector-schema-authoring/world-schema.md +1 -1
- package/skills/hooks-getting-started/SKILL.md +67 -6
- package/skills/world-data-ingestion/SKILL.md +4 -1
- package/skills/worlds-getting-started/SKILL.md +11 -11
- package/skills/worlds-getting-started/references/cli-mcp-map.md +17 -1
package/dist/traces/index.js
CHANGED
|
@@ -93,17 +93,32 @@ var init_taskRun = __esm({
|
|
|
93
93
|
}
|
|
94
94
|
});
|
|
95
95
|
|
|
96
|
+
// src/worlds/worldDir.ts
|
|
97
|
+
var import_node_crypto3, fs2, path2, CONNECTOR_SPEC, WORLD_SCHEMA_MARKERS, WORLD_ROOT_MARKERS;
|
|
98
|
+
var init_worldDir = __esm({
|
|
99
|
+
"src/worlds/worldDir.ts"() {
|
|
100
|
+
"use strict";
|
|
101
|
+
import_node_crypto3 = require("crypto");
|
|
102
|
+
fs2 = __toESM(require("fs"));
|
|
103
|
+
path2 = __toESM(require("path"));
|
|
104
|
+
CONNECTOR_SPEC = "connector.toml";
|
|
105
|
+
WORLD_SCHEMA_MARKERS = ["schema/world.json", "schema/runtime.json", "schema/lock.json"];
|
|
106
|
+
WORLD_ROOT_MARKERS = [CONNECTOR_SPEC, ...WORLD_SCHEMA_MARKERS];
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
|
|
96
110
|
// src/worlds/hub.ts
|
|
97
|
-
var
|
|
111
|
+
var import_node_crypto4, import_node_zlib, fs3, path3, META_RELPATH;
|
|
98
112
|
var init_hub = __esm({
|
|
99
113
|
"src/worlds/hub.ts"() {
|
|
100
114
|
"use strict";
|
|
101
|
-
|
|
115
|
+
import_node_crypto4 = require("crypto");
|
|
102
116
|
import_node_zlib = require("zlib");
|
|
103
|
-
|
|
104
|
-
|
|
117
|
+
fs3 = __toESM(require("fs"));
|
|
118
|
+
path3 = __toESM(require("path"));
|
|
105
119
|
init_worlds();
|
|
106
|
-
|
|
120
|
+
init_worldDir();
|
|
121
|
+
META_RELPATH = path3.join(".gateway", ".env-metadata.json");
|
|
107
122
|
}
|
|
108
123
|
});
|
|
109
124
|
|
|
@@ -132,14 +147,15 @@ var init_json = __esm({
|
|
|
132
147
|
});
|
|
133
148
|
|
|
134
149
|
// src/worlds/transforms.ts
|
|
135
|
-
var
|
|
150
|
+
var import_node_crypto5, WHITESPACE, WHITESPACE_EDGES, WHITESPACE_RUN, NOT_DIGIT, STRIP_PREFIX, trim, emailLocalPart, emailDomain, hex, SIMPLE, TRANSFORMS;
|
|
136
151
|
var init_transforms = __esm({
|
|
137
152
|
"src/worlds/transforms.ts"() {
|
|
138
153
|
"use strict";
|
|
139
|
-
|
|
154
|
+
import_node_crypto5 = require("crypto");
|
|
140
155
|
init_json();
|
|
141
|
-
|
|
142
|
-
|
|
156
|
+
WHITESPACE = " \n\r\f\v";
|
|
157
|
+
WHITESPACE_EDGES = new RegExp(`^[${WHITESPACE}]+|[${WHITESPACE}]+$`, "g");
|
|
158
|
+
WHITESPACE_RUN = new RegExp(`[${WHITESPACE}]+`, "g");
|
|
143
159
|
NOT_DIGIT = /[^0-9]/g;
|
|
144
160
|
STRIP_PREFIX = "strip_prefix";
|
|
145
161
|
trim = (value) => value.replace(WHITESPACE_EDGES, "");
|
|
@@ -151,7 +167,7 @@ var init_transforms = __esm({
|
|
|
151
167
|
const at = value.lastIndexOf("@");
|
|
152
168
|
return at === -1 ? "" : value.slice(at + 1).toLowerCase();
|
|
153
169
|
};
|
|
154
|
-
hex = (algorithm, value) => (0,
|
|
170
|
+
hex = (algorithm, value) => (0, import_node_crypto5.createHash)(algorithm).update(value, "utf8").digest("hex");
|
|
155
171
|
SIMPLE = {
|
|
156
172
|
lower: (value) => value.toLowerCase(),
|
|
157
173
|
upper: (value) => value.toUpperCase(),
|
|
@@ -171,11 +187,11 @@ var init_transforms = __esm({
|
|
|
171
187
|
});
|
|
172
188
|
|
|
173
189
|
// src/worlds/redaction.ts
|
|
174
|
-
var
|
|
190
|
+
var import_node_crypto6;
|
|
175
191
|
var init_redaction = __esm({
|
|
176
192
|
"src/worlds/redaction.ts"() {
|
|
177
193
|
"use strict";
|
|
178
|
-
|
|
194
|
+
import_node_crypto6 = require("crypto");
|
|
179
195
|
init_json();
|
|
180
196
|
init_transforms();
|
|
181
197
|
}
|
|
@@ -198,13 +214,21 @@ var init_migrate = __esm({
|
|
|
198
214
|
});
|
|
199
215
|
|
|
200
216
|
// src/worlds/ingest.ts
|
|
201
|
-
var
|
|
217
|
+
var fs4, os, path4;
|
|
202
218
|
var init_ingest = __esm({
|
|
203
219
|
"src/worlds/ingest.ts"() {
|
|
204
220
|
"use strict";
|
|
205
|
-
|
|
221
|
+
fs4 = __toESM(require("fs"));
|
|
206
222
|
os = __toESM(require("os"));
|
|
207
|
-
|
|
223
|
+
path4 = __toESM(require("path"));
|
|
224
|
+
init_worlds();
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
// src/worlds/sandbox.ts
|
|
229
|
+
var init_sandbox = __esm({
|
|
230
|
+
"src/worlds/sandbox.ts"() {
|
|
231
|
+
"use strict";
|
|
208
232
|
init_worlds();
|
|
209
233
|
}
|
|
210
234
|
});
|
|
@@ -221,9 +245,9 @@ function resolveEnv(options) {
|
|
|
221
245
|
}
|
|
222
246
|
return { host: host.replace(/\/+$/, ""), publicKey, secretKey };
|
|
223
247
|
}
|
|
224
|
-
async function apiRequest(options, method,
|
|
248
|
+
async function apiRequest(options, method, path5, body) {
|
|
225
249
|
const { host, publicKey, secretKey } = resolveEnv(options);
|
|
226
|
-
const res = await fetch(`${host}${
|
|
250
|
+
const res = await fetch(`${host}${path5}`, {
|
|
227
251
|
method,
|
|
228
252
|
headers: {
|
|
229
253
|
"content-type": "application/json",
|
|
@@ -232,7 +256,7 @@ async function apiRequest(options, method, path4, body) {
|
|
|
232
256
|
...body === void 0 ? {} : { body: JSON.stringify(body) }
|
|
233
257
|
});
|
|
234
258
|
const text = await res.text();
|
|
235
|
-
if (!res.ok) throw new ApiError(res.status, method,
|
|
259
|
+
if (!res.ok) throw new ApiError(res.status, method, path5, text.slice(0, 400));
|
|
236
260
|
return JSON.parse(text);
|
|
237
261
|
}
|
|
238
262
|
var ApiError;
|
|
@@ -253,9 +277,10 @@ var init_worlds = __esm({
|
|
|
253
277
|
init_query();
|
|
254
278
|
init_migrate();
|
|
255
279
|
init_ingest();
|
|
280
|
+
init_sandbox();
|
|
256
281
|
ApiError = class extends Error {
|
|
257
|
-
constructor(status, method,
|
|
258
|
-
super(`${method} ${
|
|
282
|
+
constructor(status, method, path5, body) {
|
|
283
|
+
super(`${method} ${path5} -> ${status}: ${body}`);
|
|
259
284
|
this.status = status;
|
|
260
285
|
this.name = "ApiError";
|
|
261
286
|
}
|