@athenaintel/sdk 4.3.2264 → 4.3.2266
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/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/assets/client/Client.d.ts +45 -1
- package/dist/cjs/api/resources/assets/client/Client.js +191 -1
- package/dist/cjs/api/resources/assets/client/requests/UpdateAgentConfigRequestIn.d.ts +91 -0
- package/dist/cjs/api/resources/assets/client/requests/UpdateAgentConfigRequestIn.js +3 -0
- package/dist/cjs/api/resources/assets/client/requests/UpdateSkillConfigRequestIn.d.ts +26 -0
- package/dist/cjs/api/resources/assets/client/requests/UpdateSkillConfigRequestIn.js +3 -0
- package/dist/cjs/api/resources/assets/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/types/PublicSessionComputerIn.d.ts +23 -0
- package/dist/cjs/api/types/PublicSessionComputerIn.js +11 -0
- package/dist/cjs/api/types/PublicSessionSetupStepIn.d.ts +9 -0
- package/dist/cjs/api/types/PublicSessionSetupStepIn.js +3 -0
- package/dist/cjs/api/types/UpdateAssetConfigResponseOut.d.ts +15 -0
- package/dist/cjs/api/types/UpdateAssetConfigResponseOut.js +3 -0
- package/dist/cjs/api/types/index.d.ts +3 -0
- package/dist/cjs/api/types/index.js +3 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/assets/client/Client.d.mts +45 -1
- package/dist/esm/api/resources/assets/client/Client.mjs +191 -1
- package/dist/esm/api/resources/assets/client/requests/UpdateAgentConfigRequestIn.d.mts +91 -0
- package/dist/esm/api/resources/assets/client/requests/UpdateAgentConfigRequestIn.mjs +2 -0
- package/dist/esm/api/resources/assets/client/requests/UpdateSkillConfigRequestIn.d.mts +26 -0
- package/dist/esm/api/resources/assets/client/requests/UpdateSkillConfigRequestIn.mjs +2 -0
- package/dist/esm/api/resources/assets/client/requests/index.d.mts +2 -0
- package/dist/esm/api/types/PublicSessionComputerIn.d.mts +23 -0
- package/dist/esm/api/types/PublicSessionComputerIn.mjs +8 -0
- package/dist/esm/api/types/PublicSessionSetupStepIn.d.mts +9 -0
- package/dist/esm/api/types/PublicSessionSetupStepIn.mjs +2 -0
- package/dist/esm/api/types/UpdateAssetConfigResponseOut.d.mts +15 -0
- package/dist/esm/api/types/UpdateAssetConfigResponseOut.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +3 -0
- package/dist/esm/api/types/index.mjs +3 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +135 -1
|
@@ -140,7 +140,7 @@ export declare class AssetsClient {
|
|
|
140
140
|
get(request: AthenaIntelligence.GetAssetsRequest, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.PublicAssetOut>;
|
|
141
141
|
private __get;
|
|
142
142
|
/**
|
|
143
|
-
* Update an asset's display title. This supports folders and all other asset types the caller can edit, and applies the same rename side effects as the Athena application.
|
|
143
|
+
* Update an asset's display title. This supports folders and all other asset types the caller can edit, and applies the same rename side effects as the Athena application. Only the title changes: to change a skill's or collab agent's content, use PUT /api/v0/assets/{asset_id}/skill-config or /api/v0/assets/{asset_id}/agent-config.
|
|
144
144
|
*
|
|
145
145
|
* @param {AthenaIntelligence.RenameAssetRequestIn} request
|
|
146
146
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -241,6 +241,28 @@ export declare class AssetsClient {
|
|
|
241
241
|
*/
|
|
242
242
|
getActivityDeltas(request: AthenaIntelligence.AssetActivityDeltaBatchRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.AssetActivityDeltaResponseOut>;
|
|
243
243
|
private __getActivityDeltas;
|
|
244
|
+
/**
|
|
245
|
+
* Write a collab agent's configuration (system prompt, model, tools, sources, behavior and channel settings) to its draft. Only the fields you send change; an omitted field keeps its current value, and a list or text field you send replaces the old one whole. The write goes to the live draft, the same draft the Athena editor shows, under the asset's existing id. Once the asset has been published, runs keep using the published version until you publish the draft with POST /api/v0/assets/{asset_id}/publish; one never published runs from its draft. Requires edit access to the asset; an archived asset is refused with 409. Unknown fields are refused with 422. A model must be available in the agent's workspace (422 otherwise). Tool or toolkit IDs the registry does not know are written and reported under warnings. A source (collab_source:<asset_id>) or Tool Asset (tool:<asset_id>) the agent does not already hold must be one the caller can open: one they cannot open, or an archived one, is refused with 403 naming it, and nothing is written. A new name also becomes the asset title. The agent's email address and its outbound approval recipients are not set here.
|
|
246
|
+
*
|
|
247
|
+
* @param {AthenaIntelligence.UpdateAgentConfigRequestIn} request
|
|
248
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
249
|
+
*
|
|
250
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
251
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
252
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
253
|
+
* @throws {@link AthenaIntelligence.ConflictError}
|
|
254
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
255
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
256
|
+
*
|
|
257
|
+
* @example
|
|
258
|
+
* await client.assets.updateAgentConfig({
|
|
259
|
+
* asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f",
|
|
260
|
+
* system_prompt: "You review designs for accessibility and consistency.",
|
|
261
|
+
* tools: ["read_asset"]
|
|
262
|
+
* })
|
|
263
|
+
*/
|
|
264
|
+
updateAgentConfig(request: AthenaIntelligence.UpdateAgentConfigRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.UpdateAssetConfigResponseOut>;
|
|
265
|
+
private __updateAgentConfig;
|
|
244
266
|
/**
|
|
245
267
|
* Archive an asset by its ID. The asset will be hidden from active listings (e.g. GET /assets with default filters) but can still be retrieved directly by ID. For folders, all children are also archived recursively. For meetings, associated sub-assets (recordings, transcripts) are archived as well. Only the creator of the asset can archive it.
|
|
246
268
|
*
|
|
@@ -369,6 +391,28 @@ export declare class AssetsClient {
|
|
|
369
391
|
*/
|
|
370
392
|
share(request: AthenaIntelligence.ShareAssetRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.ShareAssetResponseOut>;
|
|
371
393
|
private __share;
|
|
394
|
+
/**
|
|
395
|
+
* Write a skill's SKILL.md content (name, description, markdown body and the optional frontmatter) to its draft. Only the fields you send change; an omitted field keeps its current value, and a list or text field you send replaces the old one whole. The write goes to the live draft, the same draft the Athena editor shows, under the asset's existing id. Once the asset has been published, runs keep using the published version until you publish the draft with POST /api/v0/assets/{asset_id}/publish; one never published runs from its draft. Requires edit access to the asset; an archived asset is refused with 409. Unknown fields are refused with 422. The frontmatter is validated as it will read after the write; a skill that would not be spec-compliant is refused with 422 and nothing is written. A new name also becomes the asset title.
|
|
396
|
+
*
|
|
397
|
+
* @param {AthenaIntelligence.UpdateSkillConfigRequestIn} request
|
|
398
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
399
|
+
*
|
|
400
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
401
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
402
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
403
|
+
* @throws {@link AthenaIntelligence.ConflictError}
|
|
404
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
405
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
406
|
+
*
|
|
407
|
+
* @example
|
|
408
|
+
* await client.assets.updateSkillConfig({
|
|
409
|
+
* asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f",
|
|
410
|
+
* body_markdown: "# Ticket triage\n\n1. Read the ticket...",
|
|
411
|
+
* description: "Triage support tickets by urgency and product area."
|
|
412
|
+
* })
|
|
413
|
+
*/
|
|
414
|
+
updateSkillConfig(request: AthenaIntelligence.UpdateSkillConfigRequestIn, requestOptions?: AssetsClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.UpdateAssetConfigResponseOut>;
|
|
415
|
+
private __updateSkillConfig;
|
|
372
416
|
/**
|
|
373
417
|
* Update the workspace-level access on an asset. Needs edit access to the asset. Set 'view' or 'edit' to grant workspace-wide access, which also needs permission to share with the workspace. Set 'none' (or null) to remove the workspace-wide share, as DELETE does; removing a folder's share also removes it from the assets inside the folder. People and groups the asset is shared with directly keep their access.
|
|
374
418
|
*
|
|
@@ -582,7 +582,7 @@ export class AssetsClient {
|
|
|
582
582
|
});
|
|
583
583
|
}
|
|
584
584
|
/**
|
|
585
|
-
* Update an asset's display title. This supports folders and all other asset types the caller can edit, and applies the same rename side effects as the Athena application.
|
|
585
|
+
* Update an asset's display title. This supports folders and all other asset types the caller can edit, and applies the same rename side effects as the Athena application. Only the title changes: to change a skill's or collab agent's content, use PUT /api/v0/assets/{asset_id}/skill-config or /api/v0/assets/{asset_id}/agent-config.
|
|
586
586
|
*
|
|
587
587
|
* @param {AthenaIntelligence.RenameAssetRequestIn} request
|
|
588
588
|
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -1034,6 +1034,101 @@ export class AssetsClient {
|
|
|
1034
1034
|
}
|
|
1035
1035
|
});
|
|
1036
1036
|
}
|
|
1037
|
+
/**
|
|
1038
|
+
* Write a collab agent's configuration (system prompt, model, tools, sources, behavior and channel settings) to its draft. Only the fields you send change; an omitted field keeps its current value, and a list or text field you send replaces the old one whole. The write goes to the live draft, the same draft the Athena editor shows, under the asset's existing id. Once the asset has been published, runs keep using the published version until you publish the draft with POST /api/v0/assets/{asset_id}/publish; one never published runs from its draft. Requires edit access to the asset; an archived asset is refused with 409. Unknown fields are refused with 422. A model must be available in the agent's workspace (422 otherwise). Tool or toolkit IDs the registry does not know are written and reported under warnings. A source (collab_source:<asset_id>) or Tool Asset (tool:<asset_id>) the agent does not already hold must be one the caller can open: one they cannot open, or an archived one, is refused with 403 naming it, and nothing is written. A new name also becomes the asset title. The agent's email address and its outbound approval recipients are not set here.
|
|
1039
|
+
*
|
|
1040
|
+
* @param {AthenaIntelligence.UpdateAgentConfigRequestIn} request
|
|
1041
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1042
|
+
*
|
|
1043
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
1044
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
1045
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
1046
|
+
* @throws {@link AthenaIntelligence.ConflictError}
|
|
1047
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
1048
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
1049
|
+
*
|
|
1050
|
+
* @example
|
|
1051
|
+
* await client.assets.updateAgentConfig({
|
|
1052
|
+
* asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f",
|
|
1053
|
+
* system_prompt: "You review designs for accessibility and consistency.",
|
|
1054
|
+
* tools: ["read_asset"]
|
|
1055
|
+
* })
|
|
1056
|
+
*/
|
|
1057
|
+
updateAgentConfig(request, requestOptions) {
|
|
1058
|
+
return core.HttpResponsePromise.fromPromise(this.__updateAgentConfig(request, requestOptions));
|
|
1059
|
+
}
|
|
1060
|
+
__updateAgentConfig(request, requestOptions) {
|
|
1061
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1062
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1063
|
+
const { asset_id: assetId } = request, _body = __rest(request, ["asset_id"]);
|
|
1064
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1065
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
1066
|
+
"X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
|
|
1067
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1068
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
1069
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, `api/v0/assets/${core.url.encodePathParam(assetId)}/agent-config`),
|
|
1070
|
+
method: "PUT",
|
|
1071
|
+
headers: _headers,
|
|
1072
|
+
contentType: "application/json",
|
|
1073
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1074
|
+
requestType: "json",
|
|
1075
|
+
body: _body,
|
|
1076
|
+
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
1077
|
+
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
1078
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1079
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
1080
|
+
logging: this._options.logging,
|
|
1081
|
+
});
|
|
1082
|
+
if (_response.ok) {
|
|
1083
|
+
return {
|
|
1084
|
+
data: _response.body,
|
|
1085
|
+
rawResponse: _response.rawResponse,
|
|
1086
|
+
};
|
|
1087
|
+
}
|
|
1088
|
+
if (_response.error.reason === "status-code") {
|
|
1089
|
+
switch (_response.error.statusCode) {
|
|
1090
|
+
case 400:
|
|
1091
|
+
throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
|
|
1092
|
+
case 403:
|
|
1093
|
+
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
1094
|
+
case 404:
|
|
1095
|
+
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
1096
|
+
case 409:
|
|
1097
|
+
throw new AthenaIntelligence.ConflictError(_response.error.body, _response.rawResponse);
|
|
1098
|
+
case 422:
|
|
1099
|
+
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
1100
|
+
case 503:
|
|
1101
|
+
throw new AthenaIntelligence.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
1102
|
+
default:
|
|
1103
|
+
throw new errors.AthenaIntelligenceError({
|
|
1104
|
+
statusCode: _response.error.statusCode,
|
|
1105
|
+
body: _response.error.body,
|
|
1106
|
+
rawResponse: _response.rawResponse,
|
|
1107
|
+
});
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
switch (_response.error.reason) {
|
|
1111
|
+
case "non-json":
|
|
1112
|
+
throw new errors.AthenaIntelligenceError({
|
|
1113
|
+
statusCode: _response.error.statusCode,
|
|
1114
|
+
body: _response.error.rawBody,
|
|
1115
|
+
rawResponse: _response.rawResponse,
|
|
1116
|
+
});
|
|
1117
|
+
case "body-is-null":
|
|
1118
|
+
throw new errors.AthenaIntelligenceError({
|
|
1119
|
+
statusCode: _response.error.statusCode,
|
|
1120
|
+
rawResponse: _response.rawResponse,
|
|
1121
|
+
});
|
|
1122
|
+
case "timeout":
|
|
1123
|
+
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling PUT /api/v0/assets/{asset_id}/agent-config.");
|
|
1124
|
+
case "unknown":
|
|
1125
|
+
throw new errors.AthenaIntelligenceError({
|
|
1126
|
+
message: _response.error.errorMessage,
|
|
1127
|
+
rawResponse: _response.rawResponse,
|
|
1128
|
+
});
|
|
1129
|
+
}
|
|
1130
|
+
});
|
|
1131
|
+
}
|
|
1037
1132
|
/**
|
|
1038
1133
|
* Archive an asset by its ID. The asset will be hidden from active listings (e.g. GET /assets with default filters) but can still be retrieved directly by ID. For folders, all children are also archived recursively. For meetings, associated sub-assets (recordings, transcripts) are archived as well. Only the creator of the asset can archive it.
|
|
1039
1134
|
*
|
|
@@ -1641,6 +1736,101 @@ export class AssetsClient {
|
|
|
1641
1736
|
}
|
|
1642
1737
|
});
|
|
1643
1738
|
}
|
|
1739
|
+
/**
|
|
1740
|
+
* Write a skill's SKILL.md content (name, description, markdown body and the optional frontmatter) to its draft. Only the fields you send change; an omitted field keeps its current value, and a list or text field you send replaces the old one whole. The write goes to the live draft, the same draft the Athena editor shows, under the asset's existing id. Once the asset has been published, runs keep using the published version until you publish the draft with POST /api/v0/assets/{asset_id}/publish; one never published runs from its draft. Requires edit access to the asset; an archived asset is refused with 409. Unknown fields are refused with 422. The frontmatter is validated as it will read after the write; a skill that would not be spec-compliant is refused with 422 and nothing is written. A new name also becomes the asset title.
|
|
1741
|
+
*
|
|
1742
|
+
* @param {AthenaIntelligence.UpdateSkillConfigRequestIn} request
|
|
1743
|
+
* @param {AssetsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1744
|
+
*
|
|
1745
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
1746
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
1747
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
1748
|
+
* @throws {@link AthenaIntelligence.ConflictError}
|
|
1749
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
1750
|
+
* @throws {@link AthenaIntelligence.ServiceUnavailableError}
|
|
1751
|
+
*
|
|
1752
|
+
* @example
|
|
1753
|
+
* await client.assets.updateSkillConfig({
|
|
1754
|
+
* asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f",
|
|
1755
|
+
* body_markdown: "# Ticket triage\n\n1. Read the ticket...",
|
|
1756
|
+
* description: "Triage support tickets by urgency and product area."
|
|
1757
|
+
* })
|
|
1758
|
+
*/
|
|
1759
|
+
updateSkillConfig(request, requestOptions) {
|
|
1760
|
+
return core.HttpResponsePromise.fromPromise(this.__updateSkillConfig(request, requestOptions));
|
|
1761
|
+
}
|
|
1762
|
+
__updateSkillConfig(request, requestOptions) {
|
|
1763
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1764
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1765
|
+
const { asset_id: assetId } = request, _body = __rest(request, ["asset_id"]);
|
|
1766
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1767
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
1768
|
+
"X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
|
|
1769
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1770
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
1771
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, `api/v0/assets/${core.url.encodePathParam(assetId)}/skill-config`),
|
|
1772
|
+
method: "PUT",
|
|
1773
|
+
headers: _headers,
|
|
1774
|
+
contentType: "application/json",
|
|
1775
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1776
|
+
requestType: "json",
|
|
1777
|
+
body: _body,
|
|
1778
|
+
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
1779
|
+
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
1780
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1781
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
1782
|
+
logging: this._options.logging,
|
|
1783
|
+
});
|
|
1784
|
+
if (_response.ok) {
|
|
1785
|
+
return {
|
|
1786
|
+
data: _response.body,
|
|
1787
|
+
rawResponse: _response.rawResponse,
|
|
1788
|
+
};
|
|
1789
|
+
}
|
|
1790
|
+
if (_response.error.reason === "status-code") {
|
|
1791
|
+
switch (_response.error.statusCode) {
|
|
1792
|
+
case 400:
|
|
1793
|
+
throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
|
|
1794
|
+
case 403:
|
|
1795
|
+
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
1796
|
+
case 404:
|
|
1797
|
+
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
1798
|
+
case 409:
|
|
1799
|
+
throw new AthenaIntelligence.ConflictError(_response.error.body, _response.rawResponse);
|
|
1800
|
+
case 422:
|
|
1801
|
+
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
1802
|
+
case 503:
|
|
1803
|
+
throw new AthenaIntelligence.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
1804
|
+
default:
|
|
1805
|
+
throw new errors.AthenaIntelligenceError({
|
|
1806
|
+
statusCode: _response.error.statusCode,
|
|
1807
|
+
body: _response.error.body,
|
|
1808
|
+
rawResponse: _response.rawResponse,
|
|
1809
|
+
});
|
|
1810
|
+
}
|
|
1811
|
+
}
|
|
1812
|
+
switch (_response.error.reason) {
|
|
1813
|
+
case "non-json":
|
|
1814
|
+
throw new errors.AthenaIntelligenceError({
|
|
1815
|
+
statusCode: _response.error.statusCode,
|
|
1816
|
+
body: _response.error.rawBody,
|
|
1817
|
+
rawResponse: _response.rawResponse,
|
|
1818
|
+
});
|
|
1819
|
+
case "body-is-null":
|
|
1820
|
+
throw new errors.AthenaIntelligenceError({
|
|
1821
|
+
statusCode: _response.error.statusCode,
|
|
1822
|
+
rawResponse: _response.rawResponse,
|
|
1823
|
+
});
|
|
1824
|
+
case "timeout":
|
|
1825
|
+
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling PUT /api/v0/assets/{asset_id}/skill-config.");
|
|
1826
|
+
case "unknown":
|
|
1827
|
+
throw new errors.AthenaIntelligenceError({
|
|
1828
|
+
message: _response.error.errorMessage,
|
|
1829
|
+
rawResponse: _response.rawResponse,
|
|
1830
|
+
});
|
|
1831
|
+
}
|
|
1832
|
+
});
|
|
1833
|
+
}
|
|
1644
1834
|
/**
|
|
1645
1835
|
* Update the workspace-level access on an asset. Needs edit access to the asset. Set 'view' or 'edit' to grant workspace-wide access, which also needs permission to share with the workspace. Set 'none' (or null) to remove the workspace-wide share, as DELETE does; removing a folder's share also removes it from the assets inside the folder. People and groups the asset is shared with directly keep their access.
|
|
1646
1836
|
*
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type * as AthenaIntelligence from "../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f",
|
|
6
|
+
* system_prompt: "You review designs for accessibility and consistency.",
|
|
7
|
+
* tools: ["read_asset"]
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface UpdateAgentConfigRequestIn {
|
|
11
|
+
/** ID of the collab agent to update */
|
|
12
|
+
asset_id: string;
|
|
13
|
+
/** UI accent color (hex) */
|
|
14
|
+
accent_color?: string | null;
|
|
15
|
+
/** Auto-compaction */
|
|
16
|
+
auto_compaction_enabled?: boolean | null;
|
|
17
|
+
/** Toolkit IDs available for the agent to select */
|
|
18
|
+
available_toolkits?: string[] | null;
|
|
19
|
+
/** Tool IDs the agent may not use */
|
|
20
|
+
blacklisted_tools?: string[] | null;
|
|
21
|
+
/** Whether the agent can be used as a sub-agent */
|
|
22
|
+
can_be_subagent?: boolean | null;
|
|
23
|
+
/** Allow @-mentioning the agent in an asset's comments pane */
|
|
24
|
+
comments_pane_enabled?: boolean | null;
|
|
25
|
+
/** Inject contextual information into replies */
|
|
26
|
+
context_injection?: boolean | null;
|
|
27
|
+
/** What the agent does and when to use it */
|
|
28
|
+
description?: string | null;
|
|
29
|
+
/** Voice-friendly handle (lowercase words and spaces) used to address the agent as a sub-agent */
|
|
30
|
+
handle?: string | null;
|
|
31
|
+
/** Icon identifier */
|
|
32
|
+
icon?: string | null;
|
|
33
|
+
/** Knowledge base references available to the agent */
|
|
34
|
+
knowledge_base?: string[] | null;
|
|
35
|
+
/** Tags used to filter knowledge base context */
|
|
36
|
+
knowledge_base_tags?: string[] | null;
|
|
37
|
+
/** Maximum number of past messages passed to sub-agents */
|
|
38
|
+
max_past_messages_for_subagents?: number | null;
|
|
39
|
+
/** Allow the agent to attend meetings */
|
|
40
|
+
meeting_attendance_enabled?: boolean | null;
|
|
41
|
+
/** The agent's meeting voice */
|
|
42
|
+
meeting_voice_enabled?: boolean | null;
|
|
43
|
+
/** Model ID the agent runs on; must be available in its workspace */
|
|
44
|
+
model?: string | null;
|
|
45
|
+
/** Muses long-term memory */
|
|
46
|
+
muses_enabled?: boolean | null;
|
|
47
|
+
/** Inject relevant Muses memory before each reply */
|
|
48
|
+
muses_recall_enabled?: boolean | null;
|
|
49
|
+
/** Display name of the agent; also becomes the asset title */
|
|
50
|
+
name?: string | null;
|
|
51
|
+
/** Parallel tool calls */
|
|
52
|
+
parallel_tool_calls?: boolean | null;
|
|
53
|
+
/** Tool IDs that stay enabled whatever else is configured */
|
|
54
|
+
permanent_enabled_tools?: string[] | null;
|
|
55
|
+
/** Plan Mode */
|
|
56
|
+
plan_mode_enabled?: boolean | null;
|
|
57
|
+
/** True stops giving the agent's sessions a computer (existing computers are kept). Not together with session_computer. */
|
|
58
|
+
remove_session_computer?: boolean | null;
|
|
59
|
+
/** Give the agent's sessions a computer the platform creates from an environment */
|
|
60
|
+
session_computer?: AthenaIntelligence.PublicSessionComputerIn | null;
|
|
61
|
+
/** Show the agent only to workspace admins */
|
|
62
|
+
show_only_for_admin?: boolean | null;
|
|
63
|
+
/** How the agent answers a text from a workspace member it isn't shared with: 'default' (the standard no-access message), 'silent' (no reply) or 'custom' (sms_blocked_sender_reply verbatim). The text is always saved in the agent's SMS thread and the agent never runs; senders without an Athena account in the workspace never get a reply. */
|
|
64
|
+
sms_blocked_sender_mode?: string | null;
|
|
65
|
+
/** Reply text sent to blocked SMS senders when sms_blocked_sender_mode is 'custom', e.g. 'Got it, thanks.' (max 320 characters). */
|
|
66
|
+
sms_blocked_sender_reply?: string | null;
|
|
67
|
+
/** SMS access */
|
|
68
|
+
sms_enabled?: boolean | null;
|
|
69
|
+
/** Knowledge source references: native source IDs, or collab_source:<asset_id>; replaces the list */
|
|
70
|
+
sources?: string[] | null;
|
|
71
|
+
/** Whether the agent must follow strict configuration constraints */
|
|
72
|
+
strict_agent_configuration?: boolean | null;
|
|
73
|
+
/** Collab agent IDs available as sub-agents */
|
|
74
|
+
sub_agents?: string[] | null;
|
|
75
|
+
/** Suggested prompts or actions shown for the agent */
|
|
76
|
+
suggestions?: Record<string, unknown>[] | null;
|
|
77
|
+
/** The instructions the agent follows (markdown); replaces the whole prompt */
|
|
78
|
+
system_prompt?: string | null;
|
|
79
|
+
/** Sampling temperature override */
|
|
80
|
+
temperature?: number | null;
|
|
81
|
+
/** Toolkit IDs the agent can use; replaces the list */
|
|
82
|
+
toolkits?: string[] | null;
|
|
83
|
+
/** Tool IDs the agent can use; replaces the list */
|
|
84
|
+
tools?: string[] | null;
|
|
85
|
+
/** Voice access */
|
|
86
|
+
voice_enabled?: boolean | null;
|
|
87
|
+
/** Collab agent IDs available as voice sub-agents */
|
|
88
|
+
voice_sub_agents?: string[] | null;
|
|
89
|
+
/** Email addresses allowed to use the agent */
|
|
90
|
+
whitelisted_emails?: string[] | null;
|
|
91
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* asset_id: "asset_92492920-d118-42d3-95b4-00eccfe0754f",
|
|
5
|
+
* body_markdown: "# Ticket triage\n\n1. Read the ticket...",
|
|
6
|
+
* description: "Triage support tickets by urgency and product area."
|
|
7
|
+
* }
|
|
8
|
+
*/
|
|
9
|
+
export interface UpdateSkillConfigRequestIn {
|
|
10
|
+
/** ID of the skill to update */
|
|
11
|
+
asset_id: string;
|
|
12
|
+
/** Space-separated list of pre-approved tools (experimental); an empty string clears it */
|
|
13
|
+
allowed_tools?: string | null;
|
|
14
|
+
/** The markdown instructions below the SKILL.md frontmatter. Replaces the whole body. */
|
|
15
|
+
body_markdown?: string | null;
|
|
16
|
+
/** Environment requirements (max 500 chars); an empty string clears it */
|
|
17
|
+
compatibility?: string | null;
|
|
18
|
+
/** What the skill does and when to use it (max 1024 chars) */
|
|
19
|
+
description?: string | null;
|
|
20
|
+
/** License name or reference; an empty string clears it */
|
|
21
|
+
license?: string | null;
|
|
22
|
+
/** Additional string metadata; replaces the whole map */
|
|
23
|
+
metadata?: Record<string, string | null> | null;
|
|
24
|
+
/** Skill name slug (lowercase letters, numbers, single hyphens; max 64 chars). Also becomes the asset title. */
|
|
25
|
+
name?: string | null;
|
|
26
|
+
}
|
|
@@ -17,4 +17,6 @@ export type { PublishAssetRequestIn } from "./PublishAssetRequestIn.mjs";
|
|
|
17
17
|
export type { RemoveWorkspaceAccessAssetsRequest } from "./RemoveWorkspaceAccessAssetsRequest.mjs";
|
|
18
18
|
export type { RenameAssetRequestIn } from "./RenameAssetRequestIn.mjs";
|
|
19
19
|
export type { ShareAssetRequestIn } from "./ShareAssetRequestIn.mjs";
|
|
20
|
+
export type { UpdateAgentConfigRequestIn } from "./UpdateAgentConfigRequestIn.mjs";
|
|
21
|
+
export type { UpdateSkillConfigRequestIn } from "./UpdateSkillConfigRequestIn.mjs";
|
|
20
22
|
export type { UpdateWorkspaceAccessRequestIn } from "./UpdateWorkspaceAccessRequestIn.mjs";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type * as AthenaIntelligence from "../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* The computer the platform gives each of a collab agent's sessions.
|
|
4
|
+
*/
|
|
5
|
+
export interface PublicSessionComputerIn {
|
|
6
|
+
/** The environment asset the computer is created from */
|
|
7
|
+
environment_asset_id: string;
|
|
8
|
+
/** 'session' gives every session its own computer; 'person' (the default) gives each person one computer reused across their sessions. */
|
|
9
|
+
scope?: PublicSessionComputerIn.Scope | null;
|
|
10
|
+
/** Commands each session runs once on its computer first */
|
|
11
|
+
session_setup?: AthenaIntelligence.PublicSessionSetupStepIn[] | null;
|
|
12
|
+
/** Title of created computers; {person} becomes the person's name */
|
|
13
|
+
title?: string | null;
|
|
14
|
+
/** Absolute path the agent's commands start in */
|
|
15
|
+
working_directory?: string | null;
|
|
16
|
+
}
|
|
17
|
+
export declare namespace PublicSessionComputerIn {
|
|
18
|
+
const Scope: {
|
|
19
|
+
readonly Session: "session";
|
|
20
|
+
readonly Person: "person";
|
|
21
|
+
};
|
|
22
|
+
type Scope = (typeof Scope)[keyof typeof Scope];
|
|
23
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
export var PublicSessionComputerIn;
|
|
3
|
+
(function (PublicSessionComputerIn) {
|
|
4
|
+
PublicSessionComputerIn.Scope = {
|
|
5
|
+
Session: "session",
|
|
6
|
+
Person: "person",
|
|
7
|
+
};
|
|
8
|
+
})(PublicSessionComputerIn || (PublicSessionComputerIn = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One command a collab agent's session runs on its computer before starting.
|
|
3
|
+
*/
|
|
4
|
+
export interface PublicSessionSetupStepIn {
|
|
5
|
+
/** Shell command to run on the computer */
|
|
6
|
+
command: string;
|
|
7
|
+
/** Seconds this step may take (default 120). All steps together must fit in 600 s. */
|
|
8
|
+
timeout_seconds?: number | null;
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response model for writing a skill's or collab agent's draft.
|
|
3
|
+
*/
|
|
4
|
+
export interface UpdateAssetConfigResponseOut {
|
|
5
|
+
/** ID of the updated asset */
|
|
6
|
+
asset_id: string;
|
|
7
|
+
/** Type of the asset: skill or collab_agent */
|
|
8
|
+
asset_type: string;
|
|
9
|
+
/** Always false: the write changed the draft only. Publish it with POST /api/v0/assets/{asset_id}/publish. */
|
|
10
|
+
published: boolean;
|
|
11
|
+
/** Title of the asset after the write */
|
|
12
|
+
title: string;
|
|
13
|
+
/** Non-fatal notes, such as tool or toolkit IDs the registry does not know */
|
|
14
|
+
warnings?: string[];
|
|
15
|
+
}
|
|
@@ -113,6 +113,8 @@ export * from "./PresenceTokenResponseOut.mjs";
|
|
|
113
113
|
export * from "./PromptMessage.mjs";
|
|
114
114
|
export * from "./PublicAssetOut.mjs";
|
|
115
115
|
export * from "./PublicCollabAgentConfigIn.mjs";
|
|
116
|
+
export * from "./PublicSessionComputerIn.mjs";
|
|
117
|
+
export * from "./PublicSessionSetupStepIn.mjs";
|
|
116
118
|
export * from "./PublicSkillConfigIn.mjs";
|
|
117
119
|
export * from "./PublishAssetResponseOut.mjs";
|
|
118
120
|
export * from "./ReadCapabilitiesOut.mjs";
|
|
@@ -156,6 +158,7 @@ export * from "./ThreadStatusResponseOut.mjs";
|
|
|
156
158
|
export * from "./ThreadStopResponseOut.mjs";
|
|
157
159
|
export * from "./ToolResultContent.mjs";
|
|
158
160
|
export * from "./ToolUseContent.mjs";
|
|
161
|
+
export * from "./UpdateAssetConfigResponseOut.mjs";
|
|
159
162
|
export * from "./UpdateWorkspaceDisclaimerIn.mjs";
|
|
160
163
|
export * from "./UpdateWorkspaceToolRegistryToolIn.mjs";
|
|
161
164
|
export * from "./UserInfoOut.mjs";
|
|
@@ -113,6 +113,8 @@ export * from "./PresenceTokenResponseOut.mjs";
|
|
|
113
113
|
export * from "./PromptMessage.mjs";
|
|
114
114
|
export * from "./PublicAssetOut.mjs";
|
|
115
115
|
export * from "./PublicCollabAgentConfigIn.mjs";
|
|
116
|
+
export * from "./PublicSessionComputerIn.mjs";
|
|
117
|
+
export * from "./PublicSessionSetupStepIn.mjs";
|
|
116
118
|
export * from "./PublicSkillConfigIn.mjs";
|
|
117
119
|
export * from "./PublishAssetResponseOut.mjs";
|
|
118
120
|
export * from "./ReadCapabilitiesOut.mjs";
|
|
@@ -156,6 +158,7 @@ export * from "./ThreadStatusResponseOut.mjs";
|
|
|
156
158
|
export * from "./ThreadStopResponseOut.mjs";
|
|
157
159
|
export * from "./ToolResultContent.mjs";
|
|
158
160
|
export * from "./ToolUseContent.mjs";
|
|
161
|
+
export * from "./UpdateAssetConfigResponseOut.mjs";
|
|
159
162
|
export * from "./UpdateWorkspaceDisclaimerIn.mjs";
|
|
160
163
|
export * from "./UpdateWorkspaceToolRegistryToolIn.mjs";
|
|
161
164
|
export * from "./UserInfoOut.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "4.3.
|
|
1
|
+
export declare const SDK_VERSION = "4.3.2266";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "4.3.
|
|
1
|
+
export const SDK_VERSION = "4.3.2266";
|