@vm0/cli 9.83.0 → 9.83.1
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/{chunk-Z7ZCVASY.js → chunk-5BLBSO2W.js} +146 -63
- package/chunk-5BLBSO2W.js.map +1 -0
- package/index.js +15 -103
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/zero.js +2 -2
- package/chunk-Z7ZCVASY.js.map +0 -1
|
@@ -47,7 +47,7 @@ if (DSN) {
|
|
|
47
47
|
Sentry.init({
|
|
48
48
|
dsn: DSN,
|
|
49
49
|
environment: process.env.SENTRY_ENVIRONMENT ?? "production",
|
|
50
|
-
release: "9.83.
|
|
50
|
+
release: "9.83.1",
|
|
51
51
|
sendDefaultPii: false,
|
|
52
52
|
tracesSampleRate: 0,
|
|
53
53
|
shutdownTimeout: 500,
|
|
@@ -66,7 +66,7 @@ if (DSN) {
|
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
Sentry.setContext("cli", {
|
|
69
|
-
version: "9.83.
|
|
69
|
+
version: "9.83.1",
|
|
70
70
|
command: process.argv.slice(2).join(" ")
|
|
71
71
|
});
|
|
72
72
|
Sentry.setContext("runtime", {
|
|
@@ -17299,11 +17299,7 @@ var ApiRequestError = class extends Error {
|
|
|
17299
17299
|
this.name = "ApiRequestError";
|
|
17300
17300
|
}
|
|
17301
17301
|
};
|
|
17302
|
-
|
|
17303
|
-
const token = await getActiveToken();
|
|
17304
|
-
if (!token) {
|
|
17305
|
-
throw new ApiRequestError("Not authenticated", "UNAUTHORIZED", 401);
|
|
17306
|
-
}
|
|
17302
|
+
function buildHeaders(token) {
|
|
17307
17303
|
const headers = {
|
|
17308
17304
|
Authorization: `Bearer ${token}`
|
|
17309
17305
|
};
|
|
@@ -17322,10 +17318,13 @@ async function getBaseUrl() {
|
|
|
17322
17318
|
}
|
|
17323
17319
|
async function getClientConfig() {
|
|
17324
17320
|
const baseUrl = await getBaseUrl();
|
|
17325
|
-
const baseHeaders = await getHeaders();
|
|
17326
17321
|
const token = await getActiveToken();
|
|
17327
|
-
|
|
17328
|
-
|
|
17322
|
+
if (!token) {
|
|
17323
|
+
throw new ApiRequestError("Not authenticated", "UNAUTHORIZED", 401);
|
|
17324
|
+
}
|
|
17325
|
+
const baseHeaders = buildHeaders(token);
|
|
17326
|
+
const jwtPayload = decodeCliTokenPayload(token) ?? decodeZeroTokenPayload(token);
|
|
17327
|
+
if (jwtPayload) {
|
|
17329
17328
|
return { baseUrl, baseHeaders, jsonQuery: false };
|
|
17330
17329
|
}
|
|
17331
17330
|
const activeOrg = await getActiveOrg();
|
|
@@ -17589,7 +17588,7 @@ async function switchZeroOrg(slug) {
|
|
|
17589
17588
|
const config = await getUserTokenClientConfig();
|
|
17590
17589
|
const client = initClient4(cliAuthOrgContract, config);
|
|
17591
17590
|
const result = await client.switchOrg({
|
|
17592
|
-
headers: {
|
|
17591
|
+
headers: {},
|
|
17593
17592
|
body: { slug }
|
|
17594
17593
|
});
|
|
17595
17594
|
if (result.status === 200) {
|
|
@@ -17742,11 +17741,97 @@ async function deleteZeroComputerConnector() {
|
|
|
17742
17741
|
handleError(result, "Computer connector not found");
|
|
17743
17742
|
}
|
|
17744
17743
|
|
|
17745
|
-
// src/lib/api/domains/
|
|
17744
|
+
// src/lib/api/domains/logs.ts
|
|
17746
17745
|
import { initClient as initClient8 } from "@ts-rest/core";
|
|
17746
|
+
async function getSystemLog(runId, options) {
|
|
17747
|
+
const config = await getClientConfig();
|
|
17748
|
+
const client = initClient8(runSystemLogContract, config);
|
|
17749
|
+
const result = await client.getSystemLog({
|
|
17750
|
+
params: { id: runId },
|
|
17751
|
+
query: {
|
|
17752
|
+
since: options?.since,
|
|
17753
|
+
limit: options?.limit,
|
|
17754
|
+
order: options?.order
|
|
17755
|
+
}
|
|
17756
|
+
});
|
|
17757
|
+
if (result.status === 200) {
|
|
17758
|
+
return result.body;
|
|
17759
|
+
}
|
|
17760
|
+
handleError(result, "Failed to fetch system log");
|
|
17761
|
+
}
|
|
17762
|
+
async function getMetrics(runId, options) {
|
|
17763
|
+
const config = await getClientConfig();
|
|
17764
|
+
const client = initClient8(runMetricsContract, config);
|
|
17765
|
+
const result = await client.getMetrics({
|
|
17766
|
+
params: { id: runId },
|
|
17767
|
+
query: {
|
|
17768
|
+
since: options?.since,
|
|
17769
|
+
limit: options?.limit,
|
|
17770
|
+
order: options?.order
|
|
17771
|
+
}
|
|
17772
|
+
});
|
|
17773
|
+
if (result.status === 200) {
|
|
17774
|
+
return result.body;
|
|
17775
|
+
}
|
|
17776
|
+
handleError(result, "Failed to fetch metrics");
|
|
17777
|
+
}
|
|
17778
|
+
async function getAgentEvents(runId, options) {
|
|
17779
|
+
const config = await getClientConfig();
|
|
17780
|
+
const client = initClient8(runAgentEventsContract, config);
|
|
17781
|
+
const result = await client.getAgentEvents({
|
|
17782
|
+
params: { id: runId },
|
|
17783
|
+
query: {
|
|
17784
|
+
since: options?.since,
|
|
17785
|
+
limit: options?.limit,
|
|
17786
|
+
order: options?.order
|
|
17787
|
+
}
|
|
17788
|
+
});
|
|
17789
|
+
if (result.status === 200) {
|
|
17790
|
+
return result.body;
|
|
17791
|
+
}
|
|
17792
|
+
handleError(result, "Failed to fetch agent events");
|
|
17793
|
+
}
|
|
17794
|
+
async function getNetworkLogs(runId, options) {
|
|
17795
|
+
const config = await getClientConfig();
|
|
17796
|
+
const client = initClient8(runNetworkLogsContract, config);
|
|
17797
|
+
const result = await client.getNetworkLogs({
|
|
17798
|
+
params: { id: runId },
|
|
17799
|
+
query: {
|
|
17800
|
+
since: options?.since,
|
|
17801
|
+
limit: options?.limit,
|
|
17802
|
+
order: options?.order
|
|
17803
|
+
}
|
|
17804
|
+
});
|
|
17805
|
+
if (result.status === 200) {
|
|
17806
|
+
return result.body;
|
|
17807
|
+
}
|
|
17808
|
+
handleError(result, "Failed to fetch network logs");
|
|
17809
|
+
}
|
|
17810
|
+
async function searchLogs(options) {
|
|
17811
|
+
const config = await getClientConfig();
|
|
17812
|
+
const client = initClient8(logsSearchContract, config);
|
|
17813
|
+
const result = await client.searchLogs({
|
|
17814
|
+
query: {
|
|
17815
|
+
keyword: options.keyword,
|
|
17816
|
+
agent: options.agent,
|
|
17817
|
+
runId: options.runId,
|
|
17818
|
+
since: options.since,
|
|
17819
|
+
limit: options.limit,
|
|
17820
|
+
before: options.before,
|
|
17821
|
+
after: options.after
|
|
17822
|
+
}
|
|
17823
|
+
});
|
|
17824
|
+
if (result.status === 200) {
|
|
17825
|
+
return result.body;
|
|
17826
|
+
}
|
|
17827
|
+
handleError(result, "Failed to search logs");
|
|
17828
|
+
}
|
|
17829
|
+
|
|
17830
|
+
// src/lib/api/domains/runs.ts
|
|
17831
|
+
import { initClient as initClient9 } from "@ts-rest/core";
|
|
17747
17832
|
async function createRun(body) {
|
|
17748
17833
|
const config = await getClientConfig();
|
|
17749
|
-
const client =
|
|
17834
|
+
const client = initClient9(runsMainContract, config);
|
|
17750
17835
|
const result = await client.create({ body });
|
|
17751
17836
|
if (result.status === 201) {
|
|
17752
17837
|
return result.body;
|
|
@@ -17755,7 +17840,7 @@ async function createRun(body) {
|
|
|
17755
17840
|
}
|
|
17756
17841
|
async function getEvents(runId, options) {
|
|
17757
17842
|
const config = await getClientConfig();
|
|
17758
|
-
const client =
|
|
17843
|
+
const client = initClient9(runEventsContract, config);
|
|
17759
17844
|
const result = await client.getEvents({
|
|
17760
17845
|
params: { id: runId },
|
|
17761
17846
|
query: {
|
|
@@ -17770,7 +17855,7 @@ async function getEvents(runId, options) {
|
|
|
17770
17855
|
}
|
|
17771
17856
|
async function listRuns(params) {
|
|
17772
17857
|
const config = await getClientConfig();
|
|
17773
|
-
const client =
|
|
17858
|
+
const client = initClient9(runsMainContract, config);
|
|
17774
17859
|
const result = await client.list({
|
|
17775
17860
|
query: {
|
|
17776
17861
|
status: params?.status,
|
|
@@ -17787,7 +17872,7 @@ async function listRuns(params) {
|
|
|
17787
17872
|
}
|
|
17788
17873
|
async function getRunQueue() {
|
|
17789
17874
|
const config = await getClientConfig();
|
|
17790
|
-
const client =
|
|
17875
|
+
const client = initClient9(runsQueueContract, config);
|
|
17791
17876
|
const result = await client.getQueue({ headers: {} });
|
|
17792
17877
|
if (result.status === 200) {
|
|
17793
17878
|
return result.body;
|
|
@@ -17796,7 +17881,7 @@ async function getRunQueue() {
|
|
|
17796
17881
|
}
|
|
17797
17882
|
async function cancelRun(runId) {
|
|
17798
17883
|
const config = await getClientConfig();
|
|
17799
|
-
const client =
|
|
17884
|
+
const client = initClient9(runsCancelContract, config);
|
|
17800
17885
|
const result = await client.cancel({
|
|
17801
17886
|
params: { id: runId }
|
|
17802
17887
|
});
|
|
@@ -17807,10 +17892,10 @@ async function cancelRun(runId) {
|
|
|
17807
17892
|
}
|
|
17808
17893
|
|
|
17809
17894
|
// src/lib/api/domains/sessions.ts
|
|
17810
|
-
import { initClient as
|
|
17895
|
+
import { initClient as initClient10 } from "@ts-rest/core";
|
|
17811
17896
|
async function getSession(sessionId) {
|
|
17812
17897
|
const config = await getClientConfig();
|
|
17813
|
-
const client =
|
|
17898
|
+
const client = initClient10(sessionsByIdContract, config);
|
|
17814
17899
|
const result = await client.getById({
|
|
17815
17900
|
params: { id: sessionId }
|
|
17816
17901
|
});
|
|
@@ -17823,7 +17908,7 @@ async function getSession(sessionId) {
|
|
|
17823
17908
|
}
|
|
17824
17909
|
async function getCheckpoint(checkpointId) {
|
|
17825
17910
|
const config = await getClientConfig();
|
|
17826
|
-
const client =
|
|
17911
|
+
const client = initClient10(checkpointsByIdContract, config);
|
|
17827
17912
|
const result = await client.getById({
|
|
17828
17913
|
params: { id: checkpointId }
|
|
17829
17914
|
});
|
|
@@ -17834,10 +17919,10 @@ async function getCheckpoint(checkpointId) {
|
|
|
17834
17919
|
}
|
|
17835
17920
|
|
|
17836
17921
|
// src/lib/api/domains/storages.ts
|
|
17837
|
-
import { initClient as
|
|
17922
|
+
import { initClient as initClient11 } from "@ts-rest/core";
|
|
17838
17923
|
async function prepareStorage(body) {
|
|
17839
17924
|
const config = await getClientConfig();
|
|
17840
|
-
const client =
|
|
17925
|
+
const client = initClient11(storagesPrepareContract, config);
|
|
17841
17926
|
const result = await client.prepare({ body });
|
|
17842
17927
|
if (result.status === 200) {
|
|
17843
17928
|
return result.body;
|
|
@@ -17846,7 +17931,7 @@ async function prepareStorage(body) {
|
|
|
17846
17931
|
}
|
|
17847
17932
|
async function commitStorage(body) {
|
|
17848
17933
|
const config = await getClientConfig();
|
|
17849
|
-
const client =
|
|
17934
|
+
const client = initClient11(storagesCommitContract, config);
|
|
17850
17935
|
const result = await client.commit({ body });
|
|
17851
17936
|
if (result.status === 200) {
|
|
17852
17937
|
return result.body;
|
|
@@ -17855,7 +17940,7 @@ async function commitStorage(body) {
|
|
|
17855
17940
|
}
|
|
17856
17941
|
async function getStorageDownload(query) {
|
|
17857
17942
|
const config = await getClientConfig();
|
|
17858
|
-
const client =
|
|
17943
|
+
const client = initClient11(storagesDownloadContract, config);
|
|
17859
17944
|
const result = await client.download({
|
|
17860
17945
|
query: {
|
|
17861
17946
|
name: query.name,
|
|
@@ -17870,7 +17955,7 @@ async function getStorageDownload(query) {
|
|
|
17870
17955
|
}
|
|
17871
17956
|
async function listStorages(query) {
|
|
17872
17957
|
const config = await getClientConfig();
|
|
17873
|
-
const client =
|
|
17958
|
+
const client = initClient11(storagesListContract, config);
|
|
17874
17959
|
const result = await client.list({ query });
|
|
17875
17960
|
if (result.status === 200) {
|
|
17876
17961
|
return result.body;
|
|
@@ -17879,10 +17964,10 @@ async function listStorages(query) {
|
|
|
17879
17964
|
}
|
|
17880
17965
|
|
|
17881
17966
|
// src/lib/api/domains/zero-org-secrets.ts
|
|
17882
|
-
import { initClient as
|
|
17967
|
+
import { initClient as initClient12 } from "@ts-rest/core";
|
|
17883
17968
|
async function listZeroOrgSecrets() {
|
|
17884
17969
|
const config = await getClientConfig();
|
|
17885
|
-
const client =
|
|
17970
|
+
const client = initClient12(zeroSecretsContract, config);
|
|
17886
17971
|
const result = await client.list({ headers: {} });
|
|
17887
17972
|
if (result.status === 200) {
|
|
17888
17973
|
return result.body;
|
|
@@ -17891,7 +17976,7 @@ async function listZeroOrgSecrets() {
|
|
|
17891
17976
|
}
|
|
17892
17977
|
async function setZeroOrgSecret(body) {
|
|
17893
17978
|
const config = await getClientConfig();
|
|
17894
|
-
const client =
|
|
17979
|
+
const client = initClient12(zeroSecretsContract, config);
|
|
17895
17980
|
const result = await client.set({ body });
|
|
17896
17981
|
if (result.status === 200 || result.status === 201) {
|
|
17897
17982
|
return result.body;
|
|
@@ -17900,7 +17985,7 @@ async function setZeroOrgSecret(body) {
|
|
|
17900
17985
|
}
|
|
17901
17986
|
async function deleteZeroOrgSecret(name) {
|
|
17902
17987
|
const config = await getClientConfig();
|
|
17903
|
-
const client =
|
|
17988
|
+
const client = initClient12(zeroSecretsByNameContract, config);
|
|
17904
17989
|
const result = await client.delete({
|
|
17905
17990
|
params: { name }
|
|
17906
17991
|
});
|
|
@@ -17911,10 +17996,10 @@ async function deleteZeroOrgSecret(name) {
|
|
|
17911
17996
|
}
|
|
17912
17997
|
|
|
17913
17998
|
// src/lib/api/domains/zero-org-variables.ts
|
|
17914
|
-
import { initClient as
|
|
17999
|
+
import { initClient as initClient13 } from "@ts-rest/core";
|
|
17915
18000
|
async function listZeroOrgVariables() {
|
|
17916
18001
|
const config = await getClientConfig();
|
|
17917
|
-
const client =
|
|
18002
|
+
const client = initClient13(zeroVariablesContract, config);
|
|
17918
18003
|
const result = await client.list({ headers: {} });
|
|
17919
18004
|
if (result.status === 200) {
|
|
17920
18005
|
return result.body;
|
|
@@ -17923,7 +18008,7 @@ async function listZeroOrgVariables() {
|
|
|
17923
18008
|
}
|
|
17924
18009
|
async function setZeroOrgVariable(body) {
|
|
17925
18010
|
const config = await getClientConfig();
|
|
17926
|
-
const client =
|
|
18011
|
+
const client = initClient13(zeroVariablesContract, config);
|
|
17927
18012
|
const result = await client.set({ body });
|
|
17928
18013
|
if (result.status === 200 || result.status === 201) {
|
|
17929
18014
|
return result.body;
|
|
@@ -17932,7 +18017,7 @@ async function setZeroOrgVariable(body) {
|
|
|
17932
18017
|
}
|
|
17933
18018
|
async function deleteZeroOrgVariable(name) {
|
|
17934
18019
|
const config = await getClientConfig();
|
|
17935
|
-
const client =
|
|
18020
|
+
const client = initClient13(zeroVariablesByNameContract, config);
|
|
17936
18021
|
const result = await client.delete({
|
|
17937
18022
|
params: { name }
|
|
17938
18023
|
});
|
|
@@ -17943,10 +18028,10 @@ async function deleteZeroOrgVariable(name) {
|
|
|
17943
18028
|
}
|
|
17944
18029
|
|
|
17945
18030
|
// src/lib/api/domains/zero-org-model-providers.ts
|
|
17946
|
-
import { initClient as
|
|
18031
|
+
import { initClient as initClient14 } from "@ts-rest/core";
|
|
17947
18032
|
async function listZeroOrgModelProviders() {
|
|
17948
18033
|
const config = await getClientConfig();
|
|
17949
|
-
const client =
|
|
18034
|
+
const client = initClient14(zeroModelProvidersMainContract, config);
|
|
17950
18035
|
const result = await client.list({ headers: {} });
|
|
17951
18036
|
if (result.status === 200) {
|
|
17952
18037
|
return result.body;
|
|
@@ -17955,7 +18040,7 @@ async function listZeroOrgModelProviders() {
|
|
|
17955
18040
|
}
|
|
17956
18041
|
async function upsertZeroOrgModelProvider(body) {
|
|
17957
18042
|
const config = await getClientConfig();
|
|
17958
|
-
const client =
|
|
18043
|
+
const client = initClient14(zeroModelProvidersMainContract, config);
|
|
17959
18044
|
const result = await client.upsert({ body });
|
|
17960
18045
|
if (result.status === 200 || result.status === 201) {
|
|
17961
18046
|
return result.body;
|
|
@@ -17964,7 +18049,7 @@ async function upsertZeroOrgModelProvider(body) {
|
|
|
17964
18049
|
}
|
|
17965
18050
|
async function deleteZeroOrgModelProvider(type) {
|
|
17966
18051
|
const config = await getClientConfig();
|
|
17967
|
-
const client =
|
|
18052
|
+
const client = initClient14(zeroModelProvidersByTypeContract, config);
|
|
17968
18053
|
const result = await client.delete({
|
|
17969
18054
|
params: { type }
|
|
17970
18055
|
});
|
|
@@ -17975,7 +18060,7 @@ async function deleteZeroOrgModelProvider(type) {
|
|
|
17975
18060
|
}
|
|
17976
18061
|
async function setZeroOrgModelProviderDefault(type) {
|
|
17977
18062
|
const config = await getClientConfig();
|
|
17978
|
-
const client =
|
|
18063
|
+
const client = initClient14(zeroModelProvidersDefaultContract, config);
|
|
17979
18064
|
const result = await client.setDefault({
|
|
17980
18065
|
params: { type }
|
|
17981
18066
|
});
|
|
@@ -17986,7 +18071,7 @@ async function setZeroOrgModelProviderDefault(type) {
|
|
|
17986
18071
|
}
|
|
17987
18072
|
async function updateZeroOrgModelProviderModel(type, selectedModel) {
|
|
17988
18073
|
const config = await getClientConfig();
|
|
17989
|
-
const client =
|
|
18074
|
+
const client = initClient14(zeroModelProvidersUpdateModelContract, config);
|
|
17990
18075
|
const result = await client.updateModel({
|
|
17991
18076
|
params: { type },
|
|
17992
18077
|
body: { selectedModel }
|
|
@@ -17998,52 +18083,52 @@ async function updateZeroOrgModelProviderModel(type, selectedModel) {
|
|
|
17998
18083
|
}
|
|
17999
18084
|
|
|
18000
18085
|
// src/lib/api/domains/zero-agents.ts
|
|
18001
|
-
import { initClient as
|
|
18086
|
+
import { initClient as initClient15 } from "@ts-rest/core";
|
|
18002
18087
|
async function createZeroAgent(body) {
|
|
18003
18088
|
const config = await getClientConfig();
|
|
18004
|
-
const client =
|
|
18089
|
+
const client = initClient15(zeroAgentsMainContract, config);
|
|
18005
18090
|
const result = await client.create({ body });
|
|
18006
18091
|
if (result.status === 201) return result.body;
|
|
18007
18092
|
handleError(result, "Failed to create zero agent");
|
|
18008
18093
|
}
|
|
18009
18094
|
async function listZeroAgents() {
|
|
18010
18095
|
const config = await getClientConfig();
|
|
18011
|
-
const client =
|
|
18096
|
+
const client = initClient15(zeroAgentsMainContract, config);
|
|
18012
18097
|
const result = await client.list({ headers: {} });
|
|
18013
18098
|
if (result.status === 200) return result.body;
|
|
18014
18099
|
handleError(result, "Failed to list zero agents");
|
|
18015
18100
|
}
|
|
18016
18101
|
async function getZeroAgent(id) {
|
|
18017
18102
|
const config = await getClientConfig();
|
|
18018
|
-
const client =
|
|
18103
|
+
const client = initClient15(zeroAgentsByIdContract, config);
|
|
18019
18104
|
const result = await client.get({ params: { id } });
|
|
18020
18105
|
if (result.status === 200) return result.body;
|
|
18021
18106
|
handleError(result, `Zero agent "${id}" not found`);
|
|
18022
18107
|
}
|
|
18023
18108
|
async function updateZeroAgent(id, body) {
|
|
18024
18109
|
const config = await getClientConfig();
|
|
18025
|
-
const client =
|
|
18110
|
+
const client = initClient15(zeroAgentsByIdContract, config);
|
|
18026
18111
|
const result = await client.update({ params: { id }, body });
|
|
18027
18112
|
if (result.status === 200) return result.body;
|
|
18028
18113
|
handleError(result, `Failed to update zero agent "${id}"`);
|
|
18029
18114
|
}
|
|
18030
18115
|
async function deleteZeroAgent(id) {
|
|
18031
18116
|
const config = await getClientConfig();
|
|
18032
|
-
const client =
|
|
18117
|
+
const client = initClient15(zeroAgentsByIdContract, config);
|
|
18033
18118
|
const result = await client.delete({ params: { id } });
|
|
18034
18119
|
if (result.status === 204) return;
|
|
18035
18120
|
handleError(result, `Zero agent "${id}" not found`);
|
|
18036
18121
|
}
|
|
18037
18122
|
async function getZeroAgentInstructions(id) {
|
|
18038
18123
|
const config = await getClientConfig();
|
|
18039
|
-
const client =
|
|
18124
|
+
const client = initClient15(zeroAgentInstructionsContract, config);
|
|
18040
18125
|
const result = await client.get({ params: { id } });
|
|
18041
18126
|
if (result.status === 200) return result.body;
|
|
18042
18127
|
handleError(result, `Failed to get instructions for zero agent "${id}"`);
|
|
18043
18128
|
}
|
|
18044
18129
|
async function updateZeroAgentInstructions(id, content) {
|
|
18045
18130
|
const config = await getClientConfig();
|
|
18046
|
-
const client =
|
|
18131
|
+
const client = initClient15(zeroAgentInstructionsContract, config);
|
|
18047
18132
|
const result = await client.update({
|
|
18048
18133
|
params: { id },
|
|
18049
18134
|
body: { content }
|
|
@@ -18053,10 +18138,10 @@ async function updateZeroAgentInstructions(id, content) {
|
|
|
18053
18138
|
}
|
|
18054
18139
|
|
|
18055
18140
|
// src/lib/api/domains/integrations-slack.ts
|
|
18056
|
-
import { initClient as
|
|
18141
|
+
import { initClient as initClient16 } from "@ts-rest/core";
|
|
18057
18142
|
async function sendSlackMessage(body) {
|
|
18058
18143
|
const config = await getClientConfig();
|
|
18059
|
-
const client =
|
|
18144
|
+
const client = initClient16(integrationsSlackMessageContract, config);
|
|
18060
18145
|
const result = await client.sendMessage({ body, headers: {} });
|
|
18061
18146
|
if (result.status === 200) {
|
|
18062
18147
|
return result.body;
|
|
@@ -18065,10 +18150,10 @@ async function sendSlackMessage(body) {
|
|
|
18065
18150
|
}
|
|
18066
18151
|
|
|
18067
18152
|
// src/lib/api/domains/zero-schedules.ts
|
|
18068
|
-
import { initClient as
|
|
18153
|
+
import { initClient as initClient17 } from "@ts-rest/core";
|
|
18069
18154
|
async function deployZeroSchedule(body) {
|
|
18070
18155
|
const config = await getClientConfig();
|
|
18071
|
-
const client =
|
|
18156
|
+
const client = initClient17(zeroSchedulesMainContract, config);
|
|
18072
18157
|
const result = await client.deploy({ body });
|
|
18073
18158
|
if (result.status === 200 || result.status === 201) {
|
|
18074
18159
|
return result.body;
|
|
@@ -18077,7 +18162,7 @@ async function deployZeroSchedule(body) {
|
|
|
18077
18162
|
}
|
|
18078
18163
|
async function listZeroSchedules() {
|
|
18079
18164
|
const config = await getClientConfig();
|
|
18080
|
-
const client =
|
|
18165
|
+
const client = initClient17(zeroSchedulesMainContract, config);
|
|
18081
18166
|
const result = await client.list({ headers: {} });
|
|
18082
18167
|
if (result.status === 200) {
|
|
18083
18168
|
return result.body;
|
|
@@ -18086,7 +18171,7 @@ async function listZeroSchedules() {
|
|
|
18086
18171
|
}
|
|
18087
18172
|
async function deleteZeroSchedule(params) {
|
|
18088
18173
|
const config = await getClientConfig();
|
|
18089
|
-
const client =
|
|
18174
|
+
const client = initClient17(zeroSchedulesByNameContract, config);
|
|
18090
18175
|
const result = await client.delete({
|
|
18091
18176
|
params: { name: params.name },
|
|
18092
18177
|
query: { agentId: params.agentId }
|
|
@@ -18098,7 +18183,7 @@ async function deleteZeroSchedule(params) {
|
|
|
18098
18183
|
}
|
|
18099
18184
|
async function enableZeroSchedule(params) {
|
|
18100
18185
|
const config = await getClientConfig();
|
|
18101
|
-
const client =
|
|
18186
|
+
const client = initClient17(zeroSchedulesEnableContract, config);
|
|
18102
18187
|
const result = await client.enable({
|
|
18103
18188
|
params: { name: params.name },
|
|
18104
18189
|
body: { agentId: params.agentId }
|
|
@@ -18110,7 +18195,7 @@ async function enableZeroSchedule(params) {
|
|
|
18110
18195
|
}
|
|
18111
18196
|
async function disableZeroSchedule(params) {
|
|
18112
18197
|
const config = await getClientConfig();
|
|
18113
|
-
const client =
|
|
18198
|
+
const client = initClient17(zeroSchedulesEnableContract, config);
|
|
18114
18199
|
const result = await client.disable({
|
|
18115
18200
|
params: { name: params.name },
|
|
18116
18201
|
body: { agentId: params.agentId }
|
|
@@ -18246,11 +18331,6 @@ export {
|
|
|
18246
18331
|
volumeConfigSchema,
|
|
18247
18332
|
agentDefinitionSchema,
|
|
18248
18333
|
ALL_RUN_STATUSES,
|
|
18249
|
-
runSystemLogContract,
|
|
18250
|
-
runMetricsContract,
|
|
18251
|
-
runAgentEventsContract,
|
|
18252
|
-
runNetworkLogsContract,
|
|
18253
|
-
logsSearchContract,
|
|
18254
18334
|
MODEL_PROVIDER_TYPES,
|
|
18255
18335
|
getSelectableProviderTypes,
|
|
18256
18336
|
hasAuthMethods,
|
|
@@ -18280,8 +18360,6 @@ export {
|
|
|
18280
18360
|
parseSkillFrontmatter,
|
|
18281
18361
|
ApiRequestError,
|
|
18282
18362
|
getBaseUrl,
|
|
18283
|
-
getClientConfig,
|
|
18284
|
-
handleError,
|
|
18285
18363
|
withErrorHandler,
|
|
18286
18364
|
getComposeByName,
|
|
18287
18365
|
getComposeById,
|
|
@@ -18348,10 +18426,15 @@ export {
|
|
|
18348
18426
|
enableZeroSchedule,
|
|
18349
18427
|
disableZeroSchedule,
|
|
18350
18428
|
resolveZeroScheduleByAgent,
|
|
18429
|
+
getSystemLog,
|
|
18430
|
+
getMetrics,
|
|
18431
|
+
getAgentEvents,
|
|
18432
|
+
getNetworkLogs,
|
|
18433
|
+
searchLogs,
|
|
18351
18434
|
isInteractive,
|
|
18352
18435
|
promptText,
|
|
18353
18436
|
promptConfirm,
|
|
18354
18437
|
promptSelect,
|
|
18355
18438
|
promptPassword
|
|
18356
18439
|
};
|
|
18357
|
-
//# sourceMappingURL=chunk-
|
|
18440
|
+
//# sourceMappingURL=chunk-5BLBSO2W.js.map
|