@stack-spot/portal-network 1.0.0-dev.1768944806600 → 1.0.0-dev.1769537511491
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/CHANGELOG.md +13 -0
- package/dist/api/accountAssetManager.d.ts +14 -10
- package/dist/api/accountAssetManager.d.ts.map +1 -1
- package/dist/api/accountAssetManager.js +5 -2
- package/dist/api/accountAssetManager.js.map +1 -1
- package/dist/api/agent-tools.d.ts +752 -164
- package/dist/api/agent-tools.d.ts.map +1 -1
- package/dist/api/agent-tools.js +203 -43
- package/dist/api/agent-tools.js.map +1 -1
- package/dist/api/ai.d.ts +3 -2
- package/dist/api/ai.d.ts.map +1 -1
- package/dist/api/ai.js +1 -2
- package/dist/api/ai.js.map +1 -1
- package/dist/api/workspace-ai.d.ts +41 -0
- package/dist/api/workspace-ai.d.ts.map +1 -1
- package/dist/api/workspace-ai.js +34 -0
- package/dist/api/workspace-ai.js.map +1 -1
- package/dist/client/account-asset-manager.d.ts +3 -0
- package/dist/client/account-asset-manager.d.ts.map +1 -1
- package/dist/client/agent-tools.d.ts +130 -3
- package/dist/client/agent-tools.d.ts.map +1 -1
- package/dist/client/agent-tools.js +105 -2
- package/dist/client/agent-tools.js.map +1 -1
- package/dist/client/ai.d.ts +98 -6
- package/dist/client/ai.d.ts.map +1 -1
- package/dist/client/ai.js +382 -8
- package/dist/client/ai.js.map +1 -1
- package/dist/client/types.d.ts +24 -1
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/workspace-ai.d.ts +15 -4
- package/dist/client/workspace-ai.d.ts.map +1 -1
- package/dist/client/workspace-ai.js +17 -3
- package/dist/client/workspace-ai.js.map +1 -1
- package/dist/utils/string.d.ts +6 -0
- package/dist/utils/string.d.ts.map +1 -1
- package/dist/utils/string.js +10 -0
- package/dist/utils/string.js.map +1 -1
- package/package.json +1 -1
- package/src/api/accountAssetManager.ts +18 -11
- package/src/api/agent-tools.ts +1259 -472
- package/src/api/ai.ts +3 -3
- package/src/api/workspace-ai.ts +83 -0
- package/src/client/agent-tools.ts +55 -2
- package/src/client/ai.ts +404 -8
- package/src/client/types.ts +30 -1
- package/src/client/workspace-ai.ts +23 -7
- package/src/utils/string.ts +12 -0
package/src/api/ai.ts
CHANGED
|
@@ -384,6 +384,7 @@ export type QuickCommandsStepPromptRequest = {
|
|
|
384
384
|
allow_use_current_workspace?: boolean;
|
|
385
385
|
knowledge_source_slugs?: string[] | null;
|
|
386
386
|
agent_id?: string | null;
|
|
387
|
+
agent_version_number?: number | null;
|
|
387
388
|
use_uploaded_files?: boolean;
|
|
388
389
|
agent_built_in?: boolean | null;
|
|
389
390
|
next_step_slug?: string | null;
|
|
@@ -871,6 +872,7 @@ export type ChatRequest = {
|
|
|
871
872
|
} | null;
|
|
872
873
|
user_prompt: string;
|
|
873
874
|
project_id?: string | null;
|
|
875
|
+
agent_version_number?: number | null;
|
|
874
876
|
};
|
|
875
877
|
export type SourceProjectFile3 = {
|
|
876
878
|
"type": "project_file";
|
|
@@ -4061,14 +4063,13 @@ export function devAssistantV3V3ChatPost({ authorization, xAccountId, xMemberId,
|
|
|
4061
4063
|
/**
|
|
4062
4064
|
* List All
|
|
4063
4065
|
*/
|
|
4064
|
-
export function listAllV3QuickCommandsGet({ name, slug, size, page, visibilityList, order,
|
|
4066
|
+
export function listAllV3QuickCommandsGet({ name, slug, size, page, visibilityList, order, types, authorization, xAccountId, xMemberId, xUsername }: {
|
|
4065
4067
|
name?: string | null;
|
|
4066
4068
|
slug?: string | null;
|
|
4067
4069
|
size?: number;
|
|
4068
4070
|
page?: number;
|
|
4069
4071
|
visibilityList?: VisibilityLevelEnum[] | null;
|
|
4070
4072
|
order?: OrderEnum | null;
|
|
4071
|
-
isRemote?: boolean;
|
|
4072
4073
|
types?: QuickCommandTypeRequest[] | null;
|
|
4073
4074
|
authorization: string;
|
|
4074
4075
|
xAccountId?: string | null;
|
|
@@ -4090,7 +4091,6 @@ export function listAllV3QuickCommandsGet({ name, slug, size, page, visibilityLi
|
|
|
4090
4091
|
page,
|
|
4091
4092
|
visibility_list: visibilityList,
|
|
4092
4093
|
order,
|
|
4093
|
-
is_remote: isRemote,
|
|
4094
4094
|
types
|
|
4095
4095
|
}))}`, {
|
|
4096
4096
|
...opts,
|
package/src/api/workspace-ai.ts
CHANGED
|
@@ -84,6 +84,13 @@ export type ListWksContentsResponse = {
|
|
|
84
84
|
[key: string]: any;
|
|
85
85
|
}[] | null;
|
|
86
86
|
};
|
|
87
|
+
export type ContentVersion = {
|
|
88
|
+
core_id: string;
|
|
89
|
+
version_number?: number | null;
|
|
90
|
+
};
|
|
91
|
+
export type AddWorkspaceContentRequestV2 = {
|
|
92
|
+
content_identifier: ContentVersion[];
|
|
93
|
+
};
|
|
87
94
|
export type ActionShared = "VIEW" | "EDIT" | "GRANT_ACESS";
|
|
88
95
|
export type PermissionForSharedRequest = {
|
|
89
96
|
userId: string;
|
|
@@ -100,6 +107,12 @@ export type ResourceMembersResponse = {
|
|
|
100
107
|
name: string;
|
|
101
108
|
actions: string[];
|
|
102
109
|
};
|
|
110
|
+
export type ResourceMembersPaginatedResponse = {
|
|
111
|
+
items: ResourceMembersResponse[];
|
|
112
|
+
page: number;
|
|
113
|
+
size: number;
|
|
114
|
+
total_pages: number;
|
|
115
|
+
};
|
|
103
116
|
/**
|
|
104
117
|
* Create Workspace
|
|
105
118
|
*/
|
|
@@ -534,6 +547,36 @@ export function listAllContentsV1WorkspacesWorkspaceIdContentsGet({ workspaceId,
|
|
|
534
547
|
})
|
|
535
548
|
}));
|
|
536
549
|
}
|
|
550
|
+
/**
|
|
551
|
+
* Add Content
|
|
552
|
+
*/
|
|
553
|
+
export function addContentV2WorkspacesWorkspaceIdContentTypePost({ workspaceId, contentType, authorization, xAccountId, addWorkspaceContentRequestV2 }: {
|
|
554
|
+
workspaceId: string;
|
|
555
|
+
contentType: ContentType;
|
|
556
|
+
authorization: string;
|
|
557
|
+
xAccountId?: string | null;
|
|
558
|
+
addWorkspaceContentRequestV2: AddWorkspaceContentRequestV2;
|
|
559
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
560
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
561
|
+
status: 200;
|
|
562
|
+
data: {
|
|
563
|
+
[key: string]: any;
|
|
564
|
+
};
|
|
565
|
+
} | {
|
|
566
|
+
status: 404;
|
|
567
|
+
} | {
|
|
568
|
+
status: 422;
|
|
569
|
+
data: HttpValidationError;
|
|
570
|
+
}>(`/v2/workspaces/${encodeURIComponent(workspaceId)}/${encodeURIComponent(contentType)}`, oazapfts.json({
|
|
571
|
+
...opts,
|
|
572
|
+
method: "POST",
|
|
573
|
+
body: addWorkspaceContentRequestV2,
|
|
574
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
575
|
+
authorization,
|
|
576
|
+
"x-account-id": xAccountId
|
|
577
|
+
})
|
|
578
|
+
})));
|
|
579
|
+
}
|
|
537
580
|
/**
|
|
538
581
|
* Use Shareable Link
|
|
539
582
|
*/
|
|
@@ -653,6 +696,46 @@ export function listMembersV1ResourceTypeResourceTypeResourcesResourceIdentifier
|
|
|
653
696
|
})
|
|
654
697
|
}));
|
|
655
698
|
}
|
|
699
|
+
/**
|
|
700
|
+
* List Members
|
|
701
|
+
*/
|
|
702
|
+
export function listMembersV2ResourceTypeResourceTypeResourcesResourceIdentifierMembersGet({ resourceType, resourceIdentifier, search, filterBy, filterValue, sortBy, page, size, order, authorization, xAccountId }: {
|
|
703
|
+
resourceType: ContentType;
|
|
704
|
+
resourceIdentifier: string;
|
|
705
|
+
search?: string | null;
|
|
706
|
+
filterBy?: string | null;
|
|
707
|
+
filterValue?: string | null;
|
|
708
|
+
sortBy?: SortBy | null;
|
|
709
|
+
page?: number;
|
|
710
|
+
size?: number;
|
|
711
|
+
order?: OrderEnum;
|
|
712
|
+
authorization: string;
|
|
713
|
+
xAccountId?: string | null;
|
|
714
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
715
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
716
|
+
status: 200;
|
|
717
|
+
data: ResourceMembersPaginatedResponse;
|
|
718
|
+
} | {
|
|
719
|
+
status: 404;
|
|
720
|
+
} | {
|
|
721
|
+
status: 422;
|
|
722
|
+
data: HttpValidationError;
|
|
723
|
+
}>(`/v2/resource-type/${encodeURIComponent(resourceType)}/resources/${encodeURIComponent(resourceIdentifier)}/members${QS.query(QS.explode({
|
|
724
|
+
search,
|
|
725
|
+
filter_by: filterBy,
|
|
726
|
+
filter_value: filterValue,
|
|
727
|
+
sort_by: sortBy,
|
|
728
|
+
page,
|
|
729
|
+
size,
|
|
730
|
+
order
|
|
731
|
+
}))}`, {
|
|
732
|
+
...opts,
|
|
733
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
734
|
+
authorization,
|
|
735
|
+
"x-account-id": xAccountId
|
|
736
|
+
})
|
|
737
|
+
}));
|
|
738
|
+
}
|
|
656
739
|
/**
|
|
657
740
|
* Healthz
|
|
658
741
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpError } from '@oazapfts/runtime'
|
|
2
2
|
import { getApiAddresses } from '../api-addresses'
|
|
3
|
-
import { addFavoriteV1AgentsAgentIdFavoritePost, AgentVisibilityLevelEnum, createAgentV1AgentsPost, createToolkitToolsV1ToolkitsToolkitIdToolsPost, createToolkitV1ToolkitsPost, defaults, deleteAgentV1AgentsAgentIdDelete, deleteFavoriteV1AgentsAgentIdFavoriteDelete, deleteToolkitToolsV1ToolkitsToolkitIdToolsDelete, deleteToolkitV1ToolkitsToolkitIdDelete, editToolkitToolV1ToolkitsToolkitIdToolsToolIdPut, forkAgentV1AgentsAgentIdForkPost, forkToolkitV1ToolkitsToolkitIdForkPost, getAgentV1AgentsAgentIdGet, getPublicToolKitsV1BuiltinToolkitGet, getToolkitToolV1ToolkitsToolkitIdToolsToolIdGet, getToolkitV1ToolkitsToolkitIdGet, listAgentsUsingToolsV1ToolkitsToolkitIdToolsAgentsPost, listAgentsV1AgentsGet, listAgentsV3AgentsGet, listMcpToolsV1McpToolsToolkitIdGet, listMultiAgentsV1AgentsMultiAgentsGet, listToolkitsV1ToolkitsGet, listToolkitsV2ToolkitsGet, publishAgentV1AgentsAgentIdPublishPost,
|
|
3
|
+
import { addFavoriteV1AgentsAgentIdFavoritePost, AgentVisibilityLevelEnum, createAgentV1AgentsPost, createAgentV2AgentsPost, createToolkitToolsV1ToolkitsToolkitIdToolsPost, createToolkitV1ToolkitsPost, createVersionV1AgentsAgentCoreIdVersionsPost, defaults, deleteAgentV1AgentsAgentIdDelete, deleteFavoriteV1AgentsAgentIdFavoriteDelete, deleteToolkitToolsV1ToolkitsToolkitIdToolsDelete, deleteToolkitV1ToolkitsToolkitIdDelete, deleteVersionV1AgentsAgentCoreIdVersionsVersionNumberDelete, editToolkitToolV1ToolkitsToolkitIdToolsToolIdPut, findByAgentCoreIdV2AgentsAgentCoreIdGet, forkAgentV1AgentsAgentIdForkPost, forkAgentVersionV1AgentsAgentCoreIdVersionsVersionNumberForkPost, forkToolkitV1ToolkitsToolkitIdForkPost, getAgentV1AgentsAgentIdGet, getPublicToolKitsV1BuiltinToolkitGet, getToolkitToolV1ToolkitsToolkitIdToolsToolIdGet, getToolkitV1ToolkitsToolkitIdGet, listAgentsUsingToolsV1ToolkitsToolkitIdToolsAgentsPost, listAgentsV1AgentsGet, listAgentsV3AgentsGet, listAgentsV4AgentsGet, listMcpToolsV1McpToolsToolkitIdGet, listMultiAgentsV1AgentsMultiAgentsGet, listToolkitsV1ToolkitsGet, listToolkitsV2ToolkitsGet, listVersionsOfAgentCoreV1AgentsAgentCoreIdVersionsGet, patchVersionRecommendedV1AgentsAgentCoreIdVersionsVersionNumberPatch, publishAgentV1AgentsAgentIdPublishPost, searchAgentsByIdsV1AgentsSearchPost, searchAgentsV2AgentsSearchPost, shareV1AgentsAgentIdSharePost, updateAgentV1AgentsAgentIdPatch, updateAgentV2AgentsAgentIdPatch, updateToolkitV1ToolkitsToolkitIdPatch, VisibilityLevelEnum } from '../api/agent-tools'
|
|
4
4
|
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
5
5
|
import { agentToolsDictionary } from '../error/dictionary/agent-tools'
|
|
6
6
|
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
@@ -13,6 +13,7 @@ import { workspaceAiClient } from './workspace-ai'
|
|
|
13
13
|
|
|
14
14
|
const AGENT_DEFAULT_SLUG = 'stk_flex'
|
|
15
15
|
const listAgentsV3AgentsWithoutAuthorization = removeAuthorizationParam(listAgentsV3AgentsGet)
|
|
16
|
+
const listAgentsV4 = removeAuthorizationParam(listAgentsV4AgentsGet)
|
|
16
17
|
const listToolkitsAuthorization = removeAuthorizationParam(listToolkitsV2ToolkitsGet)
|
|
17
18
|
|
|
18
19
|
class AgentToolsClient extends ReactQueryNetworkClient {
|
|
@@ -30,6 +31,7 @@ class AgentToolsClient extends ReactQueryNetworkClient {
|
|
|
30
31
|
tools = this.query(removeAuthorizationParam(getPublicToolKitsV1BuiltinToolkitGet))
|
|
31
32
|
|
|
32
33
|
/**
|
|
34
|
+
* @deprecated
|
|
33
35
|
* Create agent
|
|
34
36
|
*/
|
|
35
37
|
createAgent = this.mutation(removeAuthorizationParam(createAgentV1AgentsPost))
|
|
@@ -40,6 +42,7 @@ class AgentToolsClient extends ReactQueryNetworkClient {
|
|
|
40
42
|
deleteAgent = this.mutation(removeAuthorizationParam(deleteAgentV1AgentsAgentIdDelete))
|
|
41
43
|
|
|
42
44
|
/**
|
|
45
|
+
* @deprecated
|
|
43
46
|
* Updates an agent
|
|
44
47
|
*/
|
|
45
48
|
updateAgent = this.mutation(removeAuthorizationParam(updateAgentV1AgentsAgentIdPatch))
|
|
@@ -78,14 +81,16 @@ class AgentToolsClient extends ReactQueryNetworkClient {
|
|
|
78
81
|
availableAgentsForMultiAgentAddition = this.query(removeAuthorizationParam(listMultiAgentsV1AgentsMultiAgentsGet))
|
|
79
82
|
|
|
80
83
|
/**
|
|
84
|
+
* @deprecated
|
|
81
85
|
* Gets agent by id
|
|
82
86
|
*/
|
|
83
87
|
agent = this.query(removeAuthorizationParam(getAgentV1AgentsAgentIdGet))
|
|
84
88
|
|
|
85
89
|
/**
|
|
90
|
+
* @deprecated
|
|
86
91
|
* Gets agents by ids
|
|
87
92
|
*/
|
|
88
|
-
agentsByIds = this.query(removeAuthorizationParam(
|
|
93
|
+
agentsByIds = this.query(removeAuthorizationParam(searchAgentsByIdsV1AgentsSearchPost))
|
|
89
94
|
|
|
90
95
|
/**
|
|
91
96
|
* Gets the default agent slug
|
|
@@ -238,6 +243,54 @@ class AgentToolsClient extends ReactQueryNetworkClient {
|
|
|
238
243
|
* remove an agent from favorites
|
|
239
244
|
*/
|
|
240
245
|
removeFavorite = this.mutation(removeAuthorizationParam(deleteFavoriteV1AgentsAgentIdFavoriteDelete))
|
|
246
|
+
/**
|
|
247
|
+
* Creates an agent version
|
|
248
|
+
*/
|
|
249
|
+
createAgentVersion = this.mutation(removeAuthorizationParam(createVersionV1AgentsAgentCoreIdVersionsPost))
|
|
250
|
+
/**
|
|
251
|
+
* V2 of agent creation
|
|
252
|
+
*/
|
|
253
|
+
createAgentV2 = this.mutation(removeAuthorizationParam(createAgentV2AgentsPost))
|
|
254
|
+
/**
|
|
255
|
+
* V2 of agent update
|
|
256
|
+
*/
|
|
257
|
+
updateAgentV2 = this.mutation(removeAuthorizationParam(updateAgentV2AgentsAgentIdPatch))
|
|
258
|
+
/**
|
|
259
|
+
* Update agent recommended version
|
|
260
|
+
*/
|
|
261
|
+
updateRecommendedVersion = this.mutation(removeAuthorizationParam(patchVersionRecommendedV1AgentsAgentCoreIdVersionsVersionNumberPatch))
|
|
262
|
+
/**
|
|
263
|
+
* V2 of get agent by id
|
|
264
|
+
*/
|
|
265
|
+
agentV2 = this.query(removeAuthorizationParam(findByAgentCoreIdV2AgentsAgentCoreIdGet))
|
|
266
|
+
/**
|
|
267
|
+
* Deletes an agent version
|
|
268
|
+
*/
|
|
269
|
+
deleteVersion = this.mutation(removeAuthorizationParam(deleteVersionV1AgentsAgentCoreIdVersionsVersionNumberDelete))
|
|
270
|
+
/**
|
|
271
|
+
* Gets agent versions
|
|
272
|
+
*/
|
|
273
|
+
listAgentVersions = this.query(removeAuthorizationParam(listVersionsOfAgentCoreV1AgentsAgentCoreIdVersionsGet))
|
|
274
|
+
/**
|
|
275
|
+
* Get agents by list of ids using api v2
|
|
276
|
+
*/
|
|
277
|
+
agentsByIdsV2 = this.query(removeAuthorizationParam(searchAgentsV2AgentsSearchPost))
|
|
278
|
+
/**
|
|
279
|
+
* Deletes an agent version
|
|
280
|
+
*/
|
|
281
|
+
forkAgentVersion = this.mutation(removeAuthorizationParam(forkAgentVersionV1AgentsAgentCoreIdVersionsVersionNumberForkPost))
|
|
282
|
+
/**
|
|
283
|
+
* Get agents v4
|
|
284
|
+
*/
|
|
285
|
+
agentsV4 = this.infiniteQuery(listAgentsV4, {
|
|
286
|
+
pageParamName: 'filters.page',
|
|
287
|
+
accumulator: 'items',
|
|
288
|
+
getNextPageParam: ({ variables, lastPage, lastPageParam }) => {
|
|
289
|
+
const size = variables.filters.size ?? 1
|
|
290
|
+
const parsedLastPageParam = (lastPageParam as number) ?? variables.filters.page ?? 1
|
|
291
|
+
return lastPage.items && lastPage.items.length < size ? undefined : parsedLastPageParam + 1
|
|
292
|
+
},
|
|
293
|
+
})
|
|
241
294
|
}
|
|
242
295
|
|
|
243
296
|
export const agentToolsClient = new AgentToolsClient()
|