@withgateway/sdk 0.4.0 → 0.6.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.
- package/dist/cli.js +1128 -783
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +1130 -785
- package/dist/cli.mjs.map +1 -1
- package/dist/files/index.js +47 -18
- package/dist/files/index.js.map +1 -1
- package/dist/files/index.mjs +47 -18
- package/dist/files/index.mjs.map +1 -1
- package/dist/{index-mJhG3vZU.d.mts → index-Di9nNqOY.d.mts} +26 -3
- package/dist/{index-DUHmS74p.d.ts → index-LA-PMRJT.d.ts} +26 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +179 -43
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +176 -43
- package/dist/index.mjs.map +1 -1
- package/dist/replay/index.d.mts +1 -1
- package/dist/replay/index.d.ts +1 -1
- package/dist/replay/index.js.map +1 -1
- package/dist/replay/index.mjs.map +1 -1
- package/dist/traces/index.js +47 -18
- package/dist/traces/index.js.map +1 -1
- package/dist/traces/index.mjs +47 -18
- 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 +1 -1
- package/dist/tracing/index.js.map +1 -1
- package/dist/tracing/index.mjs +1 -1
- package/dist/tracing/index.mjs.map +1 -1
- package/dist/worlds/index.d.mts +184 -85
- package/dist/worlds/index.d.ts +184 -85
- package/dist/worlds/index.js +176 -43
- package/dist/worlds/index.js.map +1 -1
- package/dist/worlds/index.mjs +176 -43
- package/dist/worlds/index.mjs.map +1 -1
- package/package.json +1 -1
- package/runtime/gatewaysdk/environment/_bundle.py +4 -6
- package/runtime/gatewaysdk/environment/_world.py +24 -1
- package/runtime/gatewaysdk/environment/runtime.py +45 -2
- package/runtime/gatewaysdk/environment/schema/api.py +24 -3
- package/runtime/gatewaysdk/environment/schema/bundle_runtime.py +1 -0
- package/runtime/gatewaysdk/environment/schema/call_capture.py +13 -1
- package/runtime/gatewaysdk/environment/schema/call_log.py +46 -0
- package/runtime/gatewaysdk/environment/schema/call_redaction.py +6 -0
- package/runtime/gatewaysdk/environment/schema/compiler.py +4 -1
- package/runtime/gatewaysdk/environment/schema/conform.py +32 -8
- package/runtime/gatewaysdk/environment/schema/connector.py +5 -0
- package/runtime/gatewaysdk/environment/schema/connectors/custom/handlers.py +2 -1
- package/runtime/gatewaysdk/environment/schema/connectors/github/api/handlers.py +217 -58
- package/runtime/gatewaysdk/environment/schema/connectors/github/connector.toml +9 -19
- package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_webhooks.json +10 -2
- package/runtime/gatewaysdk/environment/schema/connectors/github/tests/webhooks.json +47 -0
- package/runtime/gatewaysdk/environment/schema/connectors/github/world.json +21 -0
- package/runtime/gatewaysdk/environment/schema/connectors/jamf/api/handlers.py +185 -18
- package/runtime/gatewaysdk/environment/schema/connectors/jamf/connector.toml +29 -14
- package/runtime/gatewaysdk/environment/schema/connectors/jamf/provenance.json +43 -12
- package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_webhooks.json +2 -2
- package/runtime/gatewaysdk/environment/schema/connectors/jamf/scope.toml +4 -17
- package/runtime/gatewaysdk/environment/schema/connectors/jamf/tests/webhooks.json +107 -0
- package/runtime/gatewaysdk/environment/schema/connectors/jamf/vendor-openapi.json +1 -1
- package/runtime/gatewaysdk/environment/schema/connectors/linear/api/handlers.py +85 -1
- package/runtime/gatewaysdk/environment/schema/connectors/linear/connector.toml +19 -31
- package/runtime/gatewaysdk/environment/schema/connectors/linear/provenance.json +18 -8
- package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/webhooks.json +19 -3
- package/runtime/gatewaysdk/environment/schema/connectors/linear/tests/test_webhooks.py +71 -0
- package/runtime/gatewaysdk/environment/schema/database/guard.py +2 -1
- package/runtime/gatewaysdk/environment/schema/handler_errors.py +27 -1
- package/runtime/gatewaysdk/environment/schema/journal.py +4 -3
- package/runtime/gatewaysdk/environment/schema/local.py +1 -0
- package/runtime/gatewaysdk/environment/schema/openapi_schemas.py +20 -5
- package/runtime/gatewaysdk/environment/schema/platform.py +16 -219
- package/runtime/gatewaysdk/environment/schema/runtime.py +7 -0
- package/runtime/gatewaysdk/environment/schema/scaffold.py +2 -1
- package/runtime/gatewaysdk/environment/schema/skills/connector-schema-authoring/CONNECTORS.md +3 -3
- package/runtime/gatewaysdk/environment/schema/skills/connector-schema-authoring/SKILL.md +19 -22
- package/runtime/gatewaysdk/environment/schema/skills/world-data-ingestion/SKILL.md +7 -9
- package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/SKILL.md +3 -3
- package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/references/cli-mcp-map.md +14 -11
- package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/references/gotchas.md +36 -5
- package/runtime/gatewaysdk/environment/schema/snapshot.py +2 -2
- package/runtime/gatewaysdk/environment/schema/tools_world.py +19 -0
- package/runtime/gatewaysdk/environment/schema/verbs.py +6 -0
- package/runtime/gatewaysdk/environment/schema/webhooks.py +687 -0
- package/runtime/gatewaysdk/environment/schema/world_host.py +20 -3
- package/runtime/gatewaysdk/environment/schema/world_tests.py +74 -0
- package/skills/connector-schema-authoring/CONNECTORS.md +3 -3
- package/skills/connector-schema-authoring/SKILL.md +19 -22
- package/skills/connector-schema-authoring/connector-worlds.md +153 -11
- package/skills/connector-schema-authoring/world-schema.md +7 -6
- package/skills/world-data-ingestion/SKILL.md +7 -9
- package/skills/worlds-getting-started/SKILL.md +3 -3
- package/skills/worlds-getting-started/references/cli-mcp-map.md +14 -11
- package/skills/worlds-getting-started/references/gotchas.md +36 -5
package/dist/traces/index.mjs
CHANGED
|
@@ -1067,7 +1067,7 @@ function click(button, count) {
|
|
|
1067
1067
|
modifiers: modifierChord(raw.text)
|
|
1068
1068
|
});
|
|
1069
1069
|
}
|
|
1070
|
-
var SCROLL_STEP_PX, NOT_EXECUTED, MAX_ERROR2, SCROLL_DIRECTIONS, MEMBERS, AnthropicComputer, AnthropicComputer20251124;
|
|
1070
|
+
var SCROLL_STEP_PX, NOT_EXECUTED, MAX_ERROR2, SCROLL_DIRECTIONS, IMAGE_PARTS, MEMBERS, AnthropicComputer, AnthropicComputer20251124;
|
|
1071
1071
|
var init_anthropic = __esm({
|
|
1072
1072
|
"src/worlds/nativeComputer/anthropic.ts"() {
|
|
1073
1073
|
"use strict";
|
|
@@ -1083,6 +1083,14 @@ var init_anthropic = __esm({
|
|
|
1083
1083
|
left: [-1, 0],
|
|
1084
1084
|
right: [1, 0]
|
|
1085
1085
|
};
|
|
1086
|
+
IMAGE_PARTS = {
|
|
1087
|
+
6: (data) => ({ type: "image-data", data, mediaType: "image/png" }),
|
|
1088
|
+
7: (data) => ({
|
|
1089
|
+
type: "file",
|
|
1090
|
+
mediaType: "image/png",
|
|
1091
|
+
data: { type: "data", data }
|
|
1092
|
+
})
|
|
1093
|
+
};
|
|
1086
1094
|
MEMBERS = {
|
|
1087
1095
|
screenshot: () => new ComputerAction("screenshot"),
|
|
1088
1096
|
zoom: (raw) => new ComputerAction("zoom", {
|
|
@@ -1192,15 +1200,17 @@ var init_anthropic = __esm({
|
|
|
1192
1200
|
];
|
|
1193
1201
|
return [{ type: "text", text: result.text ?? "OK" }];
|
|
1194
1202
|
}
|
|
1195
|
-
/** For `anthropic.tools.computerToolset_20260801(
|
|
1196
|
-
* (or `computer_20251124` with the legacy kind
|
|
1197
|
-
* and returns `{ type: "image", data }` or
|
|
1198
|
-
* into the tool result
|
|
1203
|
+
/** For `anthropic.tools.computerToolset_20260801(computer.aiSdk({ version: 7 }))`
|
|
1204
|
+
* (AI SDK 7 only), or `computer_20251124` with the legacy kind (AI SDK 6
|
|
1205
|
+
* and 7): `execute` runs one action and returns `{ type: "image", data }` or
|
|
1206
|
+
* text; `toModelOutput` turns that into the tool result in the part shape
|
|
1207
|
+
* of `options.version`. Calls run one at a time, and once a call fails the
|
|
1199
1208
|
* rest of that step's calls answer as not executed. */
|
|
1200
|
-
aiSdk() {
|
|
1209
|
+
aiSdk(options = {}) {
|
|
1210
|
+
const imagePart = _AnthropicComputer.imagePart(options);
|
|
1201
1211
|
let failedStep;
|
|
1202
|
-
const execute = (input,
|
|
1203
|
-
const step =
|
|
1212
|
+
const execute = (input, options2) => this.serial(async () => {
|
|
1213
|
+
const step = options2?.messages?.length;
|
|
1204
1214
|
if (step !== void 0 && step === failedStep)
|
|
1205
1215
|
throw new Error(NOT_EXECUTED);
|
|
1206
1216
|
try {
|
|
@@ -1212,7 +1222,7 @@ var init_anthropic = __esm({
|
|
|
1212
1222
|
});
|
|
1213
1223
|
return {
|
|
1214
1224
|
execute,
|
|
1215
|
-
toModelOutput: ({ output }) => _AnthropicComputer.
|
|
1225
|
+
toModelOutput: ({ output }) => _AnthropicComputer.modelOutput(output, imagePart)
|
|
1216
1226
|
};
|
|
1217
1227
|
}
|
|
1218
1228
|
static aiSdkOutput(result) {
|
|
@@ -1220,16 +1230,26 @@ var init_anthropic = __esm({
|
|
|
1220
1230
|
return { type: "image", data: result.image.toString("base64") };
|
|
1221
1231
|
return result.text ?? "OK";
|
|
1222
1232
|
}
|
|
1223
|
-
/**
|
|
1224
|
-
*
|
|
1225
|
-
|
|
1233
|
+
/** A screenshot as the image part of AI SDK `options.version`:
|
|
1234
|
+
* `image-data` for 6 (the default), `file` with `{ type: "data", data }`
|
|
1235
|
+
* for 7. */
|
|
1236
|
+
static aiSdkModelOutput(output, options = {}) {
|
|
1237
|
+
return _AnthropicComputer.modelOutput(
|
|
1238
|
+
output,
|
|
1239
|
+
_AnthropicComputer.imagePart(options)
|
|
1240
|
+
);
|
|
1241
|
+
}
|
|
1242
|
+
static imagePart({
|
|
1243
|
+
version = 6
|
|
1244
|
+
}) {
|
|
1245
|
+
if (Object.hasOwn(IMAGE_PARTS, version)) return IMAGE_PARTS[version];
|
|
1246
|
+
throw new Error(
|
|
1247
|
+
`unsupported AI SDK version ${version}; choose ${Object.keys(IMAGE_PARTS).join(" or ")}`
|
|
1248
|
+
);
|
|
1249
|
+
}
|
|
1250
|
+
static modelOutput(output, imagePart) {
|
|
1226
1251
|
if (typeof output === "string") return { type: "text", value: output };
|
|
1227
|
-
return {
|
|
1228
|
-
type: "content",
|
|
1229
|
-
value: [
|
|
1230
|
-
{ type: "image-data", data: output.data, mediaType: "image/png" }
|
|
1231
|
-
]
|
|
1232
|
-
};
|
|
1252
|
+
return { type: "content", value: [imagePart(output.data)] };
|
|
1233
1253
|
}
|
|
1234
1254
|
envelope(block, content, isError = false) {
|
|
1235
1255
|
return {
|
|
@@ -1755,6 +1775,14 @@ var init_requestLog = __esm({
|
|
|
1755
1775
|
}
|
|
1756
1776
|
});
|
|
1757
1777
|
|
|
1778
|
+
// src/worlds/webhooks.ts
|
|
1779
|
+
var init_webhooks = __esm({
|
|
1780
|
+
"src/worlds/webhooks.ts"() {
|
|
1781
|
+
"use strict";
|
|
1782
|
+
init_worlds();
|
|
1783
|
+
}
|
|
1784
|
+
});
|
|
1785
|
+
|
|
1758
1786
|
// src/worlds/checkoutTarget.ts
|
|
1759
1787
|
import * as fs2 from "fs";
|
|
1760
1788
|
import * as path3 from "path";
|
|
@@ -1998,6 +2026,7 @@ var init_worlds = __esm({
|
|
|
1998
2026
|
init_surfaceDescriptor();
|
|
1999
2027
|
init_requestLog();
|
|
2000
2028
|
init_requestLedger();
|
|
2029
|
+
init_webhooks();
|
|
2001
2030
|
init_browserReconnect();
|
|
2002
2031
|
init_nativeComputer();
|
|
2003
2032
|
init_hub();
|