@airtop/sdk 1.0.0-alpha2.24 → 1.0.0-alpha2.26
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/index.cjs +39 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -5
- package/dist/index.d.ts +26 -5
- package/dist/index.js +39 -19
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
@@ -9,7 +9,7 @@ var require_package = __commonJS({
|
|
9
9
|
module.exports = {
|
10
10
|
name: "@airtop/sdk",
|
11
11
|
description: "Airtop SDK for TypeScript",
|
12
|
-
version: "1.0.0-alpha2.
|
12
|
+
version: "1.0.0-alpha2.26",
|
13
13
|
type: "module",
|
14
14
|
main: "./dist/index.cjs",
|
15
15
|
module: "./dist/index.js",
|
@@ -47,16 +47,16 @@ var require_package = __commonJS({
|
|
47
47
|
"verify-types": "tsc --noEmit && tsc --noEmit --project tsconfig.e2e.json"
|
48
48
|
},
|
49
49
|
dependencies: {
|
50
|
+
"@airtop/core": "0.1.0-alpha.42",
|
50
51
|
"@airtop/json-schema-adapter": "workspace:*",
|
51
|
-
"@airtop/core": "0.1.0-alpha.40",
|
52
52
|
"date-fns": "4.1.0",
|
53
|
-
loglayer: "6.
|
53
|
+
loglayer: "6.7.0",
|
54
54
|
"serialize-error": "12.0.0",
|
55
55
|
uuid: "11.1.0"
|
56
56
|
},
|
57
57
|
devDependencies: {
|
58
|
-
"@biomejs/biome": "2.2.
|
59
|
-
"@dotenvx/dotenvx": "1.
|
58
|
+
"@biomejs/biome": "2.2.4",
|
59
|
+
"@dotenvx/dotenvx": "1.49.1",
|
60
60
|
"@internal/tsconfig": "workspace:*",
|
61
61
|
"deep-utility-types": "1.3.1",
|
62
62
|
"env-var": "7.5.0",
|
@@ -80,7 +80,7 @@ var require_package = __commonJS({
|
|
80
80
|
optionalDependencies: {
|
81
81
|
"@airtop/json-schema-adapter-zod": "workspace:*"
|
82
82
|
},
|
83
|
-
packageManager: "pnpm@10.
|
83
|
+
packageManager: "pnpm@10.17.0"
|
84
84
|
};
|
85
85
|
}
|
86
86
|
});
|
@@ -1261,18 +1261,38 @@ var AirtopSessionClient = class extends AirtopBase {
|
|
1261
1261
|
);
|
1262
1262
|
}
|
1263
1263
|
/**
|
1264
|
-
*
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1264
|
+
* Implementation for the overloaded service method.
|
1265
|
+
*/
|
1266
|
+
async service(promptOrArgs, serviceOrRequestOptions, requestOptions = {}) {
|
1267
|
+
if (typeof promptOrArgs === "string") {
|
1268
|
+
const prompt = promptOrArgs;
|
1269
|
+
const service = typeof serviceOrRequestOptions === "string" ? serviceOrRequestOptions : void 0;
|
1270
|
+
const options = typeof serviceOrRequestOptions === "object" ? serviceOrRequestOptions : requestOptions;
|
1271
|
+
this.log.withMetadata({ prompt }).info("Service");
|
1272
|
+
const parameters = { prompt, services: service };
|
1273
|
+
const body = { parameters };
|
1274
|
+
return withRequestCompletionPolling(
|
1275
|
+
this.client,
|
1276
|
+
() => this.client.sessions.service(this.sessionId, body),
|
1277
|
+
options
|
1278
|
+
);
|
1279
|
+
} else {
|
1280
|
+
const parameters = promptOrArgs;
|
1281
|
+
const options = serviceOrRequestOptions || {};
|
1282
|
+
this.log.withMetadata({ parameters }).info("Service");
|
1283
|
+
const body = {
|
1284
|
+
parameters: {
|
1285
|
+
prompt: parameters.prompt,
|
1286
|
+
services: parameters.services,
|
1287
|
+
outputSchema: parameters.outputSchema ? this.convertToJsonSchema(parameters.outputSchema) : void 0
|
1288
|
+
}
|
1289
|
+
};
|
1290
|
+
return withRequestCompletionPolling(
|
1291
|
+
this.client,
|
1292
|
+
() => this.client.sessions.service(this.sessionId, body),
|
1293
|
+
options
|
1294
|
+
);
|
1295
|
+
}
|
1276
1296
|
}
|
1277
1297
|
/**
|
1278
1298
|
* Retrieves the list of connected services available for the current session.
|
@@ -1731,7 +1751,7 @@ var AirtopAgentClient = class extends AirtopBase {
|
|
1731
1751
|
*/
|
1732
1752
|
async createNewAgentDraftVersion(agentId, requestOptions = {}) {
|
1733
1753
|
this.log.withMetadata({ agentId }).info("Creating new draft version of agent");
|
1734
|
-
return this.client.agents.createAgentDraft(agentId, this.resolveRequestOptions(requestOptions));
|
1754
|
+
return this.client.agents.createAgentDraft(agentId, {}, this.resolveRequestOptions(requestOptions));
|
1735
1755
|
}
|
1736
1756
|
/**
|
1737
1757
|
* Publishes a new version of an agent from the current draft.
|