@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/files/index.js
CHANGED
|
@@ -1086,7 +1086,7 @@ function click(button, count) {
|
|
|
1086
1086
|
modifiers: modifierChord(raw.text)
|
|
1087
1087
|
});
|
|
1088
1088
|
}
|
|
1089
|
-
var SCROLL_STEP_PX, NOT_EXECUTED, MAX_ERROR2, SCROLL_DIRECTIONS, MEMBERS, AnthropicComputer, AnthropicComputer20251124;
|
|
1089
|
+
var SCROLL_STEP_PX, NOT_EXECUTED, MAX_ERROR2, SCROLL_DIRECTIONS, IMAGE_PARTS, MEMBERS, AnthropicComputer, AnthropicComputer20251124;
|
|
1090
1090
|
var init_anthropic = __esm({
|
|
1091
1091
|
"src/worlds/nativeComputer/anthropic.ts"() {
|
|
1092
1092
|
"use strict";
|
|
@@ -1102,6 +1102,14 @@ var init_anthropic = __esm({
|
|
|
1102
1102
|
left: [-1, 0],
|
|
1103
1103
|
right: [1, 0]
|
|
1104
1104
|
};
|
|
1105
|
+
IMAGE_PARTS = {
|
|
1106
|
+
6: (data) => ({ type: "image-data", data, mediaType: "image/png" }),
|
|
1107
|
+
7: (data) => ({
|
|
1108
|
+
type: "file",
|
|
1109
|
+
mediaType: "image/png",
|
|
1110
|
+
data: { type: "data", data }
|
|
1111
|
+
})
|
|
1112
|
+
};
|
|
1105
1113
|
MEMBERS = {
|
|
1106
1114
|
screenshot: () => new ComputerAction("screenshot"),
|
|
1107
1115
|
zoom: (raw) => new ComputerAction("zoom", {
|
|
@@ -1211,15 +1219,17 @@ var init_anthropic = __esm({
|
|
|
1211
1219
|
];
|
|
1212
1220
|
return [{ type: "text", text: result.text ?? "OK" }];
|
|
1213
1221
|
}
|
|
1214
|
-
/** For `anthropic.tools.computerToolset_20260801(
|
|
1215
|
-
* (or `computer_20251124` with the legacy kind
|
|
1216
|
-
* and returns `{ type: "image", data }` or
|
|
1217
|
-
* into the tool result
|
|
1222
|
+
/** For `anthropic.tools.computerToolset_20260801(computer.aiSdk({ version: 7 }))`
|
|
1223
|
+
* (AI SDK 7 only), or `computer_20251124` with the legacy kind (AI SDK 6
|
|
1224
|
+
* and 7): `execute` runs one action and returns `{ type: "image", data }` or
|
|
1225
|
+
* text; `toModelOutput` turns that into the tool result in the part shape
|
|
1226
|
+
* of `options.version`. Calls run one at a time, and once a call fails the
|
|
1218
1227
|
* rest of that step's calls answer as not executed. */
|
|
1219
|
-
aiSdk() {
|
|
1228
|
+
aiSdk(options = {}) {
|
|
1229
|
+
const imagePart = _AnthropicComputer.imagePart(options);
|
|
1220
1230
|
let failedStep;
|
|
1221
|
-
const execute = (input,
|
|
1222
|
-
const step =
|
|
1231
|
+
const execute = (input, options2) => this.serial(async () => {
|
|
1232
|
+
const step = options2?.messages?.length;
|
|
1223
1233
|
if (step !== void 0 && step === failedStep)
|
|
1224
1234
|
throw new Error(NOT_EXECUTED);
|
|
1225
1235
|
try {
|
|
@@ -1231,7 +1241,7 @@ var init_anthropic = __esm({
|
|
|
1231
1241
|
});
|
|
1232
1242
|
return {
|
|
1233
1243
|
execute,
|
|
1234
|
-
toModelOutput: ({ output }) => _AnthropicComputer.
|
|
1244
|
+
toModelOutput: ({ output }) => _AnthropicComputer.modelOutput(output, imagePart)
|
|
1235
1245
|
};
|
|
1236
1246
|
}
|
|
1237
1247
|
static aiSdkOutput(result) {
|
|
@@ -1239,16 +1249,26 @@ var init_anthropic = __esm({
|
|
|
1239
1249
|
return { type: "image", data: result.image.toString("base64") };
|
|
1240
1250
|
return result.text ?? "OK";
|
|
1241
1251
|
}
|
|
1242
|
-
/**
|
|
1243
|
-
*
|
|
1244
|
-
|
|
1252
|
+
/** A screenshot as the image part of AI SDK `options.version`:
|
|
1253
|
+
* `image-data` for 6 (the default), `file` with `{ type: "data", data }`
|
|
1254
|
+
* for 7. */
|
|
1255
|
+
static aiSdkModelOutput(output, options = {}) {
|
|
1256
|
+
return _AnthropicComputer.modelOutput(
|
|
1257
|
+
output,
|
|
1258
|
+
_AnthropicComputer.imagePart(options)
|
|
1259
|
+
);
|
|
1260
|
+
}
|
|
1261
|
+
static imagePart({
|
|
1262
|
+
version = 6
|
|
1263
|
+
}) {
|
|
1264
|
+
if (Object.hasOwn(IMAGE_PARTS, version)) return IMAGE_PARTS[version];
|
|
1265
|
+
throw new Error(
|
|
1266
|
+
`unsupported AI SDK version ${version}; choose ${Object.keys(IMAGE_PARTS).join(" or ")}`
|
|
1267
|
+
);
|
|
1268
|
+
}
|
|
1269
|
+
static modelOutput(output, imagePart) {
|
|
1245
1270
|
if (typeof output === "string") return { type: "text", value: output };
|
|
1246
|
-
return {
|
|
1247
|
-
type: "content",
|
|
1248
|
-
value: [
|
|
1249
|
-
{ type: "image-data", data: output.data, mediaType: "image/png" }
|
|
1250
|
-
]
|
|
1251
|
-
};
|
|
1271
|
+
return { type: "content", value: [imagePart(output.data)] };
|
|
1252
1272
|
}
|
|
1253
1273
|
envelope(block, content, isError = false) {
|
|
1254
1274
|
return {
|
|
@@ -1778,6 +1798,14 @@ var init_requestLog = __esm({
|
|
|
1778
1798
|
}
|
|
1779
1799
|
});
|
|
1780
1800
|
|
|
1801
|
+
// src/worlds/webhooks.ts
|
|
1802
|
+
var init_webhooks = __esm({
|
|
1803
|
+
"src/worlds/webhooks.ts"() {
|
|
1804
|
+
"use strict";
|
|
1805
|
+
init_worlds();
|
|
1806
|
+
}
|
|
1807
|
+
});
|
|
1808
|
+
|
|
1781
1809
|
// src/worlds/checkoutTarget.ts
|
|
1782
1810
|
var fs2, path3;
|
|
1783
1811
|
var init_checkoutTarget = __esm({
|
|
@@ -2025,6 +2053,7 @@ var init_worlds = __esm({
|
|
|
2025
2053
|
init_surfaceDescriptor();
|
|
2026
2054
|
init_requestLog();
|
|
2027
2055
|
init_requestLedger();
|
|
2056
|
+
init_webhooks();
|
|
2028
2057
|
init_browserReconnect();
|
|
2029
2058
|
init_nativeComputer();
|
|
2030
2059
|
init_hub();
|