@omnara/sdk 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.js +2 -2
- package/dist/{chunk-XCEDZOJZ.js → chunk-6LZMFDIZ.js} +922 -2
- package/dist/chunk-6LZMFDIZ.js.map +1 -0
- package/dist/{chunk-TMPF6DRL.js → chunk-CWB3KJI5.js} +17 -3
- package/dist/chunk-CWB3KJI5.js.map +1 -0
- package/dist/{chunk-MEKAERT2.js → chunk-XQBAIV43.js} +78 -7
- package/dist/chunk-XQBAIV43.js.map +1 -0
- package/dist/index.d.ts +11 -4
- package/dist/index.js +26 -5
- package/dist/index.js.map +1 -1
- package/dist/{sdk.gen-BTusIHxi.d.ts → sdk.gen-CN_lzVIk.d.ts} +483 -5
- package/dist/tanstack.d.ts +100 -6
- package/dist/tanstack.js +93 -5
- package/dist/tanstack.js.map +1 -1
- package/dist/zod.d.ts +2 -12607
- package/dist/zod.gen-DVudJxD1.d.ts +13779 -0
- package/dist/zod.js +61 -2
- package/package.json +1 -1
- package/dist/chunk-MEKAERT2.js.map +0 -1
- package/dist/chunk-PZ5AY32C.js +0 -10
- package/dist/chunk-PZ5AY32C.js.map +0 -1
- package/dist/chunk-TMPF6DRL.js.map +0 -1
- package/dist/chunk-XCEDZOJZ.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/errors.ts"],"sourcesContent":["import * as z from 'zod'\n\nimport type { AgentConfigErrorIssue, Error as ApiErrorBody } from './generated/types.gen'\nimport { zAgentConfigErrorIssue } from './generated/zod.gen'\n\nexport type ApiErrorCode = ApiErrorBody['code']\n\nconst errorIssuesSchema = z.object({ issues: z.array(zAgentConfigErrorIssue).optional() })\n\nfunction issuesFromBody(body: unknown): AgentConfigErrorIssue[] {\n const parsed = errorIssuesSchema.safeParse(body)\n return parsed.success ? (parsed.data.issues ?? []) : []\n}\n\nexport class ApiError extends Error {\n readonly status: number\n readonly code: ApiErrorCode | undefined\n readonly body: unknown\n readonly issues: AgentConfigErrorIssue[]\n\n constructor(status: number, message: string, code?: ApiErrorCode, body?: unknown) {\n super(message)\n this.name = 'ApiError'\n this.status = status\n this.code = code\n this.body = body\n this.issues = issuesFromBody(body)\n }\n\n static async fromResponse(response: Response): Promise<ApiError> {\n let message = `request failed with status ${response.status}`\n let code: ApiErrorCode | undefined\n let data: unknown\n try {\n data = await response.clone().json()\n } catch {\n data = undefined\n }\n if (data && typeof data === 'object') {\n if ('error' in data && typeof data.error === 'string') {\n message = data.error\n }\n if ('code' in data && typeof data.code === 'string') {\n code = data.code as ApiErrorCode\n }\n }\n return new ApiError(response.status, message, code, data)\n }\n}\n"],"mappings":";;;;;AAAA,YAAY,OAAO;AAOnB,IAAM,oBAAsB,SAAO,EAAE,QAAU,QAAM,sBAAsB,EAAE,SAAS,EAAE,CAAC;AAEzF,SAAS,eAAe,MAAwC;AAC9D,QAAM,SAAS,kBAAkB,UAAU,IAAI;AAC/C,SAAO,OAAO,UAAW,OAAO,KAAK,UAAU,CAAC,IAAK,CAAC;AACxD;AAEO,IAAM,WAAN,MAAM,kBAAiB,MAAM;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAET,YAAY,QAAgB,SAAiB,MAAqB,MAAgB;AAChF,UAAM,OAAO;AACb,SAAK,OAAO;AACZ,SAAK,SAAS;AACd,SAAK,OAAO;AACZ,SAAK,OAAO;AACZ,SAAK,SAAS,eAAe,IAAI;AAAA,EACnC;AAAA,EAEA,aAAa,aAAa,UAAuC;AAC/D,QAAI,UAAU,8BAA8B,SAAS,MAAM;AAC3D,QAAI;AACJ,QAAI;AACJ,QAAI;AACF,aAAO,MAAM,SAAS,MAAM,EAAE,KAAK;AAAA,IACrC,QAAQ;AACN,aAAO;AAAA,IACT;AACA,QAAI,QAAQ,OAAO,SAAS,UAAU;AACpC,UAAI,WAAW,QAAQ,OAAO,KAAK,UAAU,UAAU;AACrD,kBAAU,KAAK;AAAA,MACjB;AACA,UAAI,UAAU,QAAQ,OAAO,KAAK,SAAS,UAAU;AACnD,eAAO,KAAK;AAAA,MACd;AAAA,IACF;AACA,WAAO,IAAI,UAAS,SAAS,QAAQ,SAAS,MAAM,IAAI;AAAA,EAC1D;AACF;","names":[]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
__export,
|
|
2
3
|
zAcceptInvitationResponse,
|
|
3
4
|
zArchiveAgentResponse,
|
|
4
5
|
zBootstrapDaemonResponse2,
|
|
@@ -50,6 +51,7 @@ import {
|
|
|
50
51
|
zDeleteSkillGrantResponse,
|
|
51
52
|
zDeleteSkillResponse,
|
|
52
53
|
zDemoteSteeringInputToQueuedResponse,
|
|
54
|
+
zDownloadDaemonArtifactResponse,
|
|
53
55
|
zEndMachineDaemonRuntimeResponse,
|
|
54
56
|
zGetActorResponse,
|
|
55
57
|
zGetAgentConfigResponse,
|
|
@@ -81,6 +83,8 @@ import {
|
|
|
81
83
|
zListEventsResponse,
|
|
82
84
|
zListIntegrationInstallsResponse2,
|
|
83
85
|
zListMachinePoolsResponse2,
|
|
86
|
+
zListMcpServerToolsResponse,
|
|
87
|
+
zListMcpServersResponse2,
|
|
84
88
|
zListMemberProjectAccessResponse,
|
|
85
89
|
zListModelProviderConfigsResponse,
|
|
86
90
|
zListOrgApiKeyProjectAccessResponse,
|
|
@@ -135,11 +139,9 @@ import {
|
|
|
135
139
|
zUpdateOrgMemberResponse,
|
|
136
140
|
zUpdateProjectMachinePoolGrantResponse,
|
|
137
141
|
zUpdateProjectModelGrantResponse,
|
|
138
|
-
zUpdateSecretResponse
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
__export
|
|
142
|
-
} from "./chunk-PZ5AY32C.js";
|
|
142
|
+
zUpdateSecretResponse,
|
|
143
|
+
zUploadDaemonArtifactResponse
|
|
144
|
+
} from "./chunk-6LZMFDIZ.js";
|
|
143
145
|
|
|
144
146
|
// src/generated/core/bodySerializer.gen.ts
|
|
145
147
|
var serializeFormDataPair = (data, key, value) => {
|
|
@@ -1008,6 +1010,7 @@ __export(sdk_gen_exports, {
|
|
|
1008
1010
|
deleteSkill: () => deleteSkill,
|
|
1009
1011
|
deleteSkillGrant: () => deleteSkillGrant,
|
|
1010
1012
|
demoteSteeringInputToQueued: () => demoteSteeringInputToQueued,
|
|
1013
|
+
downloadDaemonArtifact: () => downloadDaemonArtifact,
|
|
1011
1014
|
endMachineDaemonRuntime: () => endMachineDaemonRuntime,
|
|
1012
1015
|
getActor: () => getActor,
|
|
1013
1016
|
getAgent: () => getAgent,
|
|
@@ -1039,6 +1042,8 @@ __export(sdk_gen_exports, {
|
|
|
1039
1042
|
listEvents: () => listEvents,
|
|
1040
1043
|
listIntegrationInstalls: () => listIntegrationInstalls,
|
|
1041
1044
|
listMachinePools: () => listMachinePools,
|
|
1045
|
+
listMcpServerTools: () => listMcpServerTools,
|
|
1046
|
+
listMcpServers: () => listMcpServers,
|
|
1042
1047
|
listMemberProjectAccess: () => listMemberProjectAccess,
|
|
1043
1048
|
listModelProviderConfigs: () => listModelProviderConfigs,
|
|
1044
1049
|
listOrgApiKeyProjectAccess: () => listOrgApiKeyProjectAccess,
|
|
@@ -1094,7 +1099,8 @@ __export(sdk_gen_exports, {
|
|
|
1094
1099
|
updateOrgMember: () => updateOrgMember,
|
|
1095
1100
|
updateProjectMachinePoolGrant: () => updateProjectMachinePoolGrant,
|
|
1096
1101
|
updateProjectModelGrant: () => updateProjectModelGrant,
|
|
1097
|
-
updateSecret: () => updateSecret
|
|
1102
|
+
updateSecret: () => updateSecret,
|
|
1103
|
+
uploadDaemonArtifact: () => uploadDaemonArtifact
|
|
1098
1104
|
});
|
|
1099
1105
|
|
|
1100
1106
|
// src/validate-response.ts
|
|
@@ -2056,6 +2062,42 @@ var getToolCatalog = (options) => (options?.client ?? client).get({
|
|
|
2056
2062
|
url: "/api/v1/tool-catalog",
|
|
2057
2063
|
...options
|
|
2058
2064
|
});
|
|
2065
|
+
var listMcpServers = (options) => (options?.client ?? client).get({
|
|
2066
|
+
responseValidator: async (data) => await validateResponse(zListMcpServersResponse2, data),
|
|
2067
|
+
security: [{
|
|
2068
|
+
key: "bearerAuth",
|
|
2069
|
+
scheme: "bearer",
|
|
2070
|
+
type: "http"
|
|
2071
|
+
}, {
|
|
2072
|
+
in: "cookie",
|
|
2073
|
+
name: "__Host-omnara_session",
|
|
2074
|
+
type: "apiKey"
|
|
2075
|
+
}],
|
|
2076
|
+
url: "/api/v1/mcp-servers",
|
|
2077
|
+
...options
|
|
2078
|
+
});
|
|
2079
|
+
var listMcpServerTools = (options) => (options.client ?? client).post({
|
|
2080
|
+
responseValidator: async (data) => await validateResponse(zListMcpServerToolsResponse, data),
|
|
2081
|
+
security: [
|
|
2082
|
+
{
|
|
2083
|
+
key: "bearerAuth",
|
|
2084
|
+
scheme: "bearer",
|
|
2085
|
+
type: "http"
|
|
2086
|
+
},
|
|
2087
|
+
{
|
|
2088
|
+
in: "cookie",
|
|
2089
|
+
name: "__Host-omnara_session",
|
|
2090
|
+
type: "apiKey"
|
|
2091
|
+
},
|
|
2092
|
+
{ name: "X-Omnara-Csrf", type: "apiKey" }
|
|
2093
|
+
],
|
|
2094
|
+
url: "/api/v1/orgs/{orgID}/projects/{projectID}/mcp-servers/tools",
|
|
2095
|
+
...options,
|
|
2096
|
+
headers: {
|
|
2097
|
+
"Content-Type": "application/json",
|
|
2098
|
+
...options.headers
|
|
2099
|
+
}
|
|
2100
|
+
});
|
|
2059
2101
|
var getAgentConfig = (options) => (options.client ?? client).get({
|
|
2060
2102
|
responseValidator: async (data) => await validateResponse(zGetAgentConfigResponse, data),
|
|
2061
2103
|
security: [{
|
|
@@ -3501,6 +3543,31 @@ var getDaemonSkillArchive = (options) => (options.client ?? client).get({
|
|
|
3501
3543
|
url: "/api/v1/daemon/skills/{skillID}/archive",
|
|
3502
3544
|
...options
|
|
3503
3545
|
});
|
|
3546
|
+
var uploadDaemonArtifact = (options) => (options.client ?? client).post({
|
|
3547
|
+
bodySerializer: null,
|
|
3548
|
+
responseValidator: async (data) => await validateResponse(zUploadDaemonArtifactResponse, data),
|
|
3549
|
+
security: [{
|
|
3550
|
+
key: "machineDaemonAuth",
|
|
3551
|
+
scheme: "bearer",
|
|
3552
|
+
type: "http"
|
|
3553
|
+
}],
|
|
3554
|
+
url: "/api/v1/daemon/tool-calls/{toolCallID}/artifact",
|
|
3555
|
+
...options,
|
|
3556
|
+
headers: {
|
|
3557
|
+
"Content-Type": "application/octet-stream",
|
|
3558
|
+
...options.headers
|
|
3559
|
+
}
|
|
3560
|
+
});
|
|
3561
|
+
var downloadDaemonArtifact = (options) => (options.client ?? client).get({
|
|
3562
|
+
responseValidator: async (data) => await validateResponse(zDownloadDaemonArtifactResponse, data),
|
|
3563
|
+
security: [{
|
|
3564
|
+
key: "machineDaemonAuth",
|
|
3565
|
+
scheme: "bearer",
|
|
3566
|
+
type: "http"
|
|
3567
|
+
}],
|
|
3568
|
+
url: "/api/v1/daemon/tool-calls/{toolCallID}/artifacts/{artifactID}/content",
|
|
3569
|
+
...options
|
|
3570
|
+
});
|
|
3504
3571
|
|
|
3505
3572
|
export {
|
|
3506
3573
|
createConfig,
|
|
@@ -3562,6 +3629,8 @@ export {
|
|
|
3562
3629
|
deleteIntegrationInstall,
|
|
3563
3630
|
createAgentConfig,
|
|
3564
3631
|
getToolCatalog,
|
|
3632
|
+
listMcpServers,
|
|
3633
|
+
listMcpServerTools,
|
|
3565
3634
|
getAgentConfig,
|
|
3566
3635
|
listAgentProfiles,
|
|
3567
3636
|
createAgentProfile,
|
|
@@ -3645,6 +3714,8 @@ export {
|
|
|
3645
3714
|
endMachineDaemonRuntime,
|
|
3646
3715
|
sleepMachineDaemonRuntime,
|
|
3647
3716
|
getDaemonSkillArchive,
|
|
3717
|
+
uploadDaemonArtifact,
|
|
3718
|
+
downloadDaemonArtifact,
|
|
3648
3719
|
sdk_gen_exports
|
|
3649
3720
|
};
|
|
3650
|
-
//# sourceMappingURL=chunk-
|
|
3721
|
+
//# sourceMappingURL=chunk-XQBAIV43.js.map
|