@memberjunction/server 2.43.0 → 2.45.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/README.md +228 -2
- package/dist/generated/generated.d.ts +227 -5
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +1409 -29
- package/dist/generated/generated.js.map +1 -1
- package/dist/generic/ResolverBase.d.ts.map +1 -1
- package/dist/generic/ResolverBase.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/resolvers/AskSkipResolver.d.ts +1 -1
- package/dist/resolvers/AskSkipResolver.d.ts.map +1 -1
- package/dist/resolvers/AskSkipResolver.js +79 -48
- package/dist/resolvers/AskSkipResolver.js.map +1 -1
- package/dist/resolvers/ReportResolver.d.ts.map +1 -1
- package/dist/resolvers/ReportResolver.js +2 -1
- package/dist/resolvers/ReportResolver.js.map +1 -1
- package/dist/resolvers/RunAIPromptResolver.d.ts +19 -0
- package/dist/resolvers/RunAIPromptResolver.d.ts.map +1 -0
- package/dist/resolvers/RunAIPromptResolver.js +188 -0
- package/dist/resolvers/RunAIPromptResolver.js.map +1 -0
- package/dist/resolvers/RunTemplateResolver.d.ts +14 -0
- package/dist/resolvers/RunTemplateResolver.d.ts.map +1 -0
- package/dist/resolvers/RunTemplateResolver.js +138 -0
- package/dist/resolvers/RunTemplateResolver.js.map +1 -0
- package/package.json +23 -22
- package/src/generated/generated.ts +880 -21
- package/src/generic/ResolverBase.ts +2 -1
- package/src/index.ts +2 -0
- package/src/resolvers/AskSkipResolver.ts +120 -76
- package/src/resolvers/ReportResolver.ts +4 -1
- package/src/resolvers/RunAIPromptResolver.ts +169 -0
- package/src/resolvers/RunTemplateResolver.ts +130 -0
|
@@ -1840,6 +1840,461 @@ AIAgentNoteTypeResolver = __decorate([
|
|
|
1840
1840
|
Resolver(AIAgentNoteType_)
|
|
1841
1841
|
], AIAgentNoteTypeResolver);
|
|
1842
1842
|
export { AIAgentNoteTypeResolver };
|
|
1843
|
+
let AIAgentRun_ = class AIAgentRun_ {
|
|
1844
|
+
ID;
|
|
1845
|
+
AgentID;
|
|
1846
|
+
ParentRunID;
|
|
1847
|
+
Status;
|
|
1848
|
+
StartedAt;
|
|
1849
|
+
CompletedAt;
|
|
1850
|
+
Success;
|
|
1851
|
+
ErrorMessage;
|
|
1852
|
+
ConversationID;
|
|
1853
|
+
UserID;
|
|
1854
|
+
Result;
|
|
1855
|
+
AgentState;
|
|
1856
|
+
TotalTokensUsed;
|
|
1857
|
+
TotalCost;
|
|
1858
|
+
_mj__CreatedAt;
|
|
1859
|
+
_mj__UpdatedAt;
|
|
1860
|
+
MJ_AIAgentRunSteps_AgentRunIDArray;
|
|
1861
|
+
MJ_AIAgentRuns_ParentRunIDArray;
|
|
1862
|
+
MJ_AIPromptRuns_AgentRunIDArray;
|
|
1863
|
+
};
|
|
1864
|
+
__decorate([
|
|
1865
|
+
Field({ description: `Unique identifier for this agent run` }),
|
|
1866
|
+
MaxLength(16),
|
|
1867
|
+
__metadata("design:type", String)
|
|
1868
|
+
], AIAgentRun_.prototype, "ID", void 0);
|
|
1869
|
+
__decorate([
|
|
1870
|
+
Field({ description: `Reference to the AIAgent that is being executed in this run` }),
|
|
1871
|
+
MaxLength(16),
|
|
1872
|
+
__metadata("design:type", String)
|
|
1873
|
+
], AIAgentRun_.prototype, "AgentID", void 0);
|
|
1874
|
+
__decorate([
|
|
1875
|
+
Field({ nullable: true, description: `Reference to the parent agent run if this is a sub-agent execution. NULL for root-level agent runs. Enables hierarchical execution tracking.` }),
|
|
1876
|
+
MaxLength(16),
|
|
1877
|
+
__metadata("design:type", String)
|
|
1878
|
+
], AIAgentRun_.prototype, "ParentRunID", void 0);
|
|
1879
|
+
__decorate([
|
|
1880
|
+
Field({ description: `Current status of the agent run. Running -> Completed/Failed/Cancelled` }),
|
|
1881
|
+
MaxLength(100),
|
|
1882
|
+
__metadata("design:type", String)
|
|
1883
|
+
], AIAgentRun_.prototype, "Status", void 0);
|
|
1884
|
+
__decorate([
|
|
1885
|
+
Field({ description: `Timestamp when the agent run began execution` }),
|
|
1886
|
+
MaxLength(10),
|
|
1887
|
+
__metadata("design:type", Date)
|
|
1888
|
+
], AIAgentRun_.prototype, "StartedAt", void 0);
|
|
1889
|
+
__decorate([
|
|
1890
|
+
Field({ nullable: true, description: `Timestamp when the agent run completed (successfully or with failure). NULL while running.` }),
|
|
1891
|
+
MaxLength(10),
|
|
1892
|
+
__metadata("design:type", Date)
|
|
1893
|
+
], AIAgentRun_.prototype, "CompletedAt", void 0);
|
|
1894
|
+
__decorate([
|
|
1895
|
+
Field(() => Boolean, { nullable: true, description: `Indicates whether the agent run completed successfully. NULL while running, TRUE/FALSE when completed.` }),
|
|
1896
|
+
__metadata("design:type", Boolean)
|
|
1897
|
+
], AIAgentRun_.prototype, "Success", void 0);
|
|
1898
|
+
__decorate([
|
|
1899
|
+
Field({ nullable: true, description: `Error message if the agent run failed. NULL for successful runs.` }),
|
|
1900
|
+
__metadata("design:type", String)
|
|
1901
|
+
], AIAgentRun_.prototype, "ErrorMessage", void 0);
|
|
1902
|
+
__decorate([
|
|
1903
|
+
Field({ nullable: true, description: `Identifier linking multiple agent runs that are part of the same conversation or user session` }),
|
|
1904
|
+
MaxLength(16),
|
|
1905
|
+
__metadata("design:type", String)
|
|
1906
|
+
], AIAgentRun_.prototype, "ConversationID", void 0);
|
|
1907
|
+
__decorate([
|
|
1908
|
+
Field({ nullable: true, description: `User context identifier for authentication and permissions during the agent run` }),
|
|
1909
|
+
MaxLength(16),
|
|
1910
|
+
__metadata("design:type", String)
|
|
1911
|
+
], AIAgentRun_.prototype, "UserID", void 0);
|
|
1912
|
+
__decorate([
|
|
1913
|
+
Field({ nullable: true, description: `Final result or output from the agent execution, stored as JSON or text` }),
|
|
1914
|
+
__metadata("design:type", String)
|
|
1915
|
+
], AIAgentRun_.prototype, "Result", void 0);
|
|
1916
|
+
__decorate([
|
|
1917
|
+
Field({ nullable: true, description: `JSON serialization of the complete agent state, including conversation context, variables, and execution state. Enables pause/resume functionality.` }),
|
|
1918
|
+
__metadata("design:type", String)
|
|
1919
|
+
], AIAgentRun_.prototype, "AgentState", void 0);
|
|
1920
|
+
__decorate([
|
|
1921
|
+
Field(() => Int, { nullable: true, description: `Total number of tokens consumed by all LLM calls during this agent run` }),
|
|
1922
|
+
__metadata("design:type", Number)
|
|
1923
|
+
], AIAgentRun_.prototype, "TotalTokensUsed", void 0);
|
|
1924
|
+
__decorate([
|
|
1925
|
+
Field(() => Float, { nullable: true, description: `Total estimated cost for all AI model usage during this agent run` }),
|
|
1926
|
+
__metadata("design:type", Number)
|
|
1927
|
+
], AIAgentRun_.prototype, "TotalCost", void 0);
|
|
1928
|
+
__decorate([
|
|
1929
|
+
Field(),
|
|
1930
|
+
MaxLength(10),
|
|
1931
|
+
__metadata("design:type", Date)
|
|
1932
|
+
], AIAgentRun_.prototype, "_mj__CreatedAt", void 0);
|
|
1933
|
+
__decorate([
|
|
1934
|
+
Field(),
|
|
1935
|
+
MaxLength(10),
|
|
1936
|
+
__metadata("design:type", Date)
|
|
1937
|
+
], AIAgentRun_.prototype, "_mj__UpdatedAt", void 0);
|
|
1938
|
+
__decorate([
|
|
1939
|
+
Field(() => [AIAgentRunStep_]),
|
|
1940
|
+
__metadata("design:type", Array)
|
|
1941
|
+
], AIAgentRun_.prototype, "MJ_AIAgentRunSteps_AgentRunIDArray", void 0);
|
|
1942
|
+
__decorate([
|
|
1943
|
+
Field(() => [AIAgentRun_]),
|
|
1944
|
+
__metadata("design:type", Array)
|
|
1945
|
+
], AIAgentRun_.prototype, "MJ_AIAgentRuns_ParentRunIDArray", void 0);
|
|
1946
|
+
__decorate([
|
|
1947
|
+
Field(() => [AIPromptRun_]),
|
|
1948
|
+
__metadata("design:type", Array)
|
|
1949
|
+
], AIAgentRun_.prototype, "MJ_AIPromptRuns_AgentRunIDArray", void 0);
|
|
1950
|
+
AIAgentRun_ = __decorate([
|
|
1951
|
+
ObjectType()
|
|
1952
|
+
], AIAgentRun_);
|
|
1953
|
+
export { AIAgentRun_ };
|
|
1954
|
+
let CreateAIAgentRunInput = class CreateAIAgentRunInput {
|
|
1955
|
+
AgentID;
|
|
1956
|
+
ParentRunID;
|
|
1957
|
+
Status;
|
|
1958
|
+
StartedAt;
|
|
1959
|
+
CompletedAt;
|
|
1960
|
+
Success;
|
|
1961
|
+
ErrorMessage;
|
|
1962
|
+
ConversationID;
|
|
1963
|
+
UserID;
|
|
1964
|
+
Result;
|
|
1965
|
+
AgentState;
|
|
1966
|
+
TotalTokensUsed;
|
|
1967
|
+
TotalCost;
|
|
1968
|
+
};
|
|
1969
|
+
__decorate([
|
|
1970
|
+
Field({ nullable: true }),
|
|
1971
|
+
__metadata("design:type", String)
|
|
1972
|
+
], CreateAIAgentRunInput.prototype, "AgentID", void 0);
|
|
1973
|
+
__decorate([
|
|
1974
|
+
Field({ nullable: true }),
|
|
1975
|
+
__metadata("design:type", String)
|
|
1976
|
+
], CreateAIAgentRunInput.prototype, "ParentRunID", void 0);
|
|
1977
|
+
__decorate([
|
|
1978
|
+
Field({ nullable: true }),
|
|
1979
|
+
__metadata("design:type", String)
|
|
1980
|
+
], CreateAIAgentRunInput.prototype, "Status", void 0);
|
|
1981
|
+
__decorate([
|
|
1982
|
+
Field({ nullable: true }),
|
|
1983
|
+
__metadata("design:type", Date)
|
|
1984
|
+
], CreateAIAgentRunInput.prototype, "StartedAt", void 0);
|
|
1985
|
+
__decorate([
|
|
1986
|
+
Field({ nullable: true }),
|
|
1987
|
+
__metadata("design:type", Date)
|
|
1988
|
+
], CreateAIAgentRunInput.prototype, "CompletedAt", void 0);
|
|
1989
|
+
__decorate([
|
|
1990
|
+
Field(() => Boolean, { nullable: true }),
|
|
1991
|
+
__metadata("design:type", Boolean)
|
|
1992
|
+
], CreateAIAgentRunInput.prototype, "Success", void 0);
|
|
1993
|
+
__decorate([
|
|
1994
|
+
Field({ nullable: true }),
|
|
1995
|
+
__metadata("design:type", String)
|
|
1996
|
+
], CreateAIAgentRunInput.prototype, "ErrorMessage", void 0);
|
|
1997
|
+
__decorate([
|
|
1998
|
+
Field({ nullable: true }),
|
|
1999
|
+
__metadata("design:type", String)
|
|
2000
|
+
], CreateAIAgentRunInput.prototype, "ConversationID", void 0);
|
|
2001
|
+
__decorate([
|
|
2002
|
+
Field({ nullable: true }),
|
|
2003
|
+
__metadata("design:type", String)
|
|
2004
|
+
], CreateAIAgentRunInput.prototype, "UserID", void 0);
|
|
2005
|
+
__decorate([
|
|
2006
|
+
Field({ nullable: true }),
|
|
2007
|
+
__metadata("design:type", String)
|
|
2008
|
+
], CreateAIAgentRunInput.prototype, "Result", void 0);
|
|
2009
|
+
__decorate([
|
|
2010
|
+
Field({ nullable: true }),
|
|
2011
|
+
__metadata("design:type", String)
|
|
2012
|
+
], CreateAIAgentRunInput.prototype, "AgentState", void 0);
|
|
2013
|
+
__decorate([
|
|
2014
|
+
Field(() => Int, { nullable: true }),
|
|
2015
|
+
__metadata("design:type", Number)
|
|
2016
|
+
], CreateAIAgentRunInput.prototype, "TotalTokensUsed", void 0);
|
|
2017
|
+
__decorate([
|
|
2018
|
+
Field(() => Float, { nullable: true }),
|
|
2019
|
+
__metadata("design:type", Number)
|
|
2020
|
+
], CreateAIAgentRunInput.prototype, "TotalCost", void 0);
|
|
2021
|
+
CreateAIAgentRunInput = __decorate([
|
|
2022
|
+
InputType()
|
|
2023
|
+
], CreateAIAgentRunInput);
|
|
2024
|
+
export { CreateAIAgentRunInput };
|
|
2025
|
+
let UpdateAIAgentRunInput = class UpdateAIAgentRunInput {
|
|
2026
|
+
ID;
|
|
2027
|
+
AgentID;
|
|
2028
|
+
ParentRunID;
|
|
2029
|
+
Status;
|
|
2030
|
+
StartedAt;
|
|
2031
|
+
CompletedAt;
|
|
2032
|
+
Success;
|
|
2033
|
+
ErrorMessage;
|
|
2034
|
+
ConversationID;
|
|
2035
|
+
UserID;
|
|
2036
|
+
Result;
|
|
2037
|
+
AgentState;
|
|
2038
|
+
TotalTokensUsed;
|
|
2039
|
+
TotalCost;
|
|
2040
|
+
OldValues___;
|
|
2041
|
+
};
|
|
2042
|
+
__decorate([
|
|
2043
|
+
Field(),
|
|
2044
|
+
__metadata("design:type", String)
|
|
2045
|
+
], UpdateAIAgentRunInput.prototype, "ID", void 0);
|
|
2046
|
+
__decorate([
|
|
2047
|
+
Field({ nullable: true }),
|
|
2048
|
+
__metadata("design:type", String)
|
|
2049
|
+
], UpdateAIAgentRunInput.prototype, "AgentID", void 0);
|
|
2050
|
+
__decorate([
|
|
2051
|
+
Field({ nullable: true }),
|
|
2052
|
+
__metadata("design:type", String)
|
|
2053
|
+
], UpdateAIAgentRunInput.prototype, "ParentRunID", void 0);
|
|
2054
|
+
__decorate([
|
|
2055
|
+
Field({ nullable: true }),
|
|
2056
|
+
__metadata("design:type", String)
|
|
2057
|
+
], UpdateAIAgentRunInput.prototype, "Status", void 0);
|
|
2058
|
+
__decorate([
|
|
2059
|
+
Field({ nullable: true }),
|
|
2060
|
+
__metadata("design:type", Date)
|
|
2061
|
+
], UpdateAIAgentRunInput.prototype, "StartedAt", void 0);
|
|
2062
|
+
__decorate([
|
|
2063
|
+
Field({ nullable: true }),
|
|
2064
|
+
__metadata("design:type", Date)
|
|
2065
|
+
], UpdateAIAgentRunInput.prototype, "CompletedAt", void 0);
|
|
2066
|
+
__decorate([
|
|
2067
|
+
Field(() => Boolean, { nullable: true }),
|
|
2068
|
+
__metadata("design:type", Boolean)
|
|
2069
|
+
], UpdateAIAgentRunInput.prototype, "Success", void 0);
|
|
2070
|
+
__decorate([
|
|
2071
|
+
Field({ nullable: true }),
|
|
2072
|
+
__metadata("design:type", String)
|
|
2073
|
+
], UpdateAIAgentRunInput.prototype, "ErrorMessage", void 0);
|
|
2074
|
+
__decorate([
|
|
2075
|
+
Field({ nullable: true }),
|
|
2076
|
+
__metadata("design:type", String)
|
|
2077
|
+
], UpdateAIAgentRunInput.prototype, "ConversationID", void 0);
|
|
2078
|
+
__decorate([
|
|
2079
|
+
Field({ nullable: true }),
|
|
2080
|
+
__metadata("design:type", String)
|
|
2081
|
+
], UpdateAIAgentRunInput.prototype, "UserID", void 0);
|
|
2082
|
+
__decorate([
|
|
2083
|
+
Field({ nullable: true }),
|
|
2084
|
+
__metadata("design:type", String)
|
|
2085
|
+
], UpdateAIAgentRunInput.prototype, "Result", void 0);
|
|
2086
|
+
__decorate([
|
|
2087
|
+
Field({ nullable: true }),
|
|
2088
|
+
__metadata("design:type", String)
|
|
2089
|
+
], UpdateAIAgentRunInput.prototype, "AgentState", void 0);
|
|
2090
|
+
__decorate([
|
|
2091
|
+
Field(() => Int, { nullable: true }),
|
|
2092
|
+
__metadata("design:type", Number)
|
|
2093
|
+
], UpdateAIAgentRunInput.prototype, "TotalTokensUsed", void 0);
|
|
2094
|
+
__decorate([
|
|
2095
|
+
Field(() => Float, { nullable: true }),
|
|
2096
|
+
__metadata("design:type", Number)
|
|
2097
|
+
], UpdateAIAgentRunInput.prototype, "TotalCost", void 0);
|
|
2098
|
+
__decorate([
|
|
2099
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
2100
|
+
__metadata("design:type", Array)
|
|
2101
|
+
], UpdateAIAgentRunInput.prototype, "OldValues___", void 0);
|
|
2102
|
+
UpdateAIAgentRunInput = __decorate([
|
|
2103
|
+
InputType()
|
|
2104
|
+
], UpdateAIAgentRunInput);
|
|
2105
|
+
export { UpdateAIAgentRunInput };
|
|
2106
|
+
let RunAIAgentRunViewResult = class RunAIAgentRunViewResult {
|
|
2107
|
+
Results;
|
|
2108
|
+
UserViewRunID;
|
|
2109
|
+
RowCount;
|
|
2110
|
+
TotalRowCount;
|
|
2111
|
+
ExecutionTime;
|
|
2112
|
+
ErrorMessage;
|
|
2113
|
+
Success;
|
|
2114
|
+
};
|
|
2115
|
+
__decorate([
|
|
2116
|
+
Field(() => [AIAgentRun_]),
|
|
2117
|
+
__metadata("design:type", Array)
|
|
2118
|
+
], RunAIAgentRunViewResult.prototype, "Results", void 0);
|
|
2119
|
+
__decorate([
|
|
2120
|
+
Field(() => String, { nullable: true }),
|
|
2121
|
+
__metadata("design:type", String)
|
|
2122
|
+
], RunAIAgentRunViewResult.prototype, "UserViewRunID", void 0);
|
|
2123
|
+
__decorate([
|
|
2124
|
+
Field(() => Int, { nullable: true }),
|
|
2125
|
+
__metadata("design:type", Number)
|
|
2126
|
+
], RunAIAgentRunViewResult.prototype, "RowCount", void 0);
|
|
2127
|
+
__decorate([
|
|
2128
|
+
Field(() => Int, { nullable: true }),
|
|
2129
|
+
__metadata("design:type", Number)
|
|
2130
|
+
], RunAIAgentRunViewResult.prototype, "TotalRowCount", void 0);
|
|
2131
|
+
__decorate([
|
|
2132
|
+
Field(() => Int, { nullable: true }),
|
|
2133
|
+
__metadata("design:type", Number)
|
|
2134
|
+
], RunAIAgentRunViewResult.prototype, "ExecutionTime", void 0);
|
|
2135
|
+
__decorate([
|
|
2136
|
+
Field({ nullable: true }),
|
|
2137
|
+
__metadata("design:type", String)
|
|
2138
|
+
], RunAIAgentRunViewResult.prototype, "ErrorMessage", void 0);
|
|
2139
|
+
__decorate([
|
|
2140
|
+
Field(() => Boolean, { nullable: false }),
|
|
2141
|
+
__metadata("design:type", Boolean)
|
|
2142
|
+
], RunAIAgentRunViewResult.prototype, "Success", void 0);
|
|
2143
|
+
RunAIAgentRunViewResult = __decorate([
|
|
2144
|
+
ObjectType()
|
|
2145
|
+
], RunAIAgentRunViewResult);
|
|
2146
|
+
export { RunAIAgentRunViewResult };
|
|
2147
|
+
let AIAgentRunResolver = class AIAgentRunResolver extends ResolverBase {
|
|
2148
|
+
async RunAIAgentRunViewByID(input, { dataSources, userPayload }, pubSub) {
|
|
2149
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2150
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
2151
|
+
}
|
|
2152
|
+
async RunAIAgentRunViewByName(input, { dataSources, userPayload }, pubSub) {
|
|
2153
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2154
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
2155
|
+
}
|
|
2156
|
+
async RunAIAgentRunDynamicView(input, { dataSources, userPayload }, pubSub) {
|
|
2157
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2158
|
+
input.EntityName = 'MJ: AI Agent Runs';
|
|
2159
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
2160
|
+
}
|
|
2161
|
+
async AIAgentRun(ID, { dataSources, userPayload }, pubSub) {
|
|
2162
|
+
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
2163
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2164
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRuns] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('MJ: AI Agent Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
2165
|
+
const result = this.MapFieldNamesToCodeNames('MJ: AI Agent Runs', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
2166
|
+
return result;
|
|
2167
|
+
}
|
|
2168
|
+
async MJ_AIAgentRunSteps_AgentRunIDArray(aiagentrun_, { dataSources, userPayload }, pubSub) {
|
|
2169
|
+
this.CheckUserReadPermissions('MJ: AI Agent Run Steps', userPayload);
|
|
2170
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2171
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRunSteps] WHERE [AgentRunID]='${aiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause('MJ: AI Agent Run Steps', userPayload, EntityPermissionType.Read, 'AND');
|
|
2172
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Run Steps', await dataSource.query(sSQL));
|
|
2173
|
+
return result;
|
|
2174
|
+
}
|
|
2175
|
+
async MJ_AIAgentRuns_ParentRunIDArray(aiagentrun_, { dataSources, userPayload }, pubSub) {
|
|
2176
|
+
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
2177
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2178
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRuns] WHERE [ParentRunID]='${aiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause('MJ: AI Agent Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
2179
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Runs', await dataSource.query(sSQL));
|
|
2180
|
+
return result;
|
|
2181
|
+
}
|
|
2182
|
+
async MJ_AIPromptRuns_AgentRunIDArray(aiagentrun_, { dataSources, userPayload }, pubSub) {
|
|
2183
|
+
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
2184
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2185
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptRuns] WHERE [AgentRunID]='${aiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause('MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
2186
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', await dataSource.query(sSQL));
|
|
2187
|
+
return result;
|
|
2188
|
+
}
|
|
2189
|
+
async CreateAIAgentRun(input, { dataSources, userPayload }, pubSub) {
|
|
2190
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
2191
|
+
return this.CreateRecord('MJ: AI Agent Runs', input, dataSource, userPayload, pubSub);
|
|
2192
|
+
}
|
|
2193
|
+
async UpdateAIAgentRun(input, { dataSources, userPayload }, pubSub) {
|
|
2194
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
2195
|
+
return this.UpdateRecord('MJ: AI Agent Runs', input, dataSource, userPayload, pubSub);
|
|
2196
|
+
}
|
|
2197
|
+
async DeleteAIAgentRun(ID, options, { dataSources, userPayload }, pubSub) {
|
|
2198
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
2199
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
2200
|
+
return this.DeleteRecord('MJ: AI Agent Runs', key, options, dataSource, userPayload, pubSub);
|
|
2201
|
+
}
|
|
2202
|
+
};
|
|
2203
|
+
__decorate([
|
|
2204
|
+
Query(() => RunAIAgentRunViewResult),
|
|
2205
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
2206
|
+
__param(1, Ctx()),
|
|
2207
|
+
__param(2, PubSub()),
|
|
2208
|
+
__metadata("design:type", Function),
|
|
2209
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
2210
|
+
__metadata("design:returntype", Promise)
|
|
2211
|
+
], AIAgentRunResolver.prototype, "RunAIAgentRunViewByID", null);
|
|
2212
|
+
__decorate([
|
|
2213
|
+
Query(() => RunAIAgentRunViewResult),
|
|
2214
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
2215
|
+
__param(1, Ctx()),
|
|
2216
|
+
__param(2, PubSub()),
|
|
2217
|
+
__metadata("design:type", Function),
|
|
2218
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
2219
|
+
__metadata("design:returntype", Promise)
|
|
2220
|
+
], AIAgentRunResolver.prototype, "RunAIAgentRunViewByName", null);
|
|
2221
|
+
__decorate([
|
|
2222
|
+
Query(() => RunAIAgentRunViewResult),
|
|
2223
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
2224
|
+
__param(1, Ctx()),
|
|
2225
|
+
__param(2, PubSub()),
|
|
2226
|
+
__metadata("design:type", Function),
|
|
2227
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
2228
|
+
__metadata("design:returntype", Promise)
|
|
2229
|
+
], AIAgentRunResolver.prototype, "RunAIAgentRunDynamicView", null);
|
|
2230
|
+
__decorate([
|
|
2231
|
+
Query(() => AIAgentRun_, { nullable: true }),
|
|
2232
|
+
__param(0, Arg('ID', () => String)),
|
|
2233
|
+
__param(1, Ctx()),
|
|
2234
|
+
__param(2, PubSub()),
|
|
2235
|
+
__metadata("design:type", Function),
|
|
2236
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
2237
|
+
__metadata("design:returntype", Promise)
|
|
2238
|
+
], AIAgentRunResolver.prototype, "AIAgentRun", null);
|
|
2239
|
+
__decorate([
|
|
2240
|
+
FieldResolver(() => [AIAgentRunStep_]),
|
|
2241
|
+
__param(0, Root()),
|
|
2242
|
+
__param(1, Ctx()),
|
|
2243
|
+
__param(2, PubSub()),
|
|
2244
|
+
__metadata("design:type", Function),
|
|
2245
|
+
__metadata("design:paramtypes", [AIAgentRun_, Object, PubSubEngine]),
|
|
2246
|
+
__metadata("design:returntype", Promise)
|
|
2247
|
+
], AIAgentRunResolver.prototype, "MJ_AIAgentRunSteps_AgentRunIDArray", null);
|
|
2248
|
+
__decorate([
|
|
2249
|
+
FieldResolver(() => [AIAgentRun_]),
|
|
2250
|
+
__param(0, Root()),
|
|
2251
|
+
__param(1, Ctx()),
|
|
2252
|
+
__param(2, PubSub()),
|
|
2253
|
+
__metadata("design:type", Function),
|
|
2254
|
+
__metadata("design:paramtypes", [AIAgentRun_, Object, PubSubEngine]),
|
|
2255
|
+
__metadata("design:returntype", Promise)
|
|
2256
|
+
], AIAgentRunResolver.prototype, "MJ_AIAgentRuns_ParentRunIDArray", null);
|
|
2257
|
+
__decorate([
|
|
2258
|
+
FieldResolver(() => [AIPromptRun_]),
|
|
2259
|
+
__param(0, Root()),
|
|
2260
|
+
__param(1, Ctx()),
|
|
2261
|
+
__param(2, PubSub()),
|
|
2262
|
+
__metadata("design:type", Function),
|
|
2263
|
+
__metadata("design:paramtypes", [AIAgentRun_, Object, PubSubEngine]),
|
|
2264
|
+
__metadata("design:returntype", Promise)
|
|
2265
|
+
], AIAgentRunResolver.prototype, "MJ_AIPromptRuns_AgentRunIDArray", null);
|
|
2266
|
+
__decorate([
|
|
2267
|
+
Mutation(() => AIAgentRun_),
|
|
2268
|
+
__param(0, Arg('input', () => CreateAIAgentRunInput)),
|
|
2269
|
+
__param(1, Ctx()),
|
|
2270
|
+
__param(2, PubSub()),
|
|
2271
|
+
__metadata("design:type", Function),
|
|
2272
|
+
__metadata("design:paramtypes", [CreateAIAgentRunInput, Object, PubSubEngine]),
|
|
2273
|
+
__metadata("design:returntype", Promise)
|
|
2274
|
+
], AIAgentRunResolver.prototype, "CreateAIAgentRun", null);
|
|
2275
|
+
__decorate([
|
|
2276
|
+
Mutation(() => AIAgentRun_),
|
|
2277
|
+
__param(0, Arg('input', () => UpdateAIAgentRunInput)),
|
|
2278
|
+
__param(1, Ctx()),
|
|
2279
|
+
__param(2, PubSub()),
|
|
2280
|
+
__metadata("design:type", Function),
|
|
2281
|
+
__metadata("design:paramtypes", [UpdateAIAgentRunInput, Object, PubSubEngine]),
|
|
2282
|
+
__metadata("design:returntype", Promise)
|
|
2283
|
+
], AIAgentRunResolver.prototype, "UpdateAIAgentRun", null);
|
|
2284
|
+
__decorate([
|
|
2285
|
+
Mutation(() => AIAgentRun_),
|
|
2286
|
+
__param(0, Arg('ID', () => String)),
|
|
2287
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
2288
|
+
__param(2, Ctx()),
|
|
2289
|
+
__param(3, PubSub()),
|
|
2290
|
+
__metadata("design:type", Function),
|
|
2291
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
2292
|
+
__metadata("design:returntype", Promise)
|
|
2293
|
+
], AIAgentRunResolver.prototype, "DeleteAIAgentRun", null);
|
|
2294
|
+
AIAgentRunResolver = __decorate([
|
|
2295
|
+
Resolver(AIAgentRun_)
|
|
2296
|
+
], AIAgentRunResolver);
|
|
2297
|
+
export { AIAgentRunResolver };
|
|
1843
2298
|
let AIVendor_ = class AIVendor_ {
|
|
1844
2299
|
ID;
|
|
1845
2300
|
Name;
|
|
@@ -2582,6 +3037,7 @@ let AIAgent_ = class AIAgent_ {
|
|
|
2582
3037
|
ContextCompressionMessageThreshold;
|
|
2583
3038
|
ContextCompressionPromptID;
|
|
2584
3039
|
ContextCompressionMessageRetentionCount;
|
|
3040
|
+
TypeID;
|
|
2585
3041
|
Parent;
|
|
2586
3042
|
ContextCompressionPrompt;
|
|
2587
3043
|
AIAgentRequests_AgentIDArray;
|
|
@@ -2589,6 +3045,7 @@ let AIAgent_ = class AIAgent_ {
|
|
|
2589
3045
|
AIAgentModels_AgentIDArray;
|
|
2590
3046
|
AIAgentActions_AgentIDArray;
|
|
2591
3047
|
MJ_AIAgentPrompts_AgentIDArray;
|
|
3048
|
+
MJ_AIAgentRuns_AgentIDArray;
|
|
2592
3049
|
AIAgentNotes_AgentIDArray;
|
|
2593
3050
|
AIResultCache_AgentIDArray;
|
|
2594
3051
|
MJ_AIPromptRuns_AgentIDArray;
|
|
@@ -2658,6 +3115,11 @@ __decorate([
|
|
|
2658
3115
|
Field(() => Int, { nullable: true, description: `Number of recent messages to keep uncompressed when context compression is applied.` }),
|
|
2659
3116
|
__metadata("design:type", Number)
|
|
2660
3117
|
], AIAgent_.prototype, "ContextCompressionMessageRetentionCount", void 0);
|
|
3118
|
+
__decorate([
|
|
3119
|
+
Field({ description: `Reference to the AIAgentType that defines the category and system-level behavior for this agent. Cannot be null.` }),
|
|
3120
|
+
MaxLength(16),
|
|
3121
|
+
__metadata("design:type", String)
|
|
3122
|
+
], AIAgent_.prototype, "TypeID", void 0);
|
|
2661
3123
|
__decorate([
|
|
2662
3124
|
Field({ nullable: true }),
|
|
2663
3125
|
MaxLength(510),
|
|
@@ -2688,6 +3150,10 @@ __decorate([
|
|
|
2688
3150
|
Field(() => [AIAgentPrompt_]),
|
|
2689
3151
|
__metadata("design:type", Array)
|
|
2690
3152
|
], AIAgent_.prototype, "MJ_AIAgentPrompts_AgentIDArray", void 0);
|
|
3153
|
+
__decorate([
|
|
3154
|
+
Field(() => [AIAgentRun_]),
|
|
3155
|
+
__metadata("design:type", Array)
|
|
3156
|
+
], AIAgent_.prototype, "MJ_AIAgentRuns_AgentIDArray", void 0);
|
|
2691
3157
|
__decorate([
|
|
2692
3158
|
Field(() => [AIAgentNote_]),
|
|
2693
3159
|
__metadata("design:type", Array)
|
|
@@ -2720,6 +3186,7 @@ let CreateAIAgentInput = class CreateAIAgentInput {
|
|
|
2720
3186
|
ContextCompressionMessageThreshold;
|
|
2721
3187
|
ContextCompressionPromptID;
|
|
2722
3188
|
ContextCompressionMessageRetentionCount;
|
|
3189
|
+
TypeID;
|
|
2723
3190
|
};
|
|
2724
3191
|
__decorate([
|
|
2725
3192
|
Field({ nullable: true }),
|
|
@@ -2765,6 +3232,10 @@ __decorate([
|
|
|
2765
3232
|
Field(() => Int, { nullable: true }),
|
|
2766
3233
|
__metadata("design:type", Number)
|
|
2767
3234
|
], CreateAIAgentInput.prototype, "ContextCompressionMessageRetentionCount", void 0);
|
|
3235
|
+
__decorate([
|
|
3236
|
+
Field({ nullable: true }),
|
|
3237
|
+
__metadata("design:type", String)
|
|
3238
|
+
], CreateAIAgentInput.prototype, "TypeID", void 0);
|
|
2768
3239
|
CreateAIAgentInput = __decorate([
|
|
2769
3240
|
InputType()
|
|
2770
3241
|
], CreateAIAgentInput);
|
|
@@ -2782,6 +3253,7 @@ let UpdateAIAgentInput = class UpdateAIAgentInput {
|
|
|
2782
3253
|
ContextCompressionMessageThreshold;
|
|
2783
3254
|
ContextCompressionPromptID;
|
|
2784
3255
|
ContextCompressionMessageRetentionCount;
|
|
3256
|
+
TypeID;
|
|
2785
3257
|
OldValues___;
|
|
2786
3258
|
};
|
|
2787
3259
|
__decorate([
|
|
@@ -2832,6 +3304,10 @@ __decorate([
|
|
|
2832
3304
|
Field(() => Int, { nullable: true }),
|
|
2833
3305
|
__metadata("design:type", Number)
|
|
2834
3306
|
], UpdateAIAgentInput.prototype, "ContextCompressionMessageRetentionCount", void 0);
|
|
3307
|
+
__decorate([
|
|
3308
|
+
Field({ nullable: true }),
|
|
3309
|
+
__metadata("design:type", String)
|
|
3310
|
+
], UpdateAIAgentInput.prototype, "TypeID", void 0);
|
|
2835
3311
|
__decorate([
|
|
2836
3312
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
2837
3313
|
__metadata("design:type", Array)
|
|
@@ -2937,6 +3413,13 @@ let AIAgentResolver = class AIAgentResolver extends ResolverBase {
|
|
|
2937
3413
|
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Prompts', await dataSource.query(sSQL));
|
|
2938
3414
|
return result;
|
|
2939
3415
|
}
|
|
3416
|
+
async MJ_AIAgentRuns_AgentIDArray(aiagent_, { dataSources, userPayload }, pubSub) {
|
|
3417
|
+
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
3418
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
3419
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRuns] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause('MJ: AI Agent Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
3420
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Runs', await dataSource.query(sSQL));
|
|
3421
|
+
return result;
|
|
3422
|
+
}
|
|
2940
3423
|
async AIAgentNotes_AgentIDArray(aiagent_, { dataSources, userPayload }, pubSub) {
|
|
2941
3424
|
this.CheckUserReadPermissions('AI Agent Notes', userPayload);
|
|
2942
3425
|
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
@@ -3060,6 +3543,15 @@ __decorate([
|
|
|
3060
3543
|
__metadata("design:paramtypes", [AIAgent_, Object, PubSubEngine]),
|
|
3061
3544
|
__metadata("design:returntype", Promise)
|
|
3062
3545
|
], AIAgentResolver.prototype, "MJ_AIAgentPrompts_AgentIDArray", null);
|
|
3546
|
+
__decorate([
|
|
3547
|
+
FieldResolver(() => [AIAgentRun_]),
|
|
3548
|
+
__param(0, Root()),
|
|
3549
|
+
__param(1, Ctx()),
|
|
3550
|
+
__param(2, PubSub()),
|
|
3551
|
+
__metadata("design:type", Function),
|
|
3552
|
+
__metadata("design:paramtypes", [AIAgent_, Object, PubSubEngine]),
|
|
3553
|
+
__metadata("design:returntype", Promise)
|
|
3554
|
+
], AIAgentResolver.prototype, "MJ_AIAgentRuns_AgentIDArray", null);
|
|
3063
3555
|
__decorate([
|
|
3064
3556
|
FieldResolver(() => [AIAgentNote_]),
|
|
3065
3557
|
__param(0, Root()),
|
|
@@ -3514,6 +4006,279 @@ AIPromptModelResolver = __decorate([
|
|
|
3514
4006
|
Resolver(AIPromptModel_)
|
|
3515
4007
|
], AIPromptModelResolver);
|
|
3516
4008
|
export { AIPromptModelResolver };
|
|
4009
|
+
let AIAgentType_ = class AIAgentType_ {
|
|
4010
|
+
ID;
|
|
4011
|
+
Name;
|
|
4012
|
+
Description;
|
|
4013
|
+
SystemPromptID;
|
|
4014
|
+
IsActive;
|
|
4015
|
+
_mj__CreatedAt;
|
|
4016
|
+
_mj__UpdatedAt;
|
|
4017
|
+
AIAgents_TypeIDArray;
|
|
4018
|
+
};
|
|
4019
|
+
__decorate([
|
|
4020
|
+
Field({ description: `Unique identifier for the agent type` }),
|
|
4021
|
+
MaxLength(16),
|
|
4022
|
+
__metadata("design:type", String)
|
|
4023
|
+
], AIAgentType_.prototype, "ID", void 0);
|
|
4024
|
+
__decorate([
|
|
4025
|
+
Field({ description: `Unique name of the agent type (e.g., "Base", "CustomerSupport", "DataAnalysis"). Used for programmatic identification and factory instantiation.` }),
|
|
4026
|
+
MaxLength(200),
|
|
4027
|
+
__metadata("design:type", String)
|
|
4028
|
+
], AIAgentType_.prototype, "Name", void 0);
|
|
4029
|
+
__decorate([
|
|
4030
|
+
Field({ nullable: true, description: `Detailed description of the agent type, its purpose, and typical use cases` }),
|
|
4031
|
+
__metadata("design:type", String)
|
|
4032
|
+
], AIAgentType_.prototype, "Description", void 0);
|
|
4033
|
+
__decorate([
|
|
4034
|
+
Field({ nullable: true, description: `Reference to the AI Prompt that contains the system-level instructions for all agents of this type. This prompt will be blended with individual agent prompts.` }),
|
|
4035
|
+
MaxLength(16),
|
|
4036
|
+
__metadata("design:type", String)
|
|
4037
|
+
], AIAgentType_.prototype, "SystemPromptID", void 0);
|
|
4038
|
+
__decorate([
|
|
4039
|
+
Field(() => Boolean, { description: `Indicates whether this agent type is available for use. Inactive types cannot be assigned to new agents.` }),
|
|
4040
|
+
__metadata("design:type", Boolean)
|
|
4041
|
+
], AIAgentType_.prototype, "IsActive", void 0);
|
|
4042
|
+
__decorate([
|
|
4043
|
+
Field(),
|
|
4044
|
+
MaxLength(10),
|
|
4045
|
+
__metadata("design:type", Date)
|
|
4046
|
+
], AIAgentType_.prototype, "_mj__CreatedAt", void 0);
|
|
4047
|
+
__decorate([
|
|
4048
|
+
Field(),
|
|
4049
|
+
MaxLength(10),
|
|
4050
|
+
__metadata("design:type", Date)
|
|
4051
|
+
], AIAgentType_.prototype, "_mj__UpdatedAt", void 0);
|
|
4052
|
+
__decorate([
|
|
4053
|
+
Field(() => [AIAgent_]),
|
|
4054
|
+
__metadata("design:type", Array)
|
|
4055
|
+
], AIAgentType_.prototype, "AIAgents_TypeIDArray", void 0);
|
|
4056
|
+
AIAgentType_ = __decorate([
|
|
4057
|
+
ObjectType()
|
|
4058
|
+
], AIAgentType_);
|
|
4059
|
+
export { AIAgentType_ };
|
|
4060
|
+
let CreateAIAgentTypeInput = class CreateAIAgentTypeInput {
|
|
4061
|
+
Name;
|
|
4062
|
+
Description;
|
|
4063
|
+
SystemPromptID;
|
|
4064
|
+
IsActive;
|
|
4065
|
+
};
|
|
4066
|
+
__decorate([
|
|
4067
|
+
Field({ nullable: true }),
|
|
4068
|
+
__metadata("design:type", String)
|
|
4069
|
+
], CreateAIAgentTypeInput.prototype, "Name", void 0);
|
|
4070
|
+
__decorate([
|
|
4071
|
+
Field({ nullable: true }),
|
|
4072
|
+
__metadata("design:type", String)
|
|
4073
|
+
], CreateAIAgentTypeInput.prototype, "Description", void 0);
|
|
4074
|
+
__decorate([
|
|
4075
|
+
Field({ nullable: true }),
|
|
4076
|
+
__metadata("design:type", String)
|
|
4077
|
+
], CreateAIAgentTypeInput.prototype, "SystemPromptID", void 0);
|
|
4078
|
+
__decorate([
|
|
4079
|
+
Field(() => Boolean, { nullable: true }),
|
|
4080
|
+
__metadata("design:type", Boolean)
|
|
4081
|
+
], CreateAIAgentTypeInput.prototype, "IsActive", void 0);
|
|
4082
|
+
CreateAIAgentTypeInput = __decorate([
|
|
4083
|
+
InputType()
|
|
4084
|
+
], CreateAIAgentTypeInput);
|
|
4085
|
+
export { CreateAIAgentTypeInput };
|
|
4086
|
+
let UpdateAIAgentTypeInput = class UpdateAIAgentTypeInput {
|
|
4087
|
+
ID;
|
|
4088
|
+
Name;
|
|
4089
|
+
Description;
|
|
4090
|
+
SystemPromptID;
|
|
4091
|
+
IsActive;
|
|
4092
|
+
OldValues___;
|
|
4093
|
+
};
|
|
4094
|
+
__decorate([
|
|
4095
|
+
Field(),
|
|
4096
|
+
__metadata("design:type", String)
|
|
4097
|
+
], UpdateAIAgentTypeInput.prototype, "ID", void 0);
|
|
4098
|
+
__decorate([
|
|
4099
|
+
Field({ nullable: true }),
|
|
4100
|
+
__metadata("design:type", String)
|
|
4101
|
+
], UpdateAIAgentTypeInput.prototype, "Name", void 0);
|
|
4102
|
+
__decorate([
|
|
4103
|
+
Field({ nullable: true }),
|
|
4104
|
+
__metadata("design:type", String)
|
|
4105
|
+
], UpdateAIAgentTypeInput.prototype, "Description", void 0);
|
|
4106
|
+
__decorate([
|
|
4107
|
+
Field({ nullable: true }),
|
|
4108
|
+
__metadata("design:type", String)
|
|
4109
|
+
], UpdateAIAgentTypeInput.prototype, "SystemPromptID", void 0);
|
|
4110
|
+
__decorate([
|
|
4111
|
+
Field(() => Boolean, { nullable: true }),
|
|
4112
|
+
__metadata("design:type", Boolean)
|
|
4113
|
+
], UpdateAIAgentTypeInput.prototype, "IsActive", void 0);
|
|
4114
|
+
__decorate([
|
|
4115
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
4116
|
+
__metadata("design:type", Array)
|
|
4117
|
+
], UpdateAIAgentTypeInput.prototype, "OldValues___", void 0);
|
|
4118
|
+
UpdateAIAgentTypeInput = __decorate([
|
|
4119
|
+
InputType()
|
|
4120
|
+
], UpdateAIAgentTypeInput);
|
|
4121
|
+
export { UpdateAIAgentTypeInput };
|
|
4122
|
+
let RunAIAgentTypeViewResult = class RunAIAgentTypeViewResult {
|
|
4123
|
+
Results;
|
|
4124
|
+
UserViewRunID;
|
|
4125
|
+
RowCount;
|
|
4126
|
+
TotalRowCount;
|
|
4127
|
+
ExecutionTime;
|
|
4128
|
+
ErrorMessage;
|
|
4129
|
+
Success;
|
|
4130
|
+
};
|
|
4131
|
+
__decorate([
|
|
4132
|
+
Field(() => [AIAgentType_]),
|
|
4133
|
+
__metadata("design:type", Array)
|
|
4134
|
+
], RunAIAgentTypeViewResult.prototype, "Results", void 0);
|
|
4135
|
+
__decorate([
|
|
4136
|
+
Field(() => String, { nullable: true }),
|
|
4137
|
+
__metadata("design:type", String)
|
|
4138
|
+
], RunAIAgentTypeViewResult.prototype, "UserViewRunID", void 0);
|
|
4139
|
+
__decorate([
|
|
4140
|
+
Field(() => Int, { nullable: true }),
|
|
4141
|
+
__metadata("design:type", Number)
|
|
4142
|
+
], RunAIAgentTypeViewResult.prototype, "RowCount", void 0);
|
|
4143
|
+
__decorate([
|
|
4144
|
+
Field(() => Int, { nullable: true }),
|
|
4145
|
+
__metadata("design:type", Number)
|
|
4146
|
+
], RunAIAgentTypeViewResult.prototype, "TotalRowCount", void 0);
|
|
4147
|
+
__decorate([
|
|
4148
|
+
Field(() => Int, { nullable: true }),
|
|
4149
|
+
__metadata("design:type", Number)
|
|
4150
|
+
], RunAIAgentTypeViewResult.prototype, "ExecutionTime", void 0);
|
|
4151
|
+
__decorate([
|
|
4152
|
+
Field({ nullable: true }),
|
|
4153
|
+
__metadata("design:type", String)
|
|
4154
|
+
], RunAIAgentTypeViewResult.prototype, "ErrorMessage", void 0);
|
|
4155
|
+
__decorate([
|
|
4156
|
+
Field(() => Boolean, { nullable: false }),
|
|
4157
|
+
__metadata("design:type", Boolean)
|
|
4158
|
+
], RunAIAgentTypeViewResult.prototype, "Success", void 0);
|
|
4159
|
+
RunAIAgentTypeViewResult = __decorate([
|
|
4160
|
+
ObjectType()
|
|
4161
|
+
], RunAIAgentTypeViewResult);
|
|
4162
|
+
export { RunAIAgentTypeViewResult };
|
|
4163
|
+
let AIAgentTypeResolver = class AIAgentTypeResolver extends ResolverBase {
|
|
4164
|
+
async RunAIAgentTypeViewByID(input, { dataSources, userPayload }, pubSub) {
|
|
4165
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
4166
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
4167
|
+
}
|
|
4168
|
+
async RunAIAgentTypeViewByName(input, { dataSources, userPayload }, pubSub) {
|
|
4169
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
4170
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
4171
|
+
}
|
|
4172
|
+
async RunAIAgentTypeDynamicView(input, { dataSources, userPayload }, pubSub) {
|
|
4173
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
4174
|
+
input.EntityName = 'MJ: AI Agent Types';
|
|
4175
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
4176
|
+
}
|
|
4177
|
+
async AIAgentType(ID, { dataSources, userPayload }, pubSub) {
|
|
4178
|
+
this.CheckUserReadPermissions('MJ: AI Agent Types', userPayload);
|
|
4179
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
4180
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentTypes] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('MJ: AI Agent Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
4181
|
+
const result = this.MapFieldNamesToCodeNames('MJ: AI Agent Types', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
4182
|
+
return result;
|
|
4183
|
+
}
|
|
4184
|
+
async AIAgents_TypeIDArray(aiagenttype_, { dataSources, userPayload }, pubSub) {
|
|
4185
|
+
this.CheckUserReadPermissions('AI Agents', userPayload);
|
|
4186
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
4187
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgents] WHERE [TypeID]='${aiagenttype_.ID}' ` + this.getRowLevelSecurityWhereClause('AI Agents', userPayload, EntityPermissionType.Read, 'AND');
|
|
4188
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AI Agents', await dataSource.query(sSQL));
|
|
4189
|
+
return result;
|
|
4190
|
+
}
|
|
4191
|
+
async CreateAIAgentType(input, { dataSources, userPayload }, pubSub) {
|
|
4192
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
4193
|
+
return this.CreateRecord('MJ: AI Agent Types', input, dataSource, userPayload, pubSub);
|
|
4194
|
+
}
|
|
4195
|
+
async UpdateAIAgentType(input, { dataSources, userPayload }, pubSub) {
|
|
4196
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
4197
|
+
return this.UpdateRecord('MJ: AI Agent Types', input, dataSource, userPayload, pubSub);
|
|
4198
|
+
}
|
|
4199
|
+
async DeleteAIAgentType(ID, options, { dataSources, userPayload }, pubSub) {
|
|
4200
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
4201
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
4202
|
+
return this.DeleteRecord('MJ: AI Agent Types', key, options, dataSource, userPayload, pubSub);
|
|
4203
|
+
}
|
|
4204
|
+
};
|
|
4205
|
+
__decorate([
|
|
4206
|
+
Query(() => RunAIAgentTypeViewResult),
|
|
4207
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
4208
|
+
__param(1, Ctx()),
|
|
4209
|
+
__param(2, PubSub()),
|
|
4210
|
+
__metadata("design:type", Function),
|
|
4211
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
4212
|
+
__metadata("design:returntype", Promise)
|
|
4213
|
+
], AIAgentTypeResolver.prototype, "RunAIAgentTypeViewByID", null);
|
|
4214
|
+
__decorate([
|
|
4215
|
+
Query(() => RunAIAgentTypeViewResult),
|
|
4216
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
4217
|
+
__param(1, Ctx()),
|
|
4218
|
+
__param(2, PubSub()),
|
|
4219
|
+
__metadata("design:type", Function),
|
|
4220
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
4221
|
+
__metadata("design:returntype", Promise)
|
|
4222
|
+
], AIAgentTypeResolver.prototype, "RunAIAgentTypeViewByName", null);
|
|
4223
|
+
__decorate([
|
|
4224
|
+
Query(() => RunAIAgentTypeViewResult),
|
|
4225
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
4226
|
+
__param(1, Ctx()),
|
|
4227
|
+
__param(2, PubSub()),
|
|
4228
|
+
__metadata("design:type", Function),
|
|
4229
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
4230
|
+
__metadata("design:returntype", Promise)
|
|
4231
|
+
], AIAgentTypeResolver.prototype, "RunAIAgentTypeDynamicView", null);
|
|
4232
|
+
__decorate([
|
|
4233
|
+
Query(() => AIAgentType_, { nullable: true }),
|
|
4234
|
+
__param(0, Arg('ID', () => String)),
|
|
4235
|
+
__param(1, Ctx()),
|
|
4236
|
+
__param(2, PubSub()),
|
|
4237
|
+
__metadata("design:type", Function),
|
|
4238
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
4239
|
+
__metadata("design:returntype", Promise)
|
|
4240
|
+
], AIAgentTypeResolver.prototype, "AIAgentType", null);
|
|
4241
|
+
__decorate([
|
|
4242
|
+
FieldResolver(() => [AIAgent_]),
|
|
4243
|
+
__param(0, Root()),
|
|
4244
|
+
__param(1, Ctx()),
|
|
4245
|
+
__param(2, PubSub()),
|
|
4246
|
+
__metadata("design:type", Function),
|
|
4247
|
+
__metadata("design:paramtypes", [AIAgentType_, Object, PubSubEngine]),
|
|
4248
|
+
__metadata("design:returntype", Promise)
|
|
4249
|
+
], AIAgentTypeResolver.prototype, "AIAgents_TypeIDArray", null);
|
|
4250
|
+
__decorate([
|
|
4251
|
+
Mutation(() => AIAgentType_),
|
|
4252
|
+
__param(0, Arg('input', () => CreateAIAgentTypeInput)),
|
|
4253
|
+
__param(1, Ctx()),
|
|
4254
|
+
__param(2, PubSub()),
|
|
4255
|
+
__metadata("design:type", Function),
|
|
4256
|
+
__metadata("design:paramtypes", [CreateAIAgentTypeInput, Object, PubSubEngine]),
|
|
4257
|
+
__metadata("design:returntype", Promise)
|
|
4258
|
+
], AIAgentTypeResolver.prototype, "CreateAIAgentType", null);
|
|
4259
|
+
__decorate([
|
|
4260
|
+
Mutation(() => AIAgentType_),
|
|
4261
|
+
__param(0, Arg('input', () => UpdateAIAgentTypeInput)),
|
|
4262
|
+
__param(1, Ctx()),
|
|
4263
|
+
__param(2, PubSub()),
|
|
4264
|
+
__metadata("design:type", Function),
|
|
4265
|
+
__metadata("design:paramtypes", [UpdateAIAgentTypeInput, Object, PubSubEngine]),
|
|
4266
|
+
__metadata("design:returntype", Promise)
|
|
4267
|
+
], AIAgentTypeResolver.prototype, "UpdateAIAgentType", null);
|
|
4268
|
+
__decorate([
|
|
4269
|
+
Mutation(() => AIAgentType_),
|
|
4270
|
+
__param(0, Arg('ID', () => String)),
|
|
4271
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
4272
|
+
__param(2, Ctx()),
|
|
4273
|
+
__param(3, PubSub()),
|
|
4274
|
+
__metadata("design:type", Function),
|
|
4275
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
4276
|
+
__metadata("design:returntype", Promise)
|
|
4277
|
+
], AIAgentTypeResolver.prototype, "DeleteAIAgentType", null);
|
|
4278
|
+
AIAgentTypeResolver = __decorate([
|
|
4279
|
+
Resolver(AIAgentType_)
|
|
4280
|
+
], AIAgentTypeResolver);
|
|
4281
|
+
export { AIAgentTypeResolver };
|
|
3517
4282
|
let AIAgentNote_ = class AIAgentNote_ {
|
|
3518
4283
|
ID;
|
|
3519
4284
|
AgentID;
|
|
@@ -4085,12 +4850,15 @@ let AIPrompt_ = class AIPrompt_ {
|
|
|
4085
4850
|
CacheMustMatchVendor;
|
|
4086
4851
|
CacheMustMatchAgent;
|
|
4087
4852
|
CacheMustMatchConfig;
|
|
4853
|
+
PromptRole;
|
|
4854
|
+
PromptPosition;
|
|
4088
4855
|
Template;
|
|
4089
4856
|
Category;
|
|
4090
4857
|
Type;
|
|
4091
4858
|
AIModelType;
|
|
4092
4859
|
ResultSelectorPrompt;
|
|
4093
4860
|
AIResultCache_AIPromptIDArray;
|
|
4861
|
+
MJ_AIAgentTypes_SystemPromptIDArray;
|
|
4094
4862
|
MJ_AIConfigurations_DefaultPromptForContextCompressionIDArray;
|
|
4095
4863
|
MJ_AIConfigurations_DefaultPromptForContextSummarizationIDArray;
|
|
4096
4864
|
AIPrompts_ResultSelectorPromptIDArray;
|
|
@@ -4250,6 +5018,16 @@ __decorate([
|
|
|
4250
5018
|
Field(() => Boolean, { description: `When true, the configuration must match for a cache hit. When false, results from any configuration can be used.` }),
|
|
4251
5019
|
__metadata("design:type", Boolean)
|
|
4252
5020
|
], AIPrompt_.prototype, "CacheMustMatchConfig", void 0);
|
|
5021
|
+
__decorate([
|
|
5022
|
+
Field({ description: `Determines how the prompt is used in conversation: System (always first message), User (positioned by PromptPosition), Assistant (positioned by PromptPosition), or SystemOrUser (try system first, fallback to user last if system slot taken)` }),
|
|
5023
|
+
MaxLength(40),
|
|
5024
|
+
__metadata("design:type", String)
|
|
5025
|
+
], AIPrompt_.prototype, "PromptRole", void 0);
|
|
5026
|
+
__decorate([
|
|
5027
|
+
Field({ description: `Controls message placement for User and Assistant role prompts: First (beginning of conversation) or Last (end of conversation). Not used for System role prompts which are always first` }),
|
|
5028
|
+
MaxLength(40),
|
|
5029
|
+
__metadata("design:type", String)
|
|
5030
|
+
], AIPrompt_.prototype, "PromptPosition", void 0);
|
|
4253
5031
|
__decorate([
|
|
4254
5032
|
Field(),
|
|
4255
5033
|
MaxLength(510),
|
|
@@ -4279,6 +5057,10 @@ __decorate([
|
|
|
4279
5057
|
Field(() => [AIResultCache_]),
|
|
4280
5058
|
__metadata("design:type", Array)
|
|
4281
5059
|
], AIPrompt_.prototype, "AIResultCache_AIPromptIDArray", void 0);
|
|
5060
|
+
__decorate([
|
|
5061
|
+
Field(() => [AIAgentType_]),
|
|
5062
|
+
__metadata("design:type", Array)
|
|
5063
|
+
], AIPrompt_.prototype, "MJ_AIAgentTypes_SystemPromptIDArray", void 0);
|
|
4282
5064
|
__decorate([
|
|
4283
5065
|
Field(() => [AIConfiguration_]),
|
|
4284
5066
|
__metadata("design:type", Array)
|
|
@@ -4342,6 +5124,8 @@ let CreateAIPromptInput = class CreateAIPromptInput {
|
|
|
4342
5124
|
CacheMustMatchVendor;
|
|
4343
5125
|
CacheMustMatchAgent;
|
|
4344
5126
|
CacheMustMatchConfig;
|
|
5127
|
+
PromptRole;
|
|
5128
|
+
PromptPosition;
|
|
4345
5129
|
};
|
|
4346
5130
|
__decorate([
|
|
4347
5131
|
Field({ nullable: true }),
|
|
@@ -4463,6 +5247,14 @@ __decorate([
|
|
|
4463
5247
|
Field(() => Boolean, { nullable: true }),
|
|
4464
5248
|
__metadata("design:type", Boolean)
|
|
4465
5249
|
], CreateAIPromptInput.prototype, "CacheMustMatchConfig", void 0);
|
|
5250
|
+
__decorate([
|
|
5251
|
+
Field({ nullable: true }),
|
|
5252
|
+
__metadata("design:type", String)
|
|
5253
|
+
], CreateAIPromptInput.prototype, "PromptRole", void 0);
|
|
5254
|
+
__decorate([
|
|
5255
|
+
Field({ nullable: true }),
|
|
5256
|
+
__metadata("design:type", String)
|
|
5257
|
+
], CreateAIPromptInput.prototype, "PromptPosition", void 0);
|
|
4466
5258
|
CreateAIPromptInput = __decorate([
|
|
4467
5259
|
InputType()
|
|
4468
5260
|
], CreateAIPromptInput);
|
|
@@ -4499,6 +5291,8 @@ let UpdateAIPromptInput = class UpdateAIPromptInput {
|
|
|
4499
5291
|
CacheMustMatchVendor;
|
|
4500
5292
|
CacheMustMatchAgent;
|
|
4501
5293
|
CacheMustMatchConfig;
|
|
5294
|
+
PromptRole;
|
|
5295
|
+
PromptPosition;
|
|
4502
5296
|
OldValues___;
|
|
4503
5297
|
};
|
|
4504
5298
|
__decorate([
|
|
@@ -4625,6 +5419,14 @@ __decorate([
|
|
|
4625
5419
|
Field(() => Boolean, { nullable: true }),
|
|
4626
5420
|
__metadata("design:type", Boolean)
|
|
4627
5421
|
], UpdateAIPromptInput.prototype, "CacheMustMatchConfig", void 0);
|
|
5422
|
+
__decorate([
|
|
5423
|
+
Field({ nullable: true }),
|
|
5424
|
+
__metadata("design:type", String)
|
|
5425
|
+
], UpdateAIPromptInput.prototype, "PromptRole", void 0);
|
|
5426
|
+
__decorate([
|
|
5427
|
+
Field({ nullable: true }),
|
|
5428
|
+
__metadata("design:type", String)
|
|
5429
|
+
], UpdateAIPromptInput.prototype, "PromptPosition", void 0);
|
|
4628
5430
|
__decorate([
|
|
4629
5431
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
4630
5432
|
__metadata("design:type", Array)
|
|
@@ -4702,6 +5504,13 @@ let AIPromptResolver = class AIPromptResolver extends ResolverBase {
|
|
|
4702
5504
|
const result = this.ArrayMapFieldNamesToCodeNames('AI Result Cache', await dataSource.query(sSQL));
|
|
4703
5505
|
return result;
|
|
4704
5506
|
}
|
|
5507
|
+
async MJ_AIAgentTypes_SystemPromptIDArray(aiprompt_, { dataSources, userPayload }, pubSub) {
|
|
5508
|
+
this.CheckUserReadPermissions('MJ: AI Agent Types', userPayload);
|
|
5509
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
5510
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentTypes] WHERE [SystemPromptID]='${aiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause('MJ: AI Agent Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
5511
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Types', await dataSource.query(sSQL));
|
|
5512
|
+
return result;
|
|
5513
|
+
}
|
|
4705
5514
|
async MJ_AIConfigurations_DefaultPromptForContextCompressionIDArray(aiprompt_, { dataSources, userPayload }, pubSub) {
|
|
4706
5515
|
this.CheckUserReadPermissions('MJ: AI Configurations', userPayload);
|
|
4707
5516
|
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
@@ -4810,6 +5619,15 @@ __decorate([
|
|
|
4810
5619
|
__metadata("design:paramtypes", [AIPrompt_, Object, PubSubEngine]),
|
|
4811
5620
|
__metadata("design:returntype", Promise)
|
|
4812
5621
|
], AIPromptResolver.prototype, "AIResultCache_AIPromptIDArray", null);
|
|
5622
|
+
__decorate([
|
|
5623
|
+
FieldResolver(() => [AIAgentType_]),
|
|
5624
|
+
__param(0, Root()),
|
|
5625
|
+
__param(1, Ctx()),
|
|
5626
|
+
__param(2, PubSub()),
|
|
5627
|
+
__metadata("design:type", Function),
|
|
5628
|
+
__metadata("design:paramtypes", [AIPrompt_, Object, PubSubEngine]),
|
|
5629
|
+
__metadata("design:returntype", Promise)
|
|
5630
|
+
], AIPromptResolver.prototype, "MJ_AIAgentTypes_SystemPromptIDArray", null);
|
|
4813
5631
|
__decorate([
|
|
4814
5632
|
FieldResolver(() => [AIConfiguration_]),
|
|
4815
5633
|
__param(0, Root()),
|
|
@@ -11797,9 +12615,9 @@ let User_ = class User_ {
|
|
|
11797
12615
|
UserNotifications_UserIDArray;
|
|
11798
12616
|
Templates_UserIDArray;
|
|
11799
12617
|
UserFavorites_UserIDArray;
|
|
11800
|
-
ResourceLinks_UserIDArray;
|
|
11801
12618
|
ListCategories_UserIDArray;
|
|
11802
12619
|
ScheduledActions_CreatedByUserIDArray;
|
|
12620
|
+
ResourceLinks_UserIDArray;
|
|
11803
12621
|
AIAgentRequests_ResponseByUserIDArray;
|
|
11804
12622
|
MJ_DashboardUserPreferences_UserIDArray;
|
|
11805
12623
|
MJ_ReportUserStates_UserIDArray;
|
|
@@ -11808,6 +12626,7 @@ let User_ = class User_ {
|
|
|
11808
12626
|
ResourcePermissions_UserIDArray;
|
|
11809
12627
|
AIAgentRequests_RequestForUserIDArray;
|
|
11810
12628
|
ConversationDetails_UserIDArray;
|
|
12629
|
+
MJ_AIAgentRuns_UserIDArray;
|
|
11811
12630
|
};
|
|
11812
12631
|
__decorate([
|
|
11813
12632
|
Field(),
|
|
@@ -12028,10 +12847,6 @@ __decorate([
|
|
|
12028
12847
|
Field(() => [UserFavorite_]),
|
|
12029
12848
|
__metadata("design:type", Array)
|
|
12030
12849
|
], User_.prototype, "UserFavorites_UserIDArray", void 0);
|
|
12031
|
-
__decorate([
|
|
12032
|
-
Field(() => [ResourceLink_]),
|
|
12033
|
-
__metadata("design:type", Array)
|
|
12034
|
-
], User_.prototype, "ResourceLinks_UserIDArray", void 0);
|
|
12035
12850
|
__decorate([
|
|
12036
12851
|
Field(() => [ListCategory_]),
|
|
12037
12852
|
__metadata("design:type", Array)
|
|
@@ -12040,6 +12855,10 @@ __decorate([
|
|
|
12040
12855
|
Field(() => [ScheduledAction_]),
|
|
12041
12856
|
__metadata("design:type", Array)
|
|
12042
12857
|
], User_.prototype, "ScheduledActions_CreatedByUserIDArray", void 0);
|
|
12858
|
+
__decorate([
|
|
12859
|
+
Field(() => [ResourceLink_]),
|
|
12860
|
+
__metadata("design:type", Array)
|
|
12861
|
+
], User_.prototype, "ResourceLinks_UserIDArray", void 0);
|
|
12043
12862
|
__decorate([
|
|
12044
12863
|
Field(() => [AIAgentRequest_]),
|
|
12045
12864
|
__metadata("design:type", Array)
|
|
@@ -12072,6 +12891,10 @@ __decorate([
|
|
|
12072
12891
|
Field(() => [ConversationDetail_]),
|
|
12073
12892
|
__metadata("design:type", Array)
|
|
12074
12893
|
], User_.prototype, "ConversationDetails_UserIDArray", void 0);
|
|
12894
|
+
__decorate([
|
|
12895
|
+
Field(() => [AIAgentRun_]),
|
|
12896
|
+
__metadata("design:type", Array)
|
|
12897
|
+
], User_.prototype, "MJ_AIAgentRuns_UserIDArray", void 0);
|
|
12075
12898
|
User_ = __decorate([
|
|
12076
12899
|
ObjectType({ description: `A list of all users who have or had access to the system` })
|
|
12077
12900
|
], User_);
|
|
@@ -12487,13 +13310,6 @@ let UserResolverBase = class UserResolverBase extends ResolverBase {
|
|
|
12487
13310
|
const result = this.ArrayMapFieldNamesToCodeNames('User Favorites', await dataSource.query(sSQL));
|
|
12488
13311
|
return result;
|
|
12489
13312
|
}
|
|
12490
|
-
async ResourceLinks_UserIDArray(user_, { dataSources, userPayload }, pubSub) {
|
|
12491
|
-
this.CheckUserReadPermissions('Resource Links', userPayload);
|
|
12492
|
-
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
12493
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwResourceLinks] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause('Resource Links', userPayload, EntityPermissionType.Read, 'AND');
|
|
12494
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Resource Links', await dataSource.query(sSQL));
|
|
12495
|
-
return result;
|
|
12496
|
-
}
|
|
12497
13313
|
async ListCategories_UserIDArray(user_, { dataSources, userPayload }, pubSub) {
|
|
12498
13314
|
this.CheckUserReadPermissions('List Categories', userPayload);
|
|
12499
13315
|
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
@@ -12508,6 +13324,13 @@ let UserResolverBase = class UserResolverBase extends ResolverBase {
|
|
|
12508
13324
|
const result = this.ArrayMapFieldNamesToCodeNames('Scheduled Actions', await dataSource.query(sSQL));
|
|
12509
13325
|
return result;
|
|
12510
13326
|
}
|
|
13327
|
+
async ResourceLinks_UserIDArray(user_, { dataSources, userPayload }, pubSub) {
|
|
13328
|
+
this.CheckUserReadPermissions('Resource Links', userPayload);
|
|
13329
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
13330
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwResourceLinks] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause('Resource Links', userPayload, EntityPermissionType.Read, 'AND');
|
|
13331
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Resource Links', await dataSource.query(sSQL));
|
|
13332
|
+
return result;
|
|
13333
|
+
}
|
|
12511
13334
|
async AIAgentRequests_ResponseByUserIDArray(user_, { dataSources, userPayload }, pubSub) {
|
|
12512
13335
|
this.CheckUserReadPermissions('AI Agent Requests', userPayload);
|
|
12513
13336
|
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
@@ -12564,6 +13387,13 @@ let UserResolverBase = class UserResolverBase extends ResolverBase {
|
|
|
12564
13387
|
const result = this.ArrayMapFieldNamesToCodeNames('Conversation Details', await dataSource.query(sSQL));
|
|
12565
13388
|
return result;
|
|
12566
13389
|
}
|
|
13390
|
+
async MJ_AIAgentRuns_UserIDArray(user_, { dataSources, userPayload }, pubSub) {
|
|
13391
|
+
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
13392
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
13393
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRuns] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause('MJ: AI Agent Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
13394
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Runs', await dataSource.query(sSQL));
|
|
13395
|
+
return result;
|
|
13396
|
+
}
|
|
12567
13397
|
async CreateUser(input, { dataSources, userPayload }, pubSub) {
|
|
12568
13398
|
const dataSource = GetReadWriteDataSource(dataSources);
|
|
12569
13399
|
return this.CreateRecord('Users', input, dataSource, userPayload, pubSub);
|
|
@@ -12893,32 +13723,32 @@ __decorate([
|
|
|
12893
13723
|
__metadata("design:returntype", Promise)
|
|
12894
13724
|
], UserResolverBase.prototype, "UserFavorites_UserIDArray", null);
|
|
12895
13725
|
__decorate([
|
|
12896
|
-
FieldResolver(() => [
|
|
13726
|
+
FieldResolver(() => [ListCategory_]),
|
|
12897
13727
|
__param(0, Root()),
|
|
12898
13728
|
__param(1, Ctx()),
|
|
12899
13729
|
__param(2, PubSub()),
|
|
12900
13730
|
__metadata("design:type", Function),
|
|
12901
13731
|
__metadata("design:paramtypes", [User_, Object, PubSubEngine]),
|
|
12902
13732
|
__metadata("design:returntype", Promise)
|
|
12903
|
-
], UserResolverBase.prototype, "
|
|
13733
|
+
], UserResolverBase.prototype, "ListCategories_UserIDArray", null);
|
|
12904
13734
|
__decorate([
|
|
12905
|
-
FieldResolver(() => [
|
|
13735
|
+
FieldResolver(() => [ScheduledAction_]),
|
|
12906
13736
|
__param(0, Root()),
|
|
12907
13737
|
__param(1, Ctx()),
|
|
12908
13738
|
__param(2, PubSub()),
|
|
12909
13739
|
__metadata("design:type", Function),
|
|
12910
13740
|
__metadata("design:paramtypes", [User_, Object, PubSubEngine]),
|
|
12911
13741
|
__metadata("design:returntype", Promise)
|
|
12912
|
-
], UserResolverBase.prototype, "
|
|
13742
|
+
], UserResolverBase.prototype, "ScheduledActions_CreatedByUserIDArray", null);
|
|
12913
13743
|
__decorate([
|
|
12914
|
-
FieldResolver(() => [
|
|
13744
|
+
FieldResolver(() => [ResourceLink_]),
|
|
12915
13745
|
__param(0, Root()),
|
|
12916
13746
|
__param(1, Ctx()),
|
|
12917
13747
|
__param(2, PubSub()),
|
|
12918
13748
|
__metadata("design:type", Function),
|
|
12919
13749
|
__metadata("design:paramtypes", [User_, Object, PubSubEngine]),
|
|
12920
13750
|
__metadata("design:returntype", Promise)
|
|
12921
|
-
], UserResolverBase.prototype, "
|
|
13751
|
+
], UserResolverBase.prototype, "ResourceLinks_UserIDArray", null);
|
|
12922
13752
|
__decorate([
|
|
12923
13753
|
FieldResolver(() => [AIAgentRequest_]),
|
|
12924
13754
|
__param(0, Root()),
|
|
@@ -12991,6 +13821,15 @@ __decorate([
|
|
|
12991
13821
|
__metadata("design:paramtypes", [User_, Object, PubSubEngine]),
|
|
12992
13822
|
__metadata("design:returntype", Promise)
|
|
12993
13823
|
], UserResolverBase.prototype, "ConversationDetails_UserIDArray", null);
|
|
13824
|
+
__decorate([
|
|
13825
|
+
FieldResolver(() => [AIAgentRun_]),
|
|
13826
|
+
__param(0, Root()),
|
|
13827
|
+
__param(1, Ctx()),
|
|
13828
|
+
__param(2, PubSub()),
|
|
13829
|
+
__metadata("design:type", Function),
|
|
13830
|
+
__metadata("design:paramtypes", [User_, Object, PubSubEngine]),
|
|
13831
|
+
__metadata("design:returntype", Promise)
|
|
13832
|
+
], UserResolverBase.prototype, "MJ_AIAgentRuns_UserIDArray", null);
|
|
12994
13833
|
__decorate([
|
|
12995
13834
|
Mutation(() => User_),
|
|
12996
13835
|
__param(0, Arg('input', () => CreateUserInput)),
|
|
@@ -24096,8 +24935,8 @@ let Dashboard_ = class Dashboard_ {
|
|
|
24096
24935
|
Thumbnail;
|
|
24097
24936
|
Scope;
|
|
24098
24937
|
ApplicationID;
|
|
24099
|
-
Code;
|
|
24100
24938
|
DriverClass;
|
|
24939
|
+
Code;
|
|
24101
24940
|
User;
|
|
24102
24941
|
Category;
|
|
24103
24942
|
Application;
|
|
@@ -24162,15 +25001,15 @@ __decorate([
|
|
|
24162
25001
|
__metadata("design:type", String)
|
|
24163
25002
|
], Dashboard_.prototype, "ApplicationID", void 0);
|
|
24164
25003
|
__decorate([
|
|
24165
|
-
Field({ nullable: true, description: `
|
|
25004
|
+
Field({ nullable: true, description: `Specifies the runtime class that will be used for the Dashboard when Type is set to 'Code'. This class contains the custom logic and implementation for code-based dashboards.` }),
|
|
24166
25005
|
MaxLength(510),
|
|
24167
25006
|
__metadata("design:type", String)
|
|
24168
|
-
], Dashboard_.prototype, "
|
|
25007
|
+
], Dashboard_.prototype, "DriverClass", void 0);
|
|
24169
25008
|
__decorate([
|
|
24170
|
-
Field({ nullable: true, description: `
|
|
25009
|
+
Field({ nullable: true, description: `Used to identify the dashboard for code-base dashboards. Allows reuse of the same DriverClass for multiple dashboards that can be rendered differently.` }),
|
|
24171
25010
|
MaxLength(510),
|
|
24172
25011
|
__metadata("design:type", String)
|
|
24173
|
-
], Dashboard_.prototype, "
|
|
25012
|
+
], Dashboard_.prototype, "Code", void 0);
|
|
24174
25013
|
__decorate([
|
|
24175
25014
|
Field(),
|
|
24176
25015
|
MaxLength(200),
|
|
@@ -24208,8 +25047,8 @@ let CreateDashboardInput = class CreateDashboardInput {
|
|
|
24208
25047
|
Thumbnail;
|
|
24209
25048
|
Scope;
|
|
24210
25049
|
ApplicationID;
|
|
24211
|
-
Code;
|
|
24212
25050
|
DriverClass;
|
|
25051
|
+
Code;
|
|
24213
25052
|
};
|
|
24214
25053
|
__decorate([
|
|
24215
25054
|
Field({ nullable: true }),
|
|
@@ -24250,11 +25089,11 @@ __decorate([
|
|
|
24250
25089
|
__decorate([
|
|
24251
25090
|
Field({ nullable: true }),
|
|
24252
25091
|
__metadata("design:type", String)
|
|
24253
|
-
], CreateDashboardInput.prototype, "
|
|
25092
|
+
], CreateDashboardInput.prototype, "DriverClass", void 0);
|
|
24254
25093
|
__decorate([
|
|
24255
25094
|
Field({ nullable: true }),
|
|
24256
25095
|
__metadata("design:type", String)
|
|
24257
|
-
], CreateDashboardInput.prototype, "
|
|
25096
|
+
], CreateDashboardInput.prototype, "Code", void 0);
|
|
24258
25097
|
CreateDashboardInput = __decorate([
|
|
24259
25098
|
InputType()
|
|
24260
25099
|
], CreateDashboardInput);
|
|
@@ -24270,8 +25109,8 @@ let UpdateDashboardInput = class UpdateDashboardInput {
|
|
|
24270
25109
|
Thumbnail;
|
|
24271
25110
|
Scope;
|
|
24272
25111
|
ApplicationID;
|
|
24273
|
-
Code;
|
|
24274
25112
|
DriverClass;
|
|
25113
|
+
Code;
|
|
24275
25114
|
OldValues___;
|
|
24276
25115
|
};
|
|
24277
25116
|
__decorate([
|
|
@@ -24317,11 +25156,11 @@ __decorate([
|
|
|
24317
25156
|
__decorate([
|
|
24318
25157
|
Field({ nullable: true }),
|
|
24319
25158
|
__metadata("design:type", String)
|
|
24320
|
-
], UpdateDashboardInput.prototype, "
|
|
25159
|
+
], UpdateDashboardInput.prototype, "DriverClass", void 0);
|
|
24321
25160
|
__decorate([
|
|
24322
25161
|
Field({ nullable: true }),
|
|
24323
25162
|
__metadata("design:type", String)
|
|
24324
|
-
], UpdateDashboardInput.prototype, "
|
|
25163
|
+
], UpdateDashboardInput.prototype, "Code", void 0);
|
|
24325
25164
|
__decorate([
|
|
24326
25165
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
24327
25166
|
__metadata("design:type", Array)
|
|
@@ -27786,6 +28625,7 @@ let Conversation_ = class Conversation_ {
|
|
|
27786
28625
|
ConversationDetails_ConversationIDArray;
|
|
27787
28626
|
Reports_ConversationIDArray;
|
|
27788
28627
|
MJ_ConversationArtifacts_ConversationIDArray;
|
|
28628
|
+
MJ_AIAgentRuns_ConversationIDArray;
|
|
27789
28629
|
};
|
|
27790
28630
|
__decorate([
|
|
27791
28631
|
Field(),
|
|
@@ -27877,6 +28717,10 @@ __decorate([
|
|
|
27877
28717
|
Field(() => [ConversationArtifact_]),
|
|
27878
28718
|
__metadata("design:type", Array)
|
|
27879
28719
|
], Conversation_.prototype, "MJ_ConversationArtifacts_ConversationIDArray", void 0);
|
|
28720
|
+
__decorate([
|
|
28721
|
+
Field(() => [AIAgentRun_]),
|
|
28722
|
+
__metadata("design:type", Array)
|
|
28723
|
+
], Conversation_.prototype, "MJ_AIAgentRuns_ConversationIDArray", void 0);
|
|
27880
28724
|
Conversation_ = __decorate([
|
|
27881
28725
|
ObjectType()
|
|
27882
28726
|
], Conversation_);
|
|
@@ -28086,6 +28930,13 @@ let ConversationResolver = class ConversationResolver extends ResolverBase {
|
|
|
28086
28930
|
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Artifacts', await dataSource.query(sSQL));
|
|
28087
28931
|
return result;
|
|
28088
28932
|
}
|
|
28933
|
+
async MJ_AIAgentRuns_ConversationIDArray(conversation_, { dataSources, userPayload }, pubSub) {
|
|
28934
|
+
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
28935
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
28936
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRuns] WHERE [ConversationID]='${conversation_.ID}' ` + this.getRowLevelSecurityWhereClause('MJ: AI Agent Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
28937
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Runs', await dataSource.query(sSQL));
|
|
28938
|
+
return result;
|
|
28939
|
+
}
|
|
28089
28940
|
async CreateConversation(input, { dataSources, userPayload }, pubSub) {
|
|
28090
28941
|
const dataSource = GetReadWriteDataSource(dataSources);
|
|
28091
28942
|
return this.CreateRecord('Conversations', input, dataSource, userPayload, pubSub);
|
|
@@ -28163,6 +29014,15 @@ __decorate([
|
|
|
28163
29014
|
__metadata("design:paramtypes", [Conversation_, Object, PubSubEngine]),
|
|
28164
29015
|
__metadata("design:returntype", Promise)
|
|
28165
29016
|
], ConversationResolver.prototype, "MJ_ConversationArtifacts_ConversationIDArray", null);
|
|
29017
|
+
__decorate([
|
|
29018
|
+
FieldResolver(() => [AIAgentRun_]),
|
|
29019
|
+
__param(0, Root()),
|
|
29020
|
+
__param(1, Ctx()),
|
|
29021
|
+
__param(2, PubSub()),
|
|
29022
|
+
__metadata("design:type", Function),
|
|
29023
|
+
__metadata("design:paramtypes", [Conversation_, Object, PubSubEngine]),
|
|
29024
|
+
__metadata("design:returntype", Promise)
|
|
29025
|
+
], ConversationResolver.prototype, "MJ_AIAgentRuns_ConversationIDArray", null);
|
|
28166
29026
|
__decorate([
|
|
28167
29027
|
Mutation(() => Conversation_),
|
|
28168
29028
|
__param(0, Arg('input', () => CreateConversationInput)),
|
|
@@ -32822,6 +33682,7 @@ let DataContextItem_ = class DataContextItem_ {
|
|
|
32822
33682
|
_mj__CreatedAt;
|
|
32823
33683
|
_mj__UpdatedAt;
|
|
32824
33684
|
Description;
|
|
33685
|
+
CodeName;
|
|
32825
33686
|
DataContext;
|
|
32826
33687
|
View;
|
|
32827
33688
|
Query;
|
|
@@ -32889,6 +33750,11 @@ __decorate([
|
|
|
32889
33750
|
Field({ nullable: true }),
|
|
32890
33751
|
__metadata("design:type", String)
|
|
32891
33752
|
], DataContextItem_.prototype, "Description", void 0);
|
|
33753
|
+
__decorate([
|
|
33754
|
+
Field({ nullable: true, description: `Optional programmatic identifier for this data context item. Must be unique within the DataContext and follow JavaScript naming conventions (letters, numbers, underscore, starting with letter or underscore). Used for improved code generation and programmatic access to data context items.` }),
|
|
33755
|
+
MaxLength(510),
|
|
33756
|
+
__metadata("design:type", String)
|
|
33757
|
+
], DataContextItem_.prototype, "CodeName", void 0);
|
|
32892
33758
|
__decorate([
|
|
32893
33759
|
Field(),
|
|
32894
33760
|
MaxLength(510),
|
|
@@ -32924,6 +33790,7 @@ let CreateDataContextItemInput = class CreateDataContextItemInput {
|
|
|
32924
33790
|
DataJSON;
|
|
32925
33791
|
LastRefreshedAt;
|
|
32926
33792
|
Description;
|
|
33793
|
+
CodeName;
|
|
32927
33794
|
};
|
|
32928
33795
|
__decorate([
|
|
32929
33796
|
Field({ nullable: true }),
|
|
@@ -32965,6 +33832,10 @@ __decorate([
|
|
|
32965
33832
|
Field({ nullable: true }),
|
|
32966
33833
|
__metadata("design:type", String)
|
|
32967
33834
|
], CreateDataContextItemInput.prototype, "Description", void 0);
|
|
33835
|
+
__decorate([
|
|
33836
|
+
Field({ nullable: true }),
|
|
33837
|
+
__metadata("design:type", String)
|
|
33838
|
+
], CreateDataContextItemInput.prototype, "CodeName", void 0);
|
|
32968
33839
|
CreateDataContextItemInput = __decorate([
|
|
32969
33840
|
InputType()
|
|
32970
33841
|
], CreateDataContextItemInput);
|
|
@@ -32981,6 +33852,7 @@ let UpdateDataContextItemInput = class UpdateDataContextItemInput {
|
|
|
32981
33852
|
DataJSON;
|
|
32982
33853
|
LastRefreshedAt;
|
|
32983
33854
|
Description;
|
|
33855
|
+
CodeName;
|
|
32984
33856
|
OldValues___;
|
|
32985
33857
|
};
|
|
32986
33858
|
__decorate([
|
|
@@ -33027,6 +33899,10 @@ __decorate([
|
|
|
33027
33899
|
Field({ nullable: true }),
|
|
33028
33900
|
__metadata("design:type", String)
|
|
33029
33901
|
], UpdateDataContextItemInput.prototype, "Description", void 0);
|
|
33902
|
+
__decorate([
|
|
33903
|
+
Field({ nullable: true }),
|
|
33904
|
+
__metadata("design:type", String)
|
|
33905
|
+
], UpdateDataContextItemInput.prototype, "CodeName", void 0);
|
|
33030
33906
|
__decorate([
|
|
33031
33907
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
33032
33908
|
__metadata("design:type", Array)
|
|
@@ -49608,8 +50484,10 @@ let AIModelVendor_ = class AIModelVendor_ {
|
|
|
49608
50484
|
SupportsStreaming;
|
|
49609
50485
|
_mj__CreatedAt;
|
|
49610
50486
|
_mj__UpdatedAt;
|
|
50487
|
+
TypeID;
|
|
49611
50488
|
Model;
|
|
49612
50489
|
Vendor;
|
|
50490
|
+
Type;
|
|
49613
50491
|
};
|
|
49614
50492
|
__decorate([
|
|
49615
50493
|
Field(),
|
|
@@ -49681,6 +50559,11 @@ __decorate([
|
|
|
49681
50559
|
MaxLength(10),
|
|
49682
50560
|
__metadata("design:type", Date)
|
|
49683
50561
|
], AIModelVendor_.prototype, "_mj__UpdatedAt", void 0);
|
|
50562
|
+
__decorate([
|
|
50563
|
+
Field({ nullable: true, description: `References the type/role of the vendor for this model (e.g., model developer, inference provider)` }),
|
|
50564
|
+
MaxLength(16),
|
|
50565
|
+
__metadata("design:type", String)
|
|
50566
|
+
], AIModelVendor_.prototype, "TypeID", void 0);
|
|
49684
50567
|
__decorate([
|
|
49685
50568
|
Field(),
|
|
49686
50569
|
MaxLength(100),
|
|
@@ -49691,6 +50574,11 @@ __decorate([
|
|
|
49691
50574
|
MaxLength(100),
|
|
49692
50575
|
__metadata("design:type", String)
|
|
49693
50576
|
], AIModelVendor_.prototype, "Vendor", void 0);
|
|
50577
|
+
__decorate([
|
|
50578
|
+
Field({ nullable: true }),
|
|
50579
|
+
MaxLength(100),
|
|
50580
|
+
__metadata("design:type", String)
|
|
50581
|
+
], AIModelVendor_.prototype, "Type", void 0);
|
|
49694
50582
|
AIModelVendor_ = __decorate([
|
|
49695
50583
|
ObjectType()
|
|
49696
50584
|
], AIModelVendor_);
|
|
@@ -49708,6 +50596,7 @@ let CreateAIModelVendorInput = class CreateAIModelVendorInput {
|
|
|
49708
50596
|
SupportedResponseFormats;
|
|
49709
50597
|
SupportsEffortLevel;
|
|
49710
50598
|
SupportsStreaming;
|
|
50599
|
+
TypeID;
|
|
49711
50600
|
};
|
|
49712
50601
|
__decorate([
|
|
49713
50602
|
Field({ nullable: true }),
|
|
@@ -49757,6 +50646,10 @@ __decorate([
|
|
|
49757
50646
|
Field(() => Boolean, { nullable: true }),
|
|
49758
50647
|
__metadata("design:type", Boolean)
|
|
49759
50648
|
], CreateAIModelVendorInput.prototype, "SupportsStreaming", void 0);
|
|
50649
|
+
__decorate([
|
|
50650
|
+
Field({ nullable: true }),
|
|
50651
|
+
__metadata("design:type", String)
|
|
50652
|
+
], CreateAIModelVendorInput.prototype, "TypeID", void 0);
|
|
49760
50653
|
CreateAIModelVendorInput = __decorate([
|
|
49761
50654
|
InputType()
|
|
49762
50655
|
], CreateAIModelVendorInput);
|
|
@@ -49775,6 +50668,7 @@ let UpdateAIModelVendorInput = class UpdateAIModelVendorInput {
|
|
|
49775
50668
|
SupportedResponseFormats;
|
|
49776
50669
|
SupportsEffortLevel;
|
|
49777
50670
|
SupportsStreaming;
|
|
50671
|
+
TypeID;
|
|
49778
50672
|
OldValues___;
|
|
49779
50673
|
};
|
|
49780
50674
|
__decorate([
|
|
@@ -49829,6 +50723,10 @@ __decorate([
|
|
|
49829
50723
|
Field(() => Boolean, { nullable: true }),
|
|
49830
50724
|
__metadata("design:type", Boolean)
|
|
49831
50725
|
], UpdateAIModelVendorInput.prototype, "SupportsStreaming", void 0);
|
|
50726
|
+
__decorate([
|
|
50727
|
+
Field({ nullable: true }),
|
|
50728
|
+
__metadata("design:type", String)
|
|
50729
|
+
], UpdateAIModelVendorInput.prototype, "TypeID", void 0);
|
|
49832
50730
|
__decorate([
|
|
49833
50731
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
49834
50732
|
__metadata("design:type", Array)
|
|
@@ -49987,6 +50885,7 @@ let AIVendorTypeDefinition_ = class AIVendorTypeDefinition_ {
|
|
|
49987
50885
|
Description;
|
|
49988
50886
|
_mj__CreatedAt;
|
|
49989
50887
|
_mj__UpdatedAt;
|
|
50888
|
+
MJ_AIModelVendors_TypeIDArray;
|
|
49990
50889
|
MJ_AIVendorTypes_TypeIDArray;
|
|
49991
50890
|
};
|
|
49992
50891
|
__decorate([
|
|
@@ -50013,6 +50912,10 @@ __decorate([
|
|
|
50013
50912
|
MaxLength(10),
|
|
50014
50913
|
__metadata("design:type", Date)
|
|
50015
50914
|
], AIVendorTypeDefinition_.prototype, "_mj__UpdatedAt", void 0);
|
|
50915
|
+
__decorate([
|
|
50916
|
+
Field(() => [AIModelVendor_]),
|
|
50917
|
+
__metadata("design:type", Array)
|
|
50918
|
+
], AIVendorTypeDefinition_.prototype, "MJ_AIModelVendors_TypeIDArray", void 0);
|
|
50016
50919
|
__decorate([
|
|
50017
50920
|
Field(() => [AIVendorType_]),
|
|
50018
50921
|
__metadata("design:type", Array)
|
|
@@ -50125,6 +51028,13 @@ let AIVendorTypeDefinitionResolver = class AIVendorTypeDefinitionResolver extend
|
|
|
50125
51028
|
const result = this.MapFieldNamesToCodeNames('MJ: AI Vendor Type Definitions', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
50126
51029
|
return result;
|
|
50127
51030
|
}
|
|
51031
|
+
async MJ_AIModelVendors_TypeIDArray(aivendortypedefinition_, { dataSources, userPayload }, pubSub) {
|
|
51032
|
+
this.CheckUserReadPermissions('MJ: AI Model Vendors', userPayload);
|
|
51033
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
51034
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIModelVendors] WHERE [TypeID]='${aivendortypedefinition_.ID}' ` + this.getRowLevelSecurityWhereClause('MJ: AI Model Vendors', userPayload, EntityPermissionType.Read, 'AND');
|
|
51035
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Model Vendors', await dataSource.query(sSQL));
|
|
51036
|
+
return result;
|
|
51037
|
+
}
|
|
50128
51038
|
async MJ_AIVendorTypes_TypeIDArray(aivendortypedefinition_, { dataSources, userPayload }, pubSub) {
|
|
50129
51039
|
this.CheckUserReadPermissions('MJ: AI Vendor Types', userPayload);
|
|
50130
51040
|
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
@@ -50182,6 +51092,15 @@ __decorate([
|
|
|
50182
51092
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
50183
51093
|
__metadata("design:returntype", Promise)
|
|
50184
51094
|
], AIVendorTypeDefinitionResolver.prototype, "AIVendorTypeDefinition", null);
|
|
51095
|
+
__decorate([
|
|
51096
|
+
FieldResolver(() => [AIModelVendor_]),
|
|
51097
|
+
__param(0, Root()),
|
|
51098
|
+
__param(1, Ctx()),
|
|
51099
|
+
__param(2, PubSub()),
|
|
51100
|
+
__metadata("design:type", Function),
|
|
51101
|
+
__metadata("design:paramtypes", [AIVendorTypeDefinition_, Object, PubSubEngine]),
|
|
51102
|
+
__metadata("design:returntype", Promise)
|
|
51103
|
+
], AIVendorTypeDefinitionResolver.prototype, "MJ_AIModelVendors_TypeIDArray", null);
|
|
50185
51104
|
__decorate([
|
|
50186
51105
|
FieldResolver(() => [AIVendorType_]),
|
|
50187
51106
|
__param(0, Root()),
|
|
@@ -55972,11 +56891,16 @@ let AIPromptRun_ = class AIPromptRun_ {
|
|
|
55972
56891
|
ErrorMessage;
|
|
55973
56892
|
_mj__CreatedAt;
|
|
55974
56893
|
_mj__UpdatedAt;
|
|
56894
|
+
ParentID;
|
|
56895
|
+
RunType;
|
|
56896
|
+
ExecutionOrder;
|
|
56897
|
+
AgentRunID;
|
|
55975
56898
|
Prompt;
|
|
55976
56899
|
Model;
|
|
55977
56900
|
Vendor;
|
|
55978
56901
|
Agent;
|
|
55979
56902
|
Configuration;
|
|
56903
|
+
MJ_AIPromptRuns_ParentIDArray;
|
|
55980
56904
|
AIResultCache_PromptRunIDArray;
|
|
55981
56905
|
};
|
|
55982
56906
|
__decorate([
|
|
@@ -56063,6 +56987,25 @@ __decorate([
|
|
|
56063
56987
|
MaxLength(10),
|
|
56064
56988
|
__metadata("design:type", Date)
|
|
56065
56989
|
], AIPromptRun_.prototype, "_mj__UpdatedAt", void 0);
|
|
56990
|
+
__decorate([
|
|
56991
|
+
Field({ nullable: true, description: `References the parent AIPromptRun.ID for hierarchical execution tracking. NULL for top-level runs, populated for parallel children and result selector runs.` }),
|
|
56992
|
+
MaxLength(16),
|
|
56993
|
+
__metadata("design:type", String)
|
|
56994
|
+
], AIPromptRun_.prototype, "ParentID", void 0);
|
|
56995
|
+
__decorate([
|
|
56996
|
+
Field({ description: `Type of prompt run execution: Single (standard single prompt), ParallelParent (coordinator for parallel execution), ParallelChild (individual parallel execution), ResultSelector (result selection prompt that chooses best result)` }),
|
|
56997
|
+
MaxLength(40),
|
|
56998
|
+
__metadata("design:type", String)
|
|
56999
|
+
], AIPromptRun_.prototype, "RunType", void 0);
|
|
57000
|
+
__decorate([
|
|
57001
|
+
Field(() => Int, { nullable: true, description: `Execution order for parallel child runs and result selector runs. Used to track the sequence of execution within a parallel run group. NULL for single runs and parallel parent runs.` }),
|
|
57002
|
+
__metadata("design:type", Number)
|
|
57003
|
+
], AIPromptRun_.prototype, "ExecutionOrder", void 0);
|
|
57004
|
+
__decorate([
|
|
57005
|
+
Field({ nullable: true, description: `Optional reference to the AIAgentRun that initiated this prompt execution. Links prompt runs to their parent agent runs for comprehensive execution tracking.` }),
|
|
57006
|
+
MaxLength(16),
|
|
57007
|
+
__metadata("design:type", String)
|
|
57008
|
+
], AIPromptRun_.prototype, "AgentRunID", void 0);
|
|
56066
57009
|
__decorate([
|
|
56067
57010
|
Field(),
|
|
56068
57011
|
MaxLength(510),
|
|
@@ -56088,6 +57031,10 @@ __decorate([
|
|
|
56088
57031
|
MaxLength(200),
|
|
56089
57032
|
__metadata("design:type", String)
|
|
56090
57033
|
], AIPromptRun_.prototype, "Configuration", void 0);
|
|
57034
|
+
__decorate([
|
|
57035
|
+
Field(() => [AIPromptRun_]),
|
|
57036
|
+
__metadata("design:type", Array)
|
|
57037
|
+
], AIPromptRun_.prototype, "MJ_AIPromptRuns_ParentIDArray", void 0);
|
|
56091
57038
|
__decorate([
|
|
56092
57039
|
Field(() => [AIResultCache_]),
|
|
56093
57040
|
__metadata("design:type", Array)
|
|
@@ -56113,6 +57060,10 @@ let CreateAIPromptRunInput = class CreateAIPromptRunInput {
|
|
|
56113
57060
|
TotalCost;
|
|
56114
57061
|
Success;
|
|
56115
57062
|
ErrorMessage;
|
|
57063
|
+
ParentID;
|
|
57064
|
+
RunType;
|
|
57065
|
+
ExecutionOrder;
|
|
57066
|
+
AgentRunID;
|
|
56116
57067
|
};
|
|
56117
57068
|
__decorate([
|
|
56118
57069
|
Field({ nullable: true }),
|
|
@@ -56178,6 +57129,22 @@ __decorate([
|
|
|
56178
57129
|
Field({ nullable: true }),
|
|
56179
57130
|
__metadata("design:type", String)
|
|
56180
57131
|
], CreateAIPromptRunInput.prototype, "ErrorMessage", void 0);
|
|
57132
|
+
__decorate([
|
|
57133
|
+
Field({ nullable: true }),
|
|
57134
|
+
__metadata("design:type", String)
|
|
57135
|
+
], CreateAIPromptRunInput.prototype, "ParentID", void 0);
|
|
57136
|
+
__decorate([
|
|
57137
|
+
Field({ nullable: true }),
|
|
57138
|
+
__metadata("design:type", String)
|
|
57139
|
+
], CreateAIPromptRunInput.prototype, "RunType", void 0);
|
|
57140
|
+
__decorate([
|
|
57141
|
+
Field(() => Int, { nullable: true }),
|
|
57142
|
+
__metadata("design:type", Number)
|
|
57143
|
+
], CreateAIPromptRunInput.prototype, "ExecutionOrder", void 0);
|
|
57144
|
+
__decorate([
|
|
57145
|
+
Field({ nullable: true }),
|
|
57146
|
+
__metadata("design:type", String)
|
|
57147
|
+
], CreateAIPromptRunInput.prototype, "AgentRunID", void 0);
|
|
56181
57148
|
CreateAIPromptRunInput = __decorate([
|
|
56182
57149
|
InputType()
|
|
56183
57150
|
], CreateAIPromptRunInput);
|
|
@@ -56200,6 +57167,10 @@ let UpdateAIPromptRunInput = class UpdateAIPromptRunInput {
|
|
|
56200
57167
|
TotalCost;
|
|
56201
57168
|
Success;
|
|
56202
57169
|
ErrorMessage;
|
|
57170
|
+
ParentID;
|
|
57171
|
+
RunType;
|
|
57172
|
+
ExecutionOrder;
|
|
57173
|
+
AgentRunID;
|
|
56203
57174
|
OldValues___;
|
|
56204
57175
|
};
|
|
56205
57176
|
__decorate([
|
|
@@ -56270,6 +57241,22 @@ __decorate([
|
|
|
56270
57241
|
Field({ nullable: true }),
|
|
56271
57242
|
__metadata("design:type", String)
|
|
56272
57243
|
], UpdateAIPromptRunInput.prototype, "ErrorMessage", void 0);
|
|
57244
|
+
__decorate([
|
|
57245
|
+
Field({ nullable: true }),
|
|
57246
|
+
__metadata("design:type", String)
|
|
57247
|
+
], UpdateAIPromptRunInput.prototype, "ParentID", void 0);
|
|
57248
|
+
__decorate([
|
|
57249
|
+
Field({ nullable: true }),
|
|
57250
|
+
__metadata("design:type", String)
|
|
57251
|
+
], UpdateAIPromptRunInput.prototype, "RunType", void 0);
|
|
57252
|
+
__decorate([
|
|
57253
|
+
Field(() => Int, { nullable: true }),
|
|
57254
|
+
__metadata("design:type", Number)
|
|
57255
|
+
], UpdateAIPromptRunInput.prototype, "ExecutionOrder", void 0);
|
|
57256
|
+
__decorate([
|
|
57257
|
+
Field({ nullable: true }),
|
|
57258
|
+
__metadata("design:type", String)
|
|
57259
|
+
], UpdateAIPromptRunInput.prototype, "AgentRunID", void 0);
|
|
56273
57260
|
__decorate([
|
|
56274
57261
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
56275
57262
|
__metadata("design:type", Array)
|
|
@@ -56340,6 +57327,13 @@ let AIPromptRunResolver = class AIPromptRunResolver extends ResolverBase {
|
|
|
56340
57327
|
const result = this.MapFieldNamesToCodeNames('MJ: AI Prompt Runs', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
56341
57328
|
return result;
|
|
56342
57329
|
}
|
|
57330
|
+
async MJ_AIPromptRuns_ParentIDArray(aipromptrun_, { dataSources, userPayload }, pubSub) {
|
|
57331
|
+
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
57332
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
57333
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptRuns] WHERE [ParentID]='${aipromptrun_.ID}' ` + this.getRowLevelSecurityWhereClause('MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
57334
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', await dataSource.query(sSQL));
|
|
57335
|
+
return result;
|
|
57336
|
+
}
|
|
56343
57337
|
async AIResultCache_PromptRunIDArray(aipromptrun_, { dataSources, userPayload }, pubSub) {
|
|
56344
57338
|
this.CheckUserReadPermissions('AI Result Cache', userPayload);
|
|
56345
57339
|
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
@@ -56397,6 +57391,15 @@ __decorate([
|
|
|
56397
57391
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
56398
57392
|
__metadata("design:returntype", Promise)
|
|
56399
57393
|
], AIPromptRunResolver.prototype, "AIPromptRun", null);
|
|
57394
|
+
__decorate([
|
|
57395
|
+
FieldResolver(() => [AIPromptRun_]),
|
|
57396
|
+
__param(0, Root()),
|
|
57397
|
+
__param(1, Ctx()),
|
|
57398
|
+
__param(2, PubSub()),
|
|
57399
|
+
__metadata("design:type", Function),
|
|
57400
|
+
__metadata("design:paramtypes", [AIPromptRun_, Object, PubSubEngine]),
|
|
57401
|
+
__metadata("design:returntype", Promise)
|
|
57402
|
+
], AIPromptRunResolver.prototype, "MJ_AIPromptRuns_ParentIDArray", null);
|
|
56400
57403
|
__decorate([
|
|
56401
57404
|
FieldResolver(() => [AIResultCache_]),
|
|
56402
57405
|
__param(0, Root()),
|
|
@@ -56438,6 +57441,383 @@ AIPromptRunResolver = __decorate([
|
|
|
56438
57441
|
Resolver(AIPromptRun_)
|
|
56439
57442
|
], AIPromptRunResolver);
|
|
56440
57443
|
export { AIPromptRunResolver };
|
|
57444
|
+
let AIAgentRunStep_ = class AIAgentRunStep_ {
|
|
57445
|
+
ID;
|
|
57446
|
+
AgentRunID;
|
|
57447
|
+
StepNumber;
|
|
57448
|
+
StepType;
|
|
57449
|
+
StepName;
|
|
57450
|
+
TargetID;
|
|
57451
|
+
Status;
|
|
57452
|
+
StartedAt;
|
|
57453
|
+
CompletedAt;
|
|
57454
|
+
Success;
|
|
57455
|
+
ErrorMessage;
|
|
57456
|
+
InputData;
|
|
57457
|
+
OutputData;
|
|
57458
|
+
_mj__CreatedAt;
|
|
57459
|
+
_mj__UpdatedAt;
|
|
57460
|
+
};
|
|
57461
|
+
__decorate([
|
|
57462
|
+
Field({ description: `Unique identifier for this execution step` }),
|
|
57463
|
+
MaxLength(16),
|
|
57464
|
+
__metadata("design:type", String)
|
|
57465
|
+
], AIAgentRunStep_.prototype, "ID", void 0);
|
|
57466
|
+
__decorate([
|
|
57467
|
+
Field({ description: `Reference to the parent AIAgentRun that contains this step` }),
|
|
57468
|
+
MaxLength(16),
|
|
57469
|
+
__metadata("design:type", String)
|
|
57470
|
+
], AIAgentRunStep_.prototype, "AgentRunID", void 0);
|
|
57471
|
+
__decorate([
|
|
57472
|
+
Field(() => Int, { description: `Sequential number of this step within the agent run, starting from 1` }),
|
|
57473
|
+
__metadata("design:type", Number)
|
|
57474
|
+
], AIAgentRunStep_.prototype, "StepNumber", void 0);
|
|
57475
|
+
__decorate([
|
|
57476
|
+
Field({ description: `Type of execution step: prompt, tool, subagent, decision` }),
|
|
57477
|
+
MaxLength(100),
|
|
57478
|
+
__metadata("design:type", String)
|
|
57479
|
+
], AIAgentRunStep_.prototype, "StepType", void 0);
|
|
57480
|
+
__decorate([
|
|
57481
|
+
Field({ description: `Human-readable name of what this step accomplishes` }),
|
|
57482
|
+
MaxLength(510),
|
|
57483
|
+
__metadata("design:type", String)
|
|
57484
|
+
], AIAgentRunStep_.prototype, "StepName", void 0);
|
|
57485
|
+
__decorate([
|
|
57486
|
+
Field({ nullable: true, description: `ID of the specific target being executed (AIPrompt.ID, AIAction.ID, AIAgent.ID, etc.). NULL for steps that don't target a specific entity.` }),
|
|
57487
|
+
MaxLength(16),
|
|
57488
|
+
__metadata("design:type", String)
|
|
57489
|
+
], AIAgentRunStep_.prototype, "TargetID", void 0);
|
|
57490
|
+
__decorate([
|
|
57491
|
+
Field({ description: `Current execution status of this step: Running, Completed, Failed, Cancelled` }),
|
|
57492
|
+
MaxLength(100),
|
|
57493
|
+
__metadata("design:type", String)
|
|
57494
|
+
], AIAgentRunStep_.prototype, "Status", void 0);
|
|
57495
|
+
__decorate([
|
|
57496
|
+
Field({ description: `Timestamp when this step began execution` }),
|
|
57497
|
+
MaxLength(10),
|
|
57498
|
+
__metadata("design:type", Date)
|
|
57499
|
+
], AIAgentRunStep_.prototype, "StartedAt", void 0);
|
|
57500
|
+
__decorate([
|
|
57501
|
+
Field({ nullable: true, description: `Timestamp when this step completed. NULL while still running.` }),
|
|
57502
|
+
MaxLength(10),
|
|
57503
|
+
__metadata("design:type", Date)
|
|
57504
|
+
], AIAgentRunStep_.prototype, "CompletedAt", void 0);
|
|
57505
|
+
__decorate([
|
|
57506
|
+
Field(() => Boolean, { nullable: true, description: `Whether this step completed successfully. NULL while running, TRUE/FALSE when completed.` }),
|
|
57507
|
+
__metadata("design:type", Boolean)
|
|
57508
|
+
], AIAgentRunStep_.prototype, "Success", void 0);
|
|
57509
|
+
__decorate([
|
|
57510
|
+
Field({ nullable: true, description: `Error message if this step failed. NULL for successful steps.` }),
|
|
57511
|
+
__metadata("design:type", String)
|
|
57512
|
+
], AIAgentRunStep_.prototype, "ErrorMessage", void 0);
|
|
57513
|
+
__decorate([
|
|
57514
|
+
Field({ nullable: true, description: `JSON serialization of input data passed to this step for execution` }),
|
|
57515
|
+
__metadata("design:type", String)
|
|
57516
|
+
], AIAgentRunStep_.prototype, "InputData", void 0);
|
|
57517
|
+
__decorate([
|
|
57518
|
+
Field({ nullable: true, description: `JSON serialization of the output data produced by this step` }),
|
|
57519
|
+
__metadata("design:type", String)
|
|
57520
|
+
], AIAgentRunStep_.prototype, "OutputData", void 0);
|
|
57521
|
+
__decorate([
|
|
57522
|
+
Field(),
|
|
57523
|
+
MaxLength(10),
|
|
57524
|
+
__metadata("design:type", Date)
|
|
57525
|
+
], AIAgentRunStep_.prototype, "_mj__CreatedAt", void 0);
|
|
57526
|
+
__decorate([
|
|
57527
|
+
Field(),
|
|
57528
|
+
MaxLength(10),
|
|
57529
|
+
__metadata("design:type", Date)
|
|
57530
|
+
], AIAgentRunStep_.prototype, "_mj__UpdatedAt", void 0);
|
|
57531
|
+
AIAgentRunStep_ = __decorate([
|
|
57532
|
+
ObjectType()
|
|
57533
|
+
], AIAgentRunStep_);
|
|
57534
|
+
export { AIAgentRunStep_ };
|
|
57535
|
+
let CreateAIAgentRunStepInput = class CreateAIAgentRunStepInput {
|
|
57536
|
+
AgentRunID;
|
|
57537
|
+
StepNumber;
|
|
57538
|
+
StepType;
|
|
57539
|
+
StepName;
|
|
57540
|
+
TargetID;
|
|
57541
|
+
Status;
|
|
57542
|
+
StartedAt;
|
|
57543
|
+
CompletedAt;
|
|
57544
|
+
Success;
|
|
57545
|
+
ErrorMessage;
|
|
57546
|
+
InputData;
|
|
57547
|
+
OutputData;
|
|
57548
|
+
};
|
|
57549
|
+
__decorate([
|
|
57550
|
+
Field({ nullable: true }),
|
|
57551
|
+
__metadata("design:type", String)
|
|
57552
|
+
], CreateAIAgentRunStepInput.prototype, "AgentRunID", void 0);
|
|
57553
|
+
__decorate([
|
|
57554
|
+
Field(() => Int, { nullable: true }),
|
|
57555
|
+
__metadata("design:type", Number)
|
|
57556
|
+
], CreateAIAgentRunStepInput.prototype, "StepNumber", void 0);
|
|
57557
|
+
__decorate([
|
|
57558
|
+
Field({ nullable: true }),
|
|
57559
|
+
__metadata("design:type", String)
|
|
57560
|
+
], CreateAIAgentRunStepInput.prototype, "StepType", void 0);
|
|
57561
|
+
__decorate([
|
|
57562
|
+
Field({ nullable: true }),
|
|
57563
|
+
__metadata("design:type", String)
|
|
57564
|
+
], CreateAIAgentRunStepInput.prototype, "StepName", void 0);
|
|
57565
|
+
__decorate([
|
|
57566
|
+
Field({ nullable: true }),
|
|
57567
|
+
__metadata("design:type", String)
|
|
57568
|
+
], CreateAIAgentRunStepInput.prototype, "TargetID", void 0);
|
|
57569
|
+
__decorate([
|
|
57570
|
+
Field({ nullable: true }),
|
|
57571
|
+
__metadata("design:type", String)
|
|
57572
|
+
], CreateAIAgentRunStepInput.prototype, "Status", void 0);
|
|
57573
|
+
__decorate([
|
|
57574
|
+
Field({ nullable: true }),
|
|
57575
|
+
__metadata("design:type", Date)
|
|
57576
|
+
], CreateAIAgentRunStepInput.prototype, "StartedAt", void 0);
|
|
57577
|
+
__decorate([
|
|
57578
|
+
Field({ nullable: true }),
|
|
57579
|
+
__metadata("design:type", Date)
|
|
57580
|
+
], CreateAIAgentRunStepInput.prototype, "CompletedAt", void 0);
|
|
57581
|
+
__decorate([
|
|
57582
|
+
Field(() => Boolean, { nullable: true }),
|
|
57583
|
+
__metadata("design:type", Boolean)
|
|
57584
|
+
], CreateAIAgentRunStepInput.prototype, "Success", void 0);
|
|
57585
|
+
__decorate([
|
|
57586
|
+
Field({ nullable: true }),
|
|
57587
|
+
__metadata("design:type", String)
|
|
57588
|
+
], CreateAIAgentRunStepInput.prototype, "ErrorMessage", void 0);
|
|
57589
|
+
__decorate([
|
|
57590
|
+
Field({ nullable: true }),
|
|
57591
|
+
__metadata("design:type", String)
|
|
57592
|
+
], CreateAIAgentRunStepInput.prototype, "InputData", void 0);
|
|
57593
|
+
__decorate([
|
|
57594
|
+
Field({ nullable: true }),
|
|
57595
|
+
__metadata("design:type", String)
|
|
57596
|
+
], CreateAIAgentRunStepInput.prototype, "OutputData", void 0);
|
|
57597
|
+
CreateAIAgentRunStepInput = __decorate([
|
|
57598
|
+
InputType()
|
|
57599
|
+
], CreateAIAgentRunStepInput);
|
|
57600
|
+
export { CreateAIAgentRunStepInput };
|
|
57601
|
+
let UpdateAIAgentRunStepInput = class UpdateAIAgentRunStepInput {
|
|
57602
|
+
ID;
|
|
57603
|
+
AgentRunID;
|
|
57604
|
+
StepNumber;
|
|
57605
|
+
StepType;
|
|
57606
|
+
StepName;
|
|
57607
|
+
TargetID;
|
|
57608
|
+
Status;
|
|
57609
|
+
StartedAt;
|
|
57610
|
+
CompletedAt;
|
|
57611
|
+
Success;
|
|
57612
|
+
ErrorMessage;
|
|
57613
|
+
InputData;
|
|
57614
|
+
OutputData;
|
|
57615
|
+
OldValues___;
|
|
57616
|
+
};
|
|
57617
|
+
__decorate([
|
|
57618
|
+
Field(),
|
|
57619
|
+
__metadata("design:type", String)
|
|
57620
|
+
], UpdateAIAgentRunStepInput.prototype, "ID", void 0);
|
|
57621
|
+
__decorate([
|
|
57622
|
+
Field({ nullable: true }),
|
|
57623
|
+
__metadata("design:type", String)
|
|
57624
|
+
], UpdateAIAgentRunStepInput.prototype, "AgentRunID", void 0);
|
|
57625
|
+
__decorate([
|
|
57626
|
+
Field(() => Int, { nullable: true }),
|
|
57627
|
+
__metadata("design:type", Number)
|
|
57628
|
+
], UpdateAIAgentRunStepInput.prototype, "StepNumber", void 0);
|
|
57629
|
+
__decorate([
|
|
57630
|
+
Field({ nullable: true }),
|
|
57631
|
+
__metadata("design:type", String)
|
|
57632
|
+
], UpdateAIAgentRunStepInput.prototype, "StepType", void 0);
|
|
57633
|
+
__decorate([
|
|
57634
|
+
Field({ nullable: true }),
|
|
57635
|
+
__metadata("design:type", String)
|
|
57636
|
+
], UpdateAIAgentRunStepInput.prototype, "StepName", void 0);
|
|
57637
|
+
__decorate([
|
|
57638
|
+
Field({ nullable: true }),
|
|
57639
|
+
__metadata("design:type", String)
|
|
57640
|
+
], UpdateAIAgentRunStepInput.prototype, "TargetID", void 0);
|
|
57641
|
+
__decorate([
|
|
57642
|
+
Field({ nullable: true }),
|
|
57643
|
+
__metadata("design:type", String)
|
|
57644
|
+
], UpdateAIAgentRunStepInput.prototype, "Status", void 0);
|
|
57645
|
+
__decorate([
|
|
57646
|
+
Field({ nullable: true }),
|
|
57647
|
+
__metadata("design:type", Date)
|
|
57648
|
+
], UpdateAIAgentRunStepInput.prototype, "StartedAt", void 0);
|
|
57649
|
+
__decorate([
|
|
57650
|
+
Field({ nullable: true }),
|
|
57651
|
+
__metadata("design:type", Date)
|
|
57652
|
+
], UpdateAIAgentRunStepInput.prototype, "CompletedAt", void 0);
|
|
57653
|
+
__decorate([
|
|
57654
|
+
Field(() => Boolean, { nullable: true }),
|
|
57655
|
+
__metadata("design:type", Boolean)
|
|
57656
|
+
], UpdateAIAgentRunStepInput.prototype, "Success", void 0);
|
|
57657
|
+
__decorate([
|
|
57658
|
+
Field({ nullable: true }),
|
|
57659
|
+
__metadata("design:type", String)
|
|
57660
|
+
], UpdateAIAgentRunStepInput.prototype, "ErrorMessage", void 0);
|
|
57661
|
+
__decorate([
|
|
57662
|
+
Field({ nullable: true }),
|
|
57663
|
+
__metadata("design:type", String)
|
|
57664
|
+
], UpdateAIAgentRunStepInput.prototype, "InputData", void 0);
|
|
57665
|
+
__decorate([
|
|
57666
|
+
Field({ nullable: true }),
|
|
57667
|
+
__metadata("design:type", String)
|
|
57668
|
+
], UpdateAIAgentRunStepInput.prototype, "OutputData", void 0);
|
|
57669
|
+
__decorate([
|
|
57670
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
57671
|
+
__metadata("design:type", Array)
|
|
57672
|
+
], UpdateAIAgentRunStepInput.prototype, "OldValues___", void 0);
|
|
57673
|
+
UpdateAIAgentRunStepInput = __decorate([
|
|
57674
|
+
InputType()
|
|
57675
|
+
], UpdateAIAgentRunStepInput);
|
|
57676
|
+
export { UpdateAIAgentRunStepInput };
|
|
57677
|
+
let RunAIAgentRunStepViewResult = class RunAIAgentRunStepViewResult {
|
|
57678
|
+
Results;
|
|
57679
|
+
UserViewRunID;
|
|
57680
|
+
RowCount;
|
|
57681
|
+
TotalRowCount;
|
|
57682
|
+
ExecutionTime;
|
|
57683
|
+
ErrorMessage;
|
|
57684
|
+
Success;
|
|
57685
|
+
};
|
|
57686
|
+
__decorate([
|
|
57687
|
+
Field(() => [AIAgentRunStep_]),
|
|
57688
|
+
__metadata("design:type", Array)
|
|
57689
|
+
], RunAIAgentRunStepViewResult.prototype, "Results", void 0);
|
|
57690
|
+
__decorate([
|
|
57691
|
+
Field(() => String, { nullable: true }),
|
|
57692
|
+
__metadata("design:type", String)
|
|
57693
|
+
], RunAIAgentRunStepViewResult.prototype, "UserViewRunID", void 0);
|
|
57694
|
+
__decorate([
|
|
57695
|
+
Field(() => Int, { nullable: true }),
|
|
57696
|
+
__metadata("design:type", Number)
|
|
57697
|
+
], RunAIAgentRunStepViewResult.prototype, "RowCount", void 0);
|
|
57698
|
+
__decorate([
|
|
57699
|
+
Field(() => Int, { nullable: true }),
|
|
57700
|
+
__metadata("design:type", Number)
|
|
57701
|
+
], RunAIAgentRunStepViewResult.prototype, "TotalRowCount", void 0);
|
|
57702
|
+
__decorate([
|
|
57703
|
+
Field(() => Int, { nullable: true }),
|
|
57704
|
+
__metadata("design:type", Number)
|
|
57705
|
+
], RunAIAgentRunStepViewResult.prototype, "ExecutionTime", void 0);
|
|
57706
|
+
__decorate([
|
|
57707
|
+
Field({ nullable: true }),
|
|
57708
|
+
__metadata("design:type", String)
|
|
57709
|
+
], RunAIAgentRunStepViewResult.prototype, "ErrorMessage", void 0);
|
|
57710
|
+
__decorate([
|
|
57711
|
+
Field(() => Boolean, { nullable: false }),
|
|
57712
|
+
__metadata("design:type", Boolean)
|
|
57713
|
+
], RunAIAgentRunStepViewResult.prototype, "Success", void 0);
|
|
57714
|
+
RunAIAgentRunStepViewResult = __decorate([
|
|
57715
|
+
ObjectType()
|
|
57716
|
+
], RunAIAgentRunStepViewResult);
|
|
57717
|
+
export { RunAIAgentRunStepViewResult };
|
|
57718
|
+
let AIAgentRunStepResolver = class AIAgentRunStepResolver extends ResolverBase {
|
|
57719
|
+
async RunAIAgentRunStepViewByID(input, { dataSources, userPayload }, pubSub) {
|
|
57720
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
57721
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
57722
|
+
}
|
|
57723
|
+
async RunAIAgentRunStepViewByName(input, { dataSources, userPayload }, pubSub) {
|
|
57724
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
57725
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
57726
|
+
}
|
|
57727
|
+
async RunAIAgentRunStepDynamicView(input, { dataSources, userPayload }, pubSub) {
|
|
57728
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
57729
|
+
input.EntityName = 'MJ: AI Agent Run Steps';
|
|
57730
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
57731
|
+
}
|
|
57732
|
+
async AIAgentRunStep(ID, { dataSources, userPayload }, pubSub) {
|
|
57733
|
+
this.CheckUserReadPermissions('MJ: AI Agent Run Steps', userPayload);
|
|
57734
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
57735
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRunSteps] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('MJ: AI Agent Run Steps', userPayload, EntityPermissionType.Read, 'AND');
|
|
57736
|
+
const result = this.MapFieldNamesToCodeNames('MJ: AI Agent Run Steps', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
57737
|
+
return result;
|
|
57738
|
+
}
|
|
57739
|
+
async CreateAIAgentRunStep(input, { dataSources, userPayload }, pubSub) {
|
|
57740
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
57741
|
+
return this.CreateRecord('MJ: AI Agent Run Steps', input, dataSource, userPayload, pubSub);
|
|
57742
|
+
}
|
|
57743
|
+
async UpdateAIAgentRunStep(input, { dataSources, userPayload }, pubSub) {
|
|
57744
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
57745
|
+
return this.UpdateRecord('MJ: AI Agent Run Steps', input, dataSource, userPayload, pubSub);
|
|
57746
|
+
}
|
|
57747
|
+
async DeleteAIAgentRunStep(ID, options, { dataSources, userPayload }, pubSub) {
|
|
57748
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
57749
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
57750
|
+
return this.DeleteRecord('MJ: AI Agent Run Steps', key, options, dataSource, userPayload, pubSub);
|
|
57751
|
+
}
|
|
57752
|
+
};
|
|
57753
|
+
__decorate([
|
|
57754
|
+
Query(() => RunAIAgentRunStepViewResult),
|
|
57755
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
57756
|
+
__param(1, Ctx()),
|
|
57757
|
+
__param(2, PubSub()),
|
|
57758
|
+
__metadata("design:type", Function),
|
|
57759
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
57760
|
+
__metadata("design:returntype", Promise)
|
|
57761
|
+
], AIAgentRunStepResolver.prototype, "RunAIAgentRunStepViewByID", null);
|
|
57762
|
+
__decorate([
|
|
57763
|
+
Query(() => RunAIAgentRunStepViewResult),
|
|
57764
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
57765
|
+
__param(1, Ctx()),
|
|
57766
|
+
__param(2, PubSub()),
|
|
57767
|
+
__metadata("design:type", Function),
|
|
57768
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
57769
|
+
__metadata("design:returntype", Promise)
|
|
57770
|
+
], AIAgentRunStepResolver.prototype, "RunAIAgentRunStepViewByName", null);
|
|
57771
|
+
__decorate([
|
|
57772
|
+
Query(() => RunAIAgentRunStepViewResult),
|
|
57773
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
57774
|
+
__param(1, Ctx()),
|
|
57775
|
+
__param(2, PubSub()),
|
|
57776
|
+
__metadata("design:type", Function),
|
|
57777
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
57778
|
+
__metadata("design:returntype", Promise)
|
|
57779
|
+
], AIAgentRunStepResolver.prototype, "RunAIAgentRunStepDynamicView", null);
|
|
57780
|
+
__decorate([
|
|
57781
|
+
Query(() => AIAgentRunStep_, { nullable: true }),
|
|
57782
|
+
__param(0, Arg('ID', () => String)),
|
|
57783
|
+
__param(1, Ctx()),
|
|
57784
|
+
__param(2, PubSub()),
|
|
57785
|
+
__metadata("design:type", Function),
|
|
57786
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
57787
|
+
__metadata("design:returntype", Promise)
|
|
57788
|
+
], AIAgentRunStepResolver.prototype, "AIAgentRunStep", null);
|
|
57789
|
+
__decorate([
|
|
57790
|
+
Mutation(() => AIAgentRunStep_),
|
|
57791
|
+
__param(0, Arg('input', () => CreateAIAgentRunStepInput)),
|
|
57792
|
+
__param(1, Ctx()),
|
|
57793
|
+
__param(2, PubSub()),
|
|
57794
|
+
__metadata("design:type", Function),
|
|
57795
|
+
__metadata("design:paramtypes", [CreateAIAgentRunStepInput, Object, PubSubEngine]),
|
|
57796
|
+
__metadata("design:returntype", Promise)
|
|
57797
|
+
], AIAgentRunStepResolver.prototype, "CreateAIAgentRunStep", null);
|
|
57798
|
+
__decorate([
|
|
57799
|
+
Mutation(() => AIAgentRunStep_),
|
|
57800
|
+
__param(0, Arg('input', () => UpdateAIAgentRunStepInput)),
|
|
57801
|
+
__param(1, Ctx()),
|
|
57802
|
+
__param(2, PubSub()),
|
|
57803
|
+
__metadata("design:type", Function),
|
|
57804
|
+
__metadata("design:paramtypes", [UpdateAIAgentRunStepInput, Object, PubSubEngine]),
|
|
57805
|
+
__metadata("design:returntype", Promise)
|
|
57806
|
+
], AIAgentRunStepResolver.prototype, "UpdateAIAgentRunStep", null);
|
|
57807
|
+
__decorate([
|
|
57808
|
+
Mutation(() => AIAgentRunStep_),
|
|
57809
|
+
__param(0, Arg('ID', () => String)),
|
|
57810
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
57811
|
+
__param(2, Ctx()),
|
|
57812
|
+
__param(3, PubSub()),
|
|
57813
|
+
__metadata("design:type", Function),
|
|
57814
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
57815
|
+
__metadata("design:returntype", Promise)
|
|
57816
|
+
], AIAgentRunStepResolver.prototype, "DeleteAIAgentRunStep", null);
|
|
57817
|
+
AIAgentRunStepResolver = __decorate([
|
|
57818
|
+
Resolver(AIAgentRunStep_)
|
|
57819
|
+
], AIAgentRunStepResolver);
|
|
57820
|
+
export { AIAgentRunStepResolver };
|
|
56441
57821
|
let ConversationArtifactPermission_ = class ConversationArtifactPermission_ {
|
|
56442
57822
|
ID;
|
|
56443
57823
|
ConversationArtifactID;
|