@stack-spot/portal-network 0.151.0-beta.1 → 0.151.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/CHANGELOG.md +21 -0
- package/dist/api/agent-tools.d.ts +25 -2
- package/dist/api/agent-tools.d.ts.map +1 -1
- package/dist/api/agent-tools.js +8 -5
- package/dist/api/agent-tools.js.map +1 -1
- package/dist/api/workspace-ai.d.ts +26 -1
- package/dist/api/workspace-ai.d.ts.map +1 -1
- package/dist/api/workspace-ai.js +26 -0
- package/dist/api/workspace-ai.js.map +1 -1
- package/dist/client/agent-tools.d.ts +15 -88
- package/dist/client/agent-tools.d.ts.map +1 -1
- package/dist/client/agent-tools.js +11 -133
- package/dist/client/agent-tools.js.map +1 -1
- package/dist/client/agent.d.ts +50 -5
- package/dist/client/agent.d.ts.map +1 -1
- package/dist/client/agent.js +64 -0
- package/dist/client/agent.js.map +1 -1
- package/dist/client/ai.d.ts +0 -7
- package/dist/client/ai.d.ts.map +1 -1
- package/dist/client/ai.js +1 -10
- package/dist/client/ai.js.map +1 -1
- package/dist/client/types.d.ts +4 -5
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/workspace-ai.d.ts +26 -0
- package/dist/client/workspace-ai.d.ts.map +1 -1
- package/dist/client/workspace-ai.js +28 -0
- package/dist/client/workspace-ai.js.map +1 -1
- package/dist/error/dictionary/cnt.d.ts +8 -0
- package/dist/error/dictionary/cnt.d.ts.map +1 -1
- package/dist/error/dictionary/cnt.js +8 -0
- package/dist/error/dictionary/cnt.js.map +1 -1
- package/package.json +6 -6
- package/src/api/agent-tools.ts +31 -5
- package/src/api/workspace-ai.ts +60 -1
- package/src/client/agent-tools.ts +7 -102
- package/src/client/agent.ts +68 -0
- package/src/client/ai.ts +0 -5
- package/src/client/types.ts +5 -7
- package/src/client/workspace-ai.ts +31 -0
- package/src/error/dictionary/cnt.ts +11 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HttpError } from '@oazapfts/runtime';
|
|
2
2
|
import { AgentResponse } from '../api/agent.js';
|
|
3
|
+
import { CustomToolkitResponse } from '../api/agent-tools.js';
|
|
3
4
|
import { GetAiStackResponse, KnowledgeSourceItemResponse, QuickCommandResponse } from '../api/ai.js';
|
|
4
5
|
import { StackspotAPIError } from '../error/StackspotAPIError.js';
|
|
5
6
|
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient.js';
|
|
@@ -35,6 +36,9 @@ declare class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
35
36
|
authorization: string;
|
|
36
37
|
xAccountId?: string | null | undefined;
|
|
37
38
|
}, "authorization" | "authorizationHeader" | "jwtToken"> & {}, unknown>;
|
|
39
|
+
/**
|
|
40
|
+
* Adds a resource to the Spot.
|
|
41
|
+
*/
|
|
38
42
|
addResourceTypeToWorkspaceAi: import("../network/types.js").MutationObject<Omit<{
|
|
39
43
|
workspaceId: string;
|
|
40
44
|
contentType: import("../api/workspace-ai.js").ContentType;
|
|
@@ -42,6 +46,9 @@ declare class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
42
46
|
xAccountId?: string | null | undefined;
|
|
43
47
|
addWorkspaceContentRequest: import("../api/workspace-ai.js").AddWorkspaceContentRequest;
|
|
44
48
|
}, "authorization">, FixedAddResourceToWorkspaceAi>;
|
|
49
|
+
/**
|
|
50
|
+
* Lists all the knowledge sources in a Spot.
|
|
51
|
+
*/
|
|
45
52
|
getKSFromWorkspaceAi: import("../network/types.js").QueryObject<Omit<{
|
|
46
53
|
workspaceId: string;
|
|
47
54
|
contentType: import("../api/workspace-ai.js").ContentType;
|
|
@@ -49,6 +56,9 @@ declare class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
49
56
|
authorization: string;
|
|
50
57
|
xAccountId?: string | null | undefined;
|
|
51
58
|
}, "contentType" | "authorization">, KnowledgeSourceItemResponse[]>;
|
|
59
|
+
/**
|
|
60
|
+
* Lists all the stacks in a Spot.
|
|
61
|
+
*/
|
|
52
62
|
getStackFromWorkspaceAi: import("../network/types.js").QueryObject<Omit<{
|
|
53
63
|
workspaceId: string;
|
|
54
64
|
contentType: import("../api/workspace-ai.js").ContentType;
|
|
@@ -56,6 +66,9 @@ declare class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
56
66
|
authorization: string;
|
|
57
67
|
xAccountId?: string | null | undefined;
|
|
58
68
|
}, "contentType" | "authorization">, GetAiStackResponse[]>;
|
|
69
|
+
/**
|
|
70
|
+
* Lists all the quick commands in a Spot.
|
|
71
|
+
*/
|
|
59
72
|
getQCFromWorkspaceAi: import("../network/types.js").QueryObject<Omit<{
|
|
60
73
|
workspaceId: string;
|
|
61
74
|
contentType: import("../api/workspace-ai.js").ContentType;
|
|
@@ -63,6 +76,9 @@ declare class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
63
76
|
authorization: string;
|
|
64
77
|
xAccountId?: string | null | undefined;
|
|
65
78
|
}, "contentType" | "authorization">, QuickCommandResponse[]>;
|
|
79
|
+
/**
|
|
80
|
+
* Lists all the agents in a Spot.
|
|
81
|
+
*/
|
|
66
82
|
getAgentFromWorkspaceAi: import("../network/types.js").QueryObject<Omit<{
|
|
67
83
|
workspaceId: string;
|
|
68
84
|
contentType: import("../api/workspace-ai.js").ContentType;
|
|
@@ -70,6 +86,16 @@ declare class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
70
86
|
authorization: string;
|
|
71
87
|
xAccountId?: string | null | undefined;
|
|
72
88
|
}, "contentType" | "authorization">, AgentResponse[]>;
|
|
89
|
+
/**
|
|
90
|
+
* Lists all the toolkits in a Spot.
|
|
91
|
+
*/
|
|
92
|
+
getToolkitsFromWorkspaceAi: import("../network/types.js").QueryObject<Omit<{
|
|
93
|
+
workspaceId: string;
|
|
94
|
+
contentType: import("../api/workspace-ai.js").ContentType;
|
|
95
|
+
name?: string | null | undefined;
|
|
96
|
+
authorization: string;
|
|
97
|
+
xAccountId?: string | null | undefined;
|
|
98
|
+
}, "contentType" | "authorization">, CustomToolkitResponse[]>;
|
|
73
99
|
deleteResourceTypeFromWorkspaceAi: import("../network/types.js").MutationObject<Omit<{
|
|
74
100
|
workspaceId: string;
|
|
75
101
|
contentType: import("../api/workspace-ai.js").ContentType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-ai.d.ts","sourceRoot":"","sources":["../../src/client/workspace-ai.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAoBjG,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAE5E,OAAO,EAAE,6BAA6B,EAAE,2BAA2B,EAAiB,MAAM,SAAS,CAAA;AAEnG,cAAM,iBAAkB,SAAQ,uBAAuB;;IAKrD,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,SAAS,GAAG,iBAAiB;IASlE,iBAAiB;;;;uHAA2E;IAC5F,YAAY;;;;;;sHAAsE;IAClF,WAAW;;;;oHAA0E;IACrF,iBAAiB;;;;;4EAAuF;IACxG,iBAAiB;;;;4EAAwF;IAEzG,4BAA4B;;;;;;wDAS1B;IAEF,oBAAoB;;;;;;wEAUlB;IAEF,uBAAuB;;;;;;+DAUrB;IAEF,oBAAoB;;;;;;iEAUlB;IAEF,uBAAuB;;;;;;0DAUrB;IAEF,iCAAiC;;;;;;4EACiC;IAClE,0BAA0B;;;;;4EAAgG;IAC1H,6BAA6B;;;;;4EAAoG;IAEjI;;;;;OAKG;IAEH,mBAAmB;;;;;;;;;;;oCAAuQ;IAE1R;;OAEG;IACH,sBAAsB;;;;4EAA0F;IAEhH;;OAEG;IACH,yBAAyB;;;;4EAA+F;IAExH;;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;4EAA0F;IAEhH;;OAEG;IACH,yBAAyB;;;;4EAA+F;IAExH;;OAEG;IACH,wBAAwB;;;;;4HAA2F;CACpH;AAED,eAAO,MAAM,iBAAiB,mBAA0B,CAAA"}
|
|
@@ -36,6 +36,9 @@ class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
36
36
|
writable: true,
|
|
37
37
|
value: this.mutation(removeAuthorizationParam(deleteWorkspaceV1WorkspacesWorkspaceIdDelete))
|
|
38
38
|
});
|
|
39
|
+
/**
|
|
40
|
+
* Adds a resource to the Spot.
|
|
41
|
+
*/
|
|
39
42
|
Object.defineProperty(this, "addResourceTypeToWorkspaceAi", {
|
|
40
43
|
enumerable: true,
|
|
41
44
|
configurable: true,
|
|
@@ -46,6 +49,9 @@ class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
46
49
|
permission: this.createPermissionFunctionFor(addContentV1WorkspacesWorkspaceIdContentTypePost),
|
|
47
50
|
})
|
|
48
51
|
});
|
|
52
|
+
/**
|
|
53
|
+
* Lists all the knowledge sources in a Spot.
|
|
54
|
+
*/
|
|
49
55
|
Object.defineProperty(this, "getKSFromWorkspaceAi", {
|
|
50
56
|
enumerable: true,
|
|
51
57
|
configurable: true,
|
|
@@ -56,6 +62,9 @@ class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
56
62
|
permission: this.createPermissionFunctionFor(listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet),
|
|
57
63
|
})
|
|
58
64
|
});
|
|
65
|
+
/**
|
|
66
|
+
* Lists all the stacks in a Spot.
|
|
67
|
+
*/
|
|
59
68
|
Object.defineProperty(this, "getStackFromWorkspaceAi", {
|
|
60
69
|
enumerable: true,
|
|
61
70
|
configurable: true,
|
|
@@ -66,6 +75,9 @@ class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
66
75
|
permission: this.createPermissionFunctionFor(listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet),
|
|
67
76
|
})
|
|
68
77
|
});
|
|
78
|
+
/**
|
|
79
|
+
* Lists all the quick commands in a Spot.
|
|
80
|
+
*/
|
|
69
81
|
Object.defineProperty(this, "getQCFromWorkspaceAi", {
|
|
70
82
|
enumerable: true,
|
|
71
83
|
configurable: true,
|
|
@@ -76,6 +88,9 @@ class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
76
88
|
permission: this.createPermissionFunctionFor(listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet),
|
|
77
89
|
})
|
|
78
90
|
});
|
|
91
|
+
/**
|
|
92
|
+
* Lists all the agents in a Spot.
|
|
93
|
+
*/
|
|
79
94
|
Object.defineProperty(this, "getAgentFromWorkspaceAi", {
|
|
80
95
|
enumerable: true,
|
|
81
96
|
configurable: true,
|
|
@@ -86,6 +101,19 @@ class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
86
101
|
permission: this.createPermissionFunctionFor(listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet),
|
|
87
102
|
})
|
|
88
103
|
});
|
|
104
|
+
/**
|
|
105
|
+
* Lists all the toolkits in a Spot.
|
|
106
|
+
*/
|
|
107
|
+
Object.defineProperty(this, "getToolkitsFromWorkspaceAi", {
|
|
108
|
+
enumerable: true,
|
|
109
|
+
configurable: true,
|
|
110
|
+
writable: true,
|
|
111
|
+
value: this.query({
|
|
112
|
+
name: 'ToolkitWorkspaceAi',
|
|
113
|
+
request: (signal, variables) => listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet({ ...variables, contentType: 'toolkit', authorization: '' }, { signal }),
|
|
114
|
+
permission: this.createPermissionFunctionFor(listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet),
|
|
115
|
+
})
|
|
116
|
+
});
|
|
89
117
|
Object.defineProperty(this, "deleteResourceTypeFromWorkspaceAi", {
|
|
90
118
|
enumerable: true,
|
|
91
119
|
configurable: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-ai.js","sourceRoot":"","sources":["../../src/client/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;;;mBAA4B,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,iDAAiD,CAAC,CAAC;WAAA;IArInH,CAAC;IAES,mBAAmB,CAAC,KAAgB;QAC5C,OAAO,IAAI,iBAAiB,CAAC;YAC3B,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,OAAO,EAAG,KAAK,CAAC,IAAwC,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC;SAC9F,CAAC,CAAA;IACJ,CAAC;CA6HF;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,iBAAiB,EAAE,CAAA"}
|
|
@@ -42,6 +42,10 @@ export declare const cntDictionary: {
|
|
|
42
42
|
CNT_STACK_ADD_WORKFLOWS_INCONSISTENCY_BY_INFRA_PLUGIN_NOT_FOUND_DEPENDENCIES_ERROR: string;
|
|
43
43
|
CNT_CONTENT_NO_PERMISSION_TO_ARCHIVE: string;
|
|
44
44
|
CNT_STUDIO_SLUG_RESERVED_PREFIX_ERROR: string;
|
|
45
|
+
CNT_CUSTOMIZED_WORKFLOW_NO_PERMISSION_TO_DEPRECATE: string;
|
|
46
|
+
CNT_CUSTOMIZED_WORKFLOW_NO_PERMISSION_TO_UNPUBLISH: string;
|
|
47
|
+
CNT_WORKFLOW_NO_PERMISSION_TO_DEPRECATE: string;
|
|
48
|
+
CNT_WORKFLOW_NO_PERMISSION_TO_UNPUBLISH: string;
|
|
45
49
|
};
|
|
46
50
|
pt: {
|
|
47
51
|
CNT_MALFORMED_FIELDS_IN_PAYLOAD: string;
|
|
@@ -86,6 +90,10 @@ export declare const cntDictionary: {
|
|
|
86
90
|
CNT_STACK_ADD_WORKFLOWS_INCONSISTENCY_BY_INFRA_PLUGIN_NOT_FOUND_DEPENDENCIES_ERROR: string;
|
|
87
91
|
CNT_CONTENT_NO_PERMISSION_TO_ARCHIVE: string;
|
|
88
92
|
CNT_STUDIO_SLUG_RESERVED_PREFIX_ERROR: string;
|
|
93
|
+
CNT_CUSTOMIZED_WORKFLOW_NO_PERMISSION_TO_DEPRECATE: string;
|
|
94
|
+
CNT_CUSTOMIZED_WORKFLOW_NO_PERMISSION_TO_UNPUBLISH: string;
|
|
95
|
+
CNT_WORKFLOW_NO_PERMISSION_TO_DEPRECATE: string;
|
|
96
|
+
CNT_WORKFLOW_NO_PERMISSION_TO_UNPUBLISH: string;
|
|
89
97
|
};
|
|
90
98
|
};
|
|
91
99
|
//# sourceMappingURL=cnt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cnt.d.ts","sourceRoot":"","sources":["../../../src/error/dictionary/cnt.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"cnt.d.ts","sourceRoot":"","sources":["../../../src/error/dictionary/cnt.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmGJ,CAAA"}
|
|
@@ -42,6 +42,10 @@ export const cntDictionary = {
|
|
|
42
42
|
CNT_STACK_ADD_WORKFLOWS_INCONSISTENCY_BY_INFRA_PLUGIN_NOT_FOUND_DEPENDENCIES_ERROR: 'There are workflows entered that depend on infra type plugins that were not found to add to the stack',
|
|
43
43
|
CNT_CONTENT_NO_PERMISSION_TO_ARCHIVE: 'User has no permission to archive this type of content',
|
|
44
44
|
CNT_STUDIO_SLUG_RESERVED_PREFIX_ERROR: 'The prefix \'stackspot\' in the studio slug is reserved and cannot be used',
|
|
45
|
+
CNT_CUSTOMIZED_WORKFLOW_NO_PERMISSION_TO_DEPRECATE: 'You do not have permission to deprecate customized workflows. Please request access from your administrator to proceed.',
|
|
46
|
+
CNT_CUSTOMIZED_WORKFLOW_NO_PERMISSION_TO_UNPUBLISH: 'You do not have permission to unpublish customized workflows. Please request access from your administrator to proceed.',
|
|
47
|
+
CNT_WORKFLOW_NO_PERMISSION_TO_DEPRECATE: 'You do not have permission to deprecate base/normal workflows. Please request access from your administrator to proceed.',
|
|
48
|
+
CNT_WORKFLOW_NO_PERMISSION_TO_UNPUBLISH: 'You do not have permission to unpublish base/normal workflows. Please request access from your administrator to proceed.',
|
|
45
49
|
},
|
|
46
50
|
pt: {
|
|
47
51
|
CNT_MALFORMED_FIELDS_IN_PAYLOAD: 'Alguns campos estão incorretos. Verifique os dados.',
|
|
@@ -86,6 +90,10 @@ export const cntDictionary = {
|
|
|
86
90
|
CNT_STACK_ADD_WORKFLOWS_INCONSISTENCY_BY_INFRA_PLUGIN_NOT_FOUND_DEPENDENCIES_ERROR: 'Existem workflows inseridos que dependem de plugins do tipo infra que não foram encontrados para adicionar à stack',
|
|
87
91
|
CNT_CONTENT_NO_PERMISSION_TO_ARCHIVE: 'O usuário não tem permissão para arquivar esse tipo de conteúdo.',
|
|
88
92
|
CNT_STUDIO_SLUG_RESERVED_PREFIX_ERROR: 'O prefixo \'stackspot\' no slug do estúdio é reservado e não pode ser utilizado',
|
|
93
|
+
CNT_CUSTOMIZED_WORKFLOW_NO_PERMISSION_TO_DEPRECATE: 'Você não possui permissão para depreciar workflows do tipo customizado. Solicite ao administrador o acesso para continuar',
|
|
94
|
+
CNT_CUSTOMIZED_WORKFLOW_NO_PERMISSION_TO_UNPUBLISH: 'Você não possui permissão para despublicar workflows do tipo customizado. Solicite ao administrador o acesso para continuar',
|
|
95
|
+
CNT_WORKFLOW_NO_PERMISSION_TO_DEPRECATE: 'Você não possui permissão para depreciar workflows do tipo base/normal. Solicite ao administrador o acesso para continuar',
|
|
96
|
+
CNT_WORKFLOW_NO_PERMISSION_TO_UNPUBLISH: 'Você não possui permissão para despublicar workflows do tipo base/normal. Solicite ao administrador o acesso para continuar',
|
|
89
97
|
},
|
|
90
98
|
};
|
|
91
99
|
//# sourceMappingURL=cnt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cnt.js","sourceRoot":"","sources":["../../../src/error/dictionary/cnt.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,EAAE,EAAE;QACF,+BAA+B,EAAE,2EAA2E;QAC5G,2BAA2B,EAAE,2DAA2D;QACxF,0BAA0B,EAAE,0DAA0D;QACtF,+BAA+B,EAAE,gEAAgE;QACjG,yBAAyB,EAAE,yDAAyD;QACpF,gCAAgC,EAAE,0DAA0D;QAC5F,iCAAiC,EAAE,kEAAkE;QACrG,8BAA8B,EAAE,oCAAoC;QACpE,iCAAiC,EAAE,iEAAiE;QACpG,mDAAmD,EAAE,gDAAgD;QACrG,iCAAiC,EAAE,uDAAuD;QAC1F,mCAAmC,EAAE,uDAAuD;QAC5F,oCAAoC,EAAE,iEAAiE;QACvG,4CAA4C,EAAE,wJAAwJ;QACtM,sCAAsC,EAAE,gEAAgE;QACxG,uBAAuB,EAAE,+DAA+D;QACxF,iCAAiC,EAAE,0CAA0C;QAC7E,wBAAwB,EAAE,+CAA+C;QACzE,0CAA0C,EAAE,wGAAwG;QACpJ,0CAA0C,EAAE,sCAAsC;QAClF,8BAA8B,EAAE,6BAA6B;QAC7D,iCAAiC,EAAE,4EAA4E;QAC/G,kCAAkC,EAAE,iFAAiF;QACrH,kCAAkC,EAAE,iFAAiF;QACrH,uBAAuB,EAAE,sGAAsG;QAC/H,mDAAmD,EAAE,2EAA2E;QAChI,mDAAmD,EAAE,mFAAmF;QACxI,mDAAmD,EAAE,gGAAgG;QACrJ,uDAAuD,EAAE,iGAAiG;QAC1J,wCAAwC,EAAE,kCAAkC;QAC5E,sCAAsC,EAAE,2CAA2C;QACnF,+BAA+B,EAAE,2CAA2C;QAC5E,6CAA6C,EAAE,mFAAmF;QAClI,6CAA6C,EAAE,iDAAiD;QAChG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uB,EAAE,8EAA8E;QACvG,mDAAmD,EAAE,wGAAwG;QAC7J,mDAAmD,EAAE,wGAAwG;QAC7J,mDAAmD,EAAE,oHAAoH;QACzK,uDAAuD,EAAE,kGAAkG;QAC3J,wCAAwC,EAAE,0CAA0C;QACpF,sCAAsC,EAAE,2CAA2C;QACnF,+BAA+B,EAAE,2CAA2C;QAC5E,6CAA6C,EAAE,kGAAkG;QACjJ,6CAA6C,EAAE,0DAA0D;QACzG,oDAAoD,EAAE,uEAAuE;QAC7H,kDAAkD,EAAE,uDAAuD;QAC3G,wEAAwE,EAAE,kGAAkG;QAC5K,kFAAkF,EAAE,qLAAqL;QACzQ,oGAAoG,EAAE,gJAAgJ;QACtP,kFAAkF,EAAE,oHAAoH;QACxM,oCAAoC,EAAE,kEAAkE;QACxG,qCAAqC,EAAE,iFAAiF;QACxH,kDAAkD,EAAE,2HAA2H;QAC/K,kDAAkD,EAAE,6HAA6H;QACjL,uCAAuC,EAAE,2HAA2H;QACpK,uCAAuC,EAAE,6HAA6H;KAEvK;CACmB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stack-spot/portal-network",
|
|
3
|
-
"version": "0.151.0
|
|
3
|
+
"version": "0.151.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
"./package.json": "./package.json",
|
|
10
10
|
"./api/*": "./dist/api/*.js"
|
|
11
11
|
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "rimraf dist && tsc-silent -p tsconfig.build.json --suppress @/src/api/ && tsc-esm-fix --target='dist'",
|
|
14
|
+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
15
|
+
"generate": "tsx ./scripts/generate-apis.ts"
|
|
16
|
+
},
|
|
12
17
|
"peerDependencies": {
|
|
13
18
|
"@stack-spot/auth": "^5.3.3",
|
|
14
19
|
"@stack-spot/opa": "^2.6.1",
|
|
@@ -50,10 +55,5 @@
|
|
|
50
55
|
"@oazapfts/runtime": "^1.0.3",
|
|
51
56
|
"fetch-event-stream": "^0.1.5",
|
|
52
57
|
"lodash": "^4.17.21"
|
|
53
|
-
},
|
|
54
|
-
"scripts": {
|
|
55
|
-
"build": "rimraf dist && tsc-silent -p tsconfig.build.json --suppress @/src/api/ && tsc-esm-fix --target='dist'",
|
|
56
|
-
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
57
|
-
"generate": "tsx ./scripts/generate-apis.ts"
|
|
58
58
|
}
|
|
59
59
|
}
|
package/src/api/agent-tools.ts
CHANGED
|
@@ -92,6 +92,14 @@ export type ToolkitUpdateRequest = {
|
|
|
92
92
|
/** IAM secret ID (optional) */
|
|
93
93
|
secret_id?: string | null;
|
|
94
94
|
};
|
|
95
|
+
export type ToolkitForkRequest = {
|
|
96
|
+
/** Toolkit name (up to 150 characters, required) */
|
|
97
|
+
name: string;
|
|
98
|
+
/** Toolkit description (up to 1024 characters, optional) */
|
|
99
|
+
description?: string | null;
|
|
100
|
+
/** Toolkit avatar (text base64, optional) */
|
|
101
|
+
avatar?: string | null;
|
|
102
|
+
};
|
|
95
103
|
export type HttpMethod = "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
96
104
|
export type Reference = {
|
|
97
105
|
$ref: string;
|
|
@@ -386,12 +394,25 @@ export type SearchAgentsRequest = {
|
|
|
386
394
|
/** Agent ids to filter for */
|
|
387
395
|
ids: string[];
|
|
388
396
|
};
|
|
397
|
+
export type KnowledgeSourceDetails = {
|
|
398
|
+
id: string;
|
|
399
|
+
slug: string;
|
|
400
|
+
name: string;
|
|
401
|
+
description: string;
|
|
402
|
+
"type": string;
|
|
403
|
+
creator?: string | null;
|
|
404
|
+
"default": boolean;
|
|
405
|
+
visibility_level: VisibilityLevelEnum;
|
|
406
|
+
model_name: string;
|
|
407
|
+
username?: string | null;
|
|
408
|
+
};
|
|
389
409
|
export type KnowledgeSourceConfigModel = {
|
|
390
410
|
similarity_function: SimilarityFunctionEnum;
|
|
391
411
|
max_number_of_kos: number;
|
|
392
412
|
relevancy_threshold: number;
|
|
393
413
|
post_processing: boolean;
|
|
394
414
|
knowledge_sources: string[];
|
|
415
|
+
knowledge_sources_details: KnowledgeSourceDetails[];
|
|
395
416
|
sealed: boolean;
|
|
396
417
|
created_by?: string | null;
|
|
397
418
|
created_at?: string | null;
|
|
@@ -722,13 +743,14 @@ export function deleteToolkitV1ToolkitsToolkitIdDelete({ toolkitId, xAccountId,
|
|
|
722
743
|
/**
|
|
723
744
|
* Fork Toolkit
|
|
724
745
|
*/
|
|
725
|
-
export function forkToolkitV1ToolkitsToolkitIdForkPost({ toolkitId, xAccountId, xUsername, xUserId, xUserFullName, authorization }: {
|
|
746
|
+
export function forkToolkitV1ToolkitsToolkitIdForkPost({ toolkitId, xAccountId, xUsername, xUserId, xUserFullName, authorization, toolkitForkRequest }: {
|
|
726
747
|
toolkitId: string;
|
|
727
748
|
xAccountId?: string | null;
|
|
728
749
|
xUsername?: string | null;
|
|
729
750
|
xUserId?: string | null;
|
|
730
751
|
xUserFullName?: string | null;
|
|
731
752
|
authorization: string;
|
|
753
|
+
toolkitForkRequest: ToolkitForkRequest;
|
|
732
754
|
}, opts?: Oazapfts.RequestOpts) {
|
|
733
755
|
return oazapfts.ok(oazapfts.fetchJson<{
|
|
734
756
|
status: 201;
|
|
@@ -738,9 +760,10 @@ export function forkToolkitV1ToolkitsToolkitIdForkPost({ toolkitId, xAccountId,
|
|
|
738
760
|
} | {
|
|
739
761
|
status: 422;
|
|
740
762
|
data: HttpValidationError;
|
|
741
|
-
}>(`/v1/toolkits/${encodeURIComponent(toolkitId)}/fork`, {
|
|
763
|
+
}>(`/v1/toolkits/${encodeURIComponent(toolkitId)}/fork`, oazapfts.json({
|
|
742
764
|
...opts,
|
|
743
765
|
method: "POST",
|
|
766
|
+
body: toolkitForkRequest,
|
|
744
767
|
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
745
768
|
"x-account-id": xAccountId,
|
|
746
769
|
"x-username": xUsername,
|
|
@@ -748,7 +771,7 @@ export function forkToolkitV1ToolkitsToolkitIdForkPost({ toolkitId, xAccountId,
|
|
|
748
771
|
"x-user-full-name": xUserFullName,
|
|
749
772
|
authorization
|
|
750
773
|
})
|
|
751
|
-
}));
|
|
774
|
+
})));
|
|
752
775
|
}
|
|
753
776
|
/**
|
|
754
777
|
* Get Toolkit Tool
|
|
@@ -1226,8 +1249,9 @@ export function searchAgentsV1AgentsSearchPost({ xAccountId, xUsername, xUserId,
|
|
|
1226
1249
|
/**
|
|
1227
1250
|
* Get Agent
|
|
1228
1251
|
*/
|
|
1229
|
-
export function getAgentV1AgentsAgentIdGet({ agentId, xAccountId, xUsername, xUserId, xUserFullName, authorization }: {
|
|
1252
|
+
export function getAgentV1AgentsAgentIdGet({ agentId, details, xAccountId, xUsername, xUserId, xUserFullName, authorization }: {
|
|
1230
1253
|
agentId: string;
|
|
1254
|
+
details?: boolean;
|
|
1231
1255
|
xAccountId?: string | null;
|
|
1232
1256
|
xUsername?: string | null;
|
|
1233
1257
|
xUserId?: string | null;
|
|
@@ -1242,7 +1266,9 @@ export function getAgentV1AgentsAgentIdGet({ agentId, xAccountId, xUsername, xUs
|
|
|
1242
1266
|
} | {
|
|
1243
1267
|
status: 422;
|
|
1244
1268
|
data: HttpValidationError;
|
|
1245
|
-
}>(`/v1/agents/${encodeURIComponent(agentId)}
|
|
1269
|
+
}>(`/v1/agents/${encodeURIComponent(agentId)}${QS.query(QS.explode({
|
|
1270
|
+
details
|
|
1271
|
+
}))}`, {
|
|
1246
1272
|
...opts,
|
|
1247
1273
|
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1248
1274
|
"x-account-id": xAccountId,
|
package/src/api/workspace-ai.ts
CHANGED
|
@@ -44,6 +44,12 @@ export type UpdateWorkspaceRequest = {
|
|
|
44
44
|
description?: string | null;
|
|
45
45
|
logo?: string | null;
|
|
46
46
|
};
|
|
47
|
+
export type ShareableLinkResponse = {
|
|
48
|
+
id: string;
|
|
49
|
+
workspace_id: string;
|
|
50
|
+
"type": string;
|
|
51
|
+
created_by: string;
|
|
52
|
+
};
|
|
47
53
|
export type Action = "view" | "edit" | "grant_access";
|
|
48
54
|
export type PermissionListRequest = {
|
|
49
55
|
identifier: string;
|
|
@@ -55,7 +61,7 @@ export type WorkspacePermissionRequest = {
|
|
|
55
61
|
permission_type: PermissionType;
|
|
56
62
|
};
|
|
57
63
|
export type SortBy = "name" | "permission";
|
|
58
|
-
export type ContentType = "knowledge_source" | "quick_command" | "agent" | "stack" | "spot";
|
|
64
|
+
export type ContentType = "knowledge_source" | "quick_command" | "agent" | "stack" | "spot" | "toolkit";
|
|
59
65
|
export type AddWorkspaceContentRequest = {
|
|
60
66
|
content_identifier: string[];
|
|
61
67
|
};
|
|
@@ -74,6 +80,9 @@ export type ListWksContentsResponse = {
|
|
|
74
80
|
agents?: {
|
|
75
81
|
[key: string]: any;
|
|
76
82
|
}[] | null;
|
|
83
|
+
toolkits?: {
|
|
84
|
+
[key: string]: any;
|
|
85
|
+
}[] | null;
|
|
77
86
|
};
|
|
78
87
|
/**
|
|
79
88
|
* Create Workspace
|
|
@@ -253,6 +262,31 @@ export function deleteFavoriteV1WorkspacesWorkspaceIdFavoriteDelete({ workspaceI
|
|
|
253
262
|
})
|
|
254
263
|
}));
|
|
255
264
|
}
|
|
265
|
+
/**
|
|
266
|
+
* Create Shareable Link
|
|
267
|
+
*/
|
|
268
|
+
export function createShareableLinkV1WorkspacesWorkspaceIdSharePost({ workspaceId, authorization, xAccountId }: {
|
|
269
|
+
workspaceId: string;
|
|
270
|
+
authorization: string;
|
|
271
|
+
xAccountId?: string | null;
|
|
272
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
273
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
274
|
+
status: 201;
|
|
275
|
+
data: ShareableLinkResponse;
|
|
276
|
+
} | {
|
|
277
|
+
status: 404;
|
|
278
|
+
} | {
|
|
279
|
+
status: 422;
|
|
280
|
+
data: HttpValidationError;
|
|
281
|
+
}>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/share`, {
|
|
282
|
+
...opts,
|
|
283
|
+
method: "POST",
|
|
284
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
285
|
+
authorization,
|
|
286
|
+
"x-account-id": xAccountId
|
|
287
|
+
})
|
|
288
|
+
}));
|
|
289
|
+
}
|
|
256
290
|
/**
|
|
257
291
|
* Add Permission
|
|
258
292
|
*/
|
|
@@ -484,6 +518,31 @@ export function listAllContentsV1WorkspacesWorkspaceIdContentsGet({ workspaceId,
|
|
|
484
518
|
})
|
|
485
519
|
}));
|
|
486
520
|
}
|
|
521
|
+
/**
|
|
522
|
+
* Use Shareable Link
|
|
523
|
+
*/
|
|
524
|
+
export function useShareableLinkV1ShareShareIdPatch({ shareId, authorization, xAccountId }: {
|
|
525
|
+
shareId: string;
|
|
526
|
+
authorization: string;
|
|
527
|
+
xAccountId?: string | null;
|
|
528
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
529
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
530
|
+
status: 200;
|
|
531
|
+
data: ShareableLinkResponse;
|
|
532
|
+
} | {
|
|
533
|
+
status: 404;
|
|
534
|
+
} | {
|
|
535
|
+
status: 422;
|
|
536
|
+
data: HttpValidationError;
|
|
537
|
+
}>(`/v1/share/${encodeURIComponent(shareId)}`, {
|
|
538
|
+
...opts,
|
|
539
|
+
method: "PATCH",
|
|
540
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
541
|
+
authorization,
|
|
542
|
+
"x-account-id": xAccountId
|
|
543
|
+
})
|
|
544
|
+
}));
|
|
545
|
+
}
|
|
487
546
|
/**
|
|
488
547
|
* Healthz
|
|
489
548
|
*/
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
-
import {
|
|
2
|
+
import { createToolkitToolsV1ToolkitsToolkitIdToolsPost, createToolkitV1ToolkitsPost, defaults, deleteToolkitToolsV1ToolkitsToolkitIdToolsDelete, deleteToolkitV1ToolkitsToolkitIdDelete, editToolkitToolV1ToolkitsToolkitIdToolsToolIdPut, forkToolkitV1ToolkitsToolkitIdForkPost, getPublicToolKitsV1BuiltinToolkitGet, getToolkitToolV1ToolkitsToolkitIdToolsToolIdGet, getToolkitV1ToolkitsToolkitIdGet, HttpValidationError, listAgentsUsingToolsV1ToolkitsToolkitIdToolsAgentsPost, listToolkitsV1ToolkitsGet, updateToolkitV1ToolkitsToolkitIdPatch } from '../api/agent-tools'
|
|
3
3
|
import apis from '../apis.json'
|
|
4
4
|
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
5
5
|
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
6
6
|
import { FetchEventStream } from '../network/types'
|
|
7
7
|
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
8
8
|
import { StreamedArray } from '../utils/StreamedArray'
|
|
9
|
-
import {
|
|
10
|
-
import { workspaceAiClient } from './workspace-ai'
|
|
11
|
-
|
|
12
|
-
const AGENT_DEFAULT_SLUG = 'stk_code_buddy'
|
|
9
|
+
import { AgentToolsOpenAPIPreview } from './types'
|
|
13
10
|
|
|
14
11
|
class AgentToolsClient extends ReactQueryNetworkClient {
|
|
15
12
|
constructor() {
|
|
@@ -29,104 +26,8 @@ class AgentToolsClient extends ReactQueryNetworkClient {
|
|
|
29
26
|
tools = this.query(removeAuthorizationParam(getPublicToolKitsV1BuiltinToolkitGet))
|
|
30
27
|
|
|
31
28
|
/**
|
|
32
|
-
*
|
|
33
|
-
*/
|
|
34
|
-
createAgent = this.mutation(removeAuthorizationParam(createAgentV1AgentsPost))
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Delete agent
|
|
38
|
-
*/
|
|
39
|
-
deleteAgent = this.mutation(deleteAgentV1AgentsAgentIdDelete)
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Updates an agent
|
|
43
|
-
*/
|
|
44
|
-
updateAgent = this.mutation(updateAgentV1AgentsAgentIdPut)
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Favorite an agent
|
|
48
|
-
*/
|
|
49
|
-
favoriteAgent = this.mutation(addFavoriteV1AgentsAgentIdFavoritePost)
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Publish an agent
|
|
53
|
-
*/
|
|
54
|
-
publishAgent = this.mutation(publishAgentV1AgentsAgentIdPublishPost)
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* List agents
|
|
58
|
-
*/
|
|
59
|
-
agents = this.infiniteQuery(removeAuthorizationParam(listAgentsV1AgentsGet))
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Gets agent by id
|
|
63
|
-
*/
|
|
64
|
-
agent = this.query(removeAuthorizationParam(getAgentV1AgentsAgentIdGet))
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Gets agents by ids
|
|
29
|
+
* Get list of Toolkits
|
|
68
30
|
*/
|
|
69
|
-
agentsByIds = this.query(removeAuthorizationParam(searchAgentsV1AgentsSearchPost))
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Gets the default agent slug
|
|
73
|
-
*/
|
|
74
|
-
agentDefaultSlug = AGENT_DEFAULT_SLUG
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Gets the default agent
|
|
78
|
-
*/
|
|
79
|
-
agentDefault = this.query({
|
|
80
|
-
name: 'agentDefault',
|
|
81
|
-
request: async (signal) => {
|
|
82
|
-
const agentDefault = await listAgentsV1AgentsGet(
|
|
83
|
-
{ visibility: 'built_in', slug: this.agentDefaultSlug, authorization: '' }, { signal },
|
|
84
|
-
)
|
|
85
|
-
|
|
86
|
-
const agentId = agentDefault.at(0)?.id
|
|
87
|
-
const agent = agentId ? await this.agent.query({ agentId }) : undefined
|
|
88
|
-
return agent
|
|
89
|
-
},
|
|
90
|
-
})
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* List agents filtered by visibility.
|
|
94
|
-
*/
|
|
95
|
-
allAgents = this.query({
|
|
96
|
-
name: 'allAgents',
|
|
97
|
-
request: async (signal, variables: { visibilities: (AgentVisibilityLevel | 'all')[] }) => {
|
|
98
|
-
const allVisibilities = ['account', 'built_in', 'favorite', 'personal', 'shared', 'workspace'] as const
|
|
99
|
-
const visibilities = variables.visibilities.includes('all')
|
|
100
|
-
? allVisibilities
|
|
101
|
-
: variables.visibilities as Array<AgentVisibilityLevelEnum | VisibilityLevelEnum>
|
|
102
|
-
|
|
103
|
-
const shouldFetchWorkspaceAgents = visibilities.includes('workspace')
|
|
104
|
-
|
|
105
|
-
const workspaceAgentsPromise = shouldFetchWorkspaceAgents
|
|
106
|
-
? workspaceAiClient.workspacesContentsByType.query({ contentType: 'agent' })
|
|
107
|
-
: Promise.resolve([])
|
|
108
|
-
|
|
109
|
-
const [workspaceAgents, ...agentsByVisibility] = await Promise.all([
|
|
110
|
-
workspaceAgentsPromise,
|
|
111
|
-
...visibilities.map((visibility) => listAgentsV1AgentsGet({ visibility, authorization: '' }, { signal })),
|
|
112
|
-
])
|
|
113
|
-
|
|
114
|
-
const workspaceAgentsWithSpaceName = workspaceAgents.flatMap(({ agents, space_name }) =>
|
|
115
|
-
agents?.map((agent) => ({ ...agent, spaceName: space_name, builtIn: false }))) as AgentResponseWithBuiltIn[]
|
|
116
|
-
|
|
117
|
-
const allAgents: AgentResponseWithBuiltIn[] = workspaceAgentsWithSpaceName ?? []
|
|
118
|
-
|
|
119
|
-
agentsByVisibility.forEach(agents => allAgents.push(...agents.map(agent => ({
|
|
120
|
-
...agent,
|
|
121
|
-
builtIn: agent?.visibility_level === 'built_in',
|
|
122
|
-
}))))
|
|
123
|
-
|
|
124
|
-
return allAgents
|
|
125
|
-
},
|
|
126
|
-
})
|
|
127
|
-
|
|
128
|
-
/* Get list of Toolkits
|
|
129
|
-
*/
|
|
130
31
|
toolkits = this.query(removeAuthorizationParam(listToolkitsV1ToolkitsGet))
|
|
131
32
|
/**
|
|
132
33
|
* Get a toolkit by Id
|
|
@@ -174,6 +75,10 @@ class AgentToolsClient extends ReactQueryNetworkClient {
|
|
|
174
75
|
* Lists the agents using the tools passed as parameter.
|
|
175
76
|
*/
|
|
176
77
|
agentsUsingTools = this.query(removeAuthorizationParam(listAgentsUsingToolsV1ToolkitsToolkitIdToolsAgentsPost))
|
|
78
|
+
/**
|
|
79
|
+
* Forks the toolkit.
|
|
80
|
+
*/
|
|
81
|
+
fork = this.mutation(removeAuthorizationParam(forkToolkitV1ToolkitsToolkitIdForkPost))
|
|
177
82
|
}
|
|
178
83
|
|
|
179
84
|
export const agentToolsClient = new AgentToolsClient()
|