@dremio/js-sdk 0.50.0 → 0.52.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.
@@ -16,6 +16,7 @@
16
16
  const prodLikePattern = /^([^.]+)(\.(?:(?:eu\.)?dremio\.cloud|[^.]+\.dremio\.site))$/;
17
17
  const privateLinkPattern = /^([^.]+\.)([^.]+)((\.privatelink\.dremio\.cloud)|(\.privatelink\.([^.]+)\.dremio\.site))$/;
18
18
  const daasEnginePattern = /^(dcs-(?:aws|cloud)-\d+-ns\.)([^.]+)(\.drem\.io)$/;
19
+ const daasAzurePattern = /^([^.]+)(\.daas-azure\.drem\.io)$/;
19
20
  const awsInternalPattern = /^([^.]+)(\.([^.]+\.aws\.dremio\.site))$/;
20
21
  /**
21
22
  * @hidden
@@ -31,6 +32,10 @@ export function _replaceOriginResource(origin, resource) {
31
32
  url.hostname = hostname.replace(privateLinkPattern, `$1${resource}$3`);
32
33
  return url.origin;
33
34
  }
35
+ if (daasAzurePattern.test(hostname)) {
36
+ url.hostname = hostname.replace(daasAzurePattern, `${resource}$2`);
37
+ return url.origin;
38
+ }
34
39
  if (daasEnginePattern.test(hostname)) {
35
40
  url.hostname = hostname.replace(daasEnginePattern, `$1${resource}$3`);
36
41
  return url.origin;
@@ -1 +1 @@
1
- {"version":3,"file":"replaceOriginResource.js","sourceRoot":"","sources":["../../src/cloud/replaceOriginResource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,MAAM,eAAe,GAAG,6DAA6D,CAAC;AACtF,MAAM,kBAAkB,GACtB,2FAA2F,CAAC;AAC9F,MAAM,iBAAiB,GAAG,mDAAmD,CAAC;AAC9E,MAAM,kBAAkB,GAAG,yCAAyC,CAAC;AAErE;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,MAAwB,EAAE,QAAgB;IAC/E,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;IAE9B,IAAI,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QACtC,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,kBAAkB,EAAE,GAAG,QAAQ,IAAI,CAAC,CAAC;IACvE,CAAC;IAED,IAAI,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QACtC,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,kBAAkB,EAAE,KAAK,QAAQ,IAAI,CAAC,CAAC;QACvE,OAAO,GAAG,CAAC,MAAM,CAAC;IACpB,CAAC;IAED,IAAI,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QACrC,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,iBAAiB,EAAE,KAAK,QAAQ,IAAI,CAAC,CAAC;QACtE,OAAO,GAAG,CAAC,MAAM,CAAC;IACpB,CAAC;IAED,IAAI,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QACnC,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,eAAe,EAAE,GAAG,QAAQ,IAAI,CAAC,CAAC;QAClE,OAAO,GAAG,CAAC,MAAM,CAAC;IACpB,CAAC;IAED,OAAO,GAAG,CAAC,MAAM,CAAC;AACpB,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Config } from \"../common/Config.ts\";\n\nconst prodLikePattern = /^([^.]+)(\\.(?:(?:eu\\.)?dremio\\.cloud|[^.]+\\.dremio\\.site))$/;\nconst privateLinkPattern =\n /^([^.]+\\.)([^.]+)((\\.privatelink\\.dremio\\.cloud)|(\\.privatelink\\.([^.]+)\\.dremio\\.site))$/;\nconst daasEnginePattern = /^(dcs-(?:aws|cloud)-\\d+-ns\\.)([^.]+)(\\.drem\\.io)$/;\nconst awsInternalPattern = /^([^.]+)(\\.([^.]+\\.aws\\.dremio\\.site))$/;\n\n/**\n * @hidden\n * @internal\n */\nexport function _replaceOriginResource(origin: Config[\"origin\"], resource: string): string {\n const url = new URL(origin);\n const hostname = url.hostname;\n\n if (awsInternalPattern.test(hostname)) {\n url.hostname = hostname.replace(awsInternalPattern, `${resource}$2`);\n }\n\n if (privateLinkPattern.test(hostname)) {\n url.hostname = hostname.replace(privateLinkPattern, `$1${resource}$3`);\n return url.origin;\n }\n\n if (daasEnginePattern.test(hostname)) {\n url.hostname = hostname.replace(daasEnginePattern, `$1${resource}$3`);\n return url.origin;\n }\n\n if (prodLikePattern.test(hostname)) {\n url.hostname = hostname.replace(prodLikePattern, `${resource}$2`);\n return url.origin;\n }\n\n return url.origin;\n}\n"]}
1
+ {"version":3,"file":"replaceOriginResource.js","sourceRoot":"","sources":["../../src/cloud/replaceOriginResource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,MAAM,eAAe,GAAG,6DAA6D,CAAC;AACtF,MAAM,kBAAkB,GACtB,2FAA2F,CAAC;AAC9F,MAAM,iBAAiB,GAAG,mDAAmD,CAAC;AAC9E,MAAM,gBAAgB,GAAG,mCAAmC,CAAC;AAC7D,MAAM,kBAAkB,GAAG,yCAAyC,CAAC;AAErE;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,MAAwB,EAAE,QAAgB;IAC/E,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;IAE9B,IAAI,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QACtC,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,kBAAkB,EAAE,GAAG,QAAQ,IAAI,CAAC,CAAC;IACvE,CAAC;IAED,IAAI,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QACtC,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,kBAAkB,EAAE,KAAK,QAAQ,IAAI,CAAC,CAAC;QACvE,OAAO,GAAG,CAAC,MAAM,CAAC;IACpB,CAAC;IAED,IAAI,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpC,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,gBAAgB,EAAE,GAAG,QAAQ,IAAI,CAAC,CAAC;QACnE,OAAO,GAAG,CAAC,MAAM,CAAC;IACpB,CAAC;IAED,IAAI,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QACrC,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,iBAAiB,EAAE,KAAK,QAAQ,IAAI,CAAC,CAAC;QACtE,OAAO,GAAG,CAAC,MAAM,CAAC;IACpB,CAAC;IAED,IAAI,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QACnC,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,eAAe,EAAE,GAAG,QAAQ,IAAI,CAAC,CAAC;QAClE,OAAO,GAAG,CAAC,MAAM,CAAC;IACpB,CAAC;IAED,OAAO,GAAG,CAAC,MAAM,CAAC;AACpB,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Config } from \"../common/Config.ts\";\n\nconst prodLikePattern = /^([^.]+)(\\.(?:(?:eu\\.)?dremio\\.cloud|[^.]+\\.dremio\\.site))$/;\nconst privateLinkPattern =\n /^([^.]+\\.)([^.]+)((\\.privatelink\\.dremio\\.cloud)|(\\.privatelink\\.([^.]+)\\.dremio\\.site))$/;\nconst daasEnginePattern = /^(dcs-(?:aws|cloud)-\\d+-ns\\.)([^.]+)(\\.drem\\.io)$/;\nconst daasAzurePattern = /^([^.]+)(\\.daas-azure\\.drem\\.io)$/;\nconst awsInternalPattern = /^([^.]+)(\\.([^.]+\\.aws\\.dremio\\.site))$/;\n\n/**\n * @hidden\n * @internal\n */\nexport function _replaceOriginResource(origin: Config[\"origin\"], resource: string): string {\n const url = new URL(origin);\n const hostname = url.hostname;\n\n if (awsInternalPattern.test(hostname)) {\n url.hostname = hostname.replace(awsInternalPattern, `${resource}$2`);\n }\n\n if (privateLinkPattern.test(hostname)) {\n url.hostname = hostname.replace(privateLinkPattern, `$1${resource}$3`);\n return url.origin;\n }\n\n if (daasAzurePattern.test(hostname)) {\n url.hostname = hostname.replace(daasAzurePattern, `${resource}$2`);\n return url.origin;\n }\n\n if (daasEnginePattern.test(hostname)) {\n url.hostname = hostname.replace(daasEnginePattern, `$1${resource}$3`);\n return url.origin;\n }\n\n if (prodLikePattern.test(hostname)) {\n url.hostname = hostname.replace(prodLikePattern, `${resource}$2`);\n return url.origin;\n }\n\n return url.origin;\n}\n"]}
@@ -23,6 +23,7 @@ export declare class UserChatMessage {
23
23
  name: string;
24
24
  }[];
25
25
  } | undefined;
26
+ acceptTaskNames?: string[] | undefined;
26
27
  context?: string | undefined;
27
28
  skillIds?: string[] | undefined;
28
29
  }, "text"> | undefined;
@@ -40,6 +41,7 @@ export declare const createConversationPromptSchema: z.ZodMiniObject<{
40
41
  name: z.ZodMiniString<string>;
41
42
  }, z.core.$strip>>;
42
43
  }, z.core.$strip>>;
44
+ acceptTaskNames: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
43
45
  context: z.ZodMiniOptional<z.ZodMiniString<string>>;
44
46
  skillIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
45
47
  text: z.ZodMiniString<string>;
@@ -53,6 +53,7 @@ export const createConversationPromptSchema = z.strictObject({
53
53
  name: z.string(),
54
54
  })),
55
55
  })),
56
+ acceptTaskNames: z.optional(z.array(z.string())),
56
57
  context: z.optional(z.string()),
57
58
  skillIds: z.optional(z.array(z.string())),
58
59
  text: z.string(),
@@ -1 +1 @@
1
- {"version":3,"file":"UserChatMessage.js","sourceRoot":"","sources":["../../../../src/enterprise/ai/chat/UserChatMessage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,MAAM,OAAO,eAAe;IACjB,SAAS,CAAyB;IAClC,OAAO,CAAS;IAChB,EAAE,CAAS;IACX,MAAM,CAAgE;IAE/E,YACE,EAAyB,EACzB,SAAuC,EACvC,OAAmC,EACnC,MAAkC;QAElC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,UAAU,CAAC,MAAiC;QAC1C,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,OA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\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { nanoid } from \"nanoid/non-secure\";\nimport { Temporal } from \"temporal-polyfill\";\nimport * as z from \"zod/mini\";\n\nexport class UserChatMessage {\n readonly createdAt: Temporal.ZonedDateTime;\n readonly content: string;\n readonly id: string;\n readonly prompt?: Omit<z.infer<typeof createConversationPromptSchema>, \"text\">;\n\n constructor(\n id: UserChatMessage[\"id\"],\n createdAt: UserChatMessage[\"createdAt\"],\n content: UserChatMessage[\"content\"],\n prompt?: UserChatMessage[\"prompt\"],\n ) {\n this.id = id;\n this.createdAt = createdAt;\n this.content = content;\n this.prompt = prompt;\n }\n\n withPrompt(prompt: UserChatMessage[\"prompt\"]) {\n return new UserChatMessage(this.id, this.createdAt, this.content, prompt);\n }\n\n toJSON() {\n return {\n content: this.content,\n createdAt: this.createdAt.toString(),\n id: this.id,\n prompt: this.prompt,\n };\n }\n\n static new(content: UserChatMessage[\"content\"], prompt?: UserChatMessage[\"prompt\"]) {\n return new UserChatMessage(nanoid(), Temporal.Now.zonedDateTimeISO(), content, prompt);\n }\n}\n\nexport const createConversationPromptSchema = z.strictObject({\n approvals: z.optional(\n z.object({\n allToolsAllowed: z.boolean(),\n approvalNonce: z.string(),\n toolDecisions: z.array(\n z.object({\n approved: z.boolean(),\n arguments: z.record(z.string(), z.unknown()),\n executionId: z.string(),\n name: z.string(),\n }),\n ),\n }),\n ),\n context: z.optional(z.string()),\n skillIds: z.optional(z.array(z.string())),\n text: z.string(),\n});\n"]}
1
+ {"version":3,"file":"UserChatMessage.js","sourceRoot":"","sources":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AAC,MAAM,CAAC;QACP,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE;QAC5B,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;QACzB,aAAa,EAAE,CAAC,CAAC,KAAK,CACpB,CAAC,CAAC,MAAM,CAAC;YACP,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;YACrB,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;YAC5C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;YACvB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;SACjB,CAAC,CACH;KACF,CAAC,CACH;IACD,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IAChD,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC/B,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACzC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { nanoid } from \"nanoid/non-secure\";\nimport { Temporal } from \"temporal-polyfill\";\nimport * as z from \"zod/mini\";\n\nexport class UserChatMessage {\n readonly createdAt: Temporal.ZonedDateTime;\n readonly content: string;\n readonly id: string;\n readonly prompt?: Omit<z.infer<typeof createConversationPromptSchema>, \"text\">;\n\n constructor(\n id: UserChatMessage[\"id\"],\n createdAt: UserChatMessage[\"createdAt\"],\n content: UserChatMessage[\"content\"],\n prompt?: UserChatMessage[\"prompt\"],\n ) {\n this.id = id;\n this.createdAt = createdAt;\n this.content = content;\n this.prompt = prompt;\n }\n\n withPrompt(prompt: UserChatMessage[\"prompt\"]) {\n return new UserChatMessage(this.id, this.createdAt, this.content, prompt);\n }\n\n toJSON() {\n return {\n content: this.content,\n createdAt: this.createdAt.toString(),\n id: this.id,\n prompt: this.prompt,\n };\n }\n\n static new(content: UserChatMessage[\"content\"], prompt?: UserChatMessage[\"prompt\"]) {\n return new UserChatMessage(nanoid(), Temporal.Now.zonedDateTimeISO(), content, prompt);\n }\n}\n\nexport const createConversationPromptSchema = z.strictObject({\n approvals: z.optional(\n z.object({\n allToolsAllowed: z.boolean(),\n approvalNonce: z.string(),\n toolDecisions: z.array(\n z.object({\n approved: z.boolean(),\n arguments: z.record(z.string(), z.unknown()),\n executionId: z.string(),\n name: z.string(),\n }),\n ),\n }),\n ),\n acceptTaskNames: z.optional(z.array(z.string())),\n context: z.optional(z.string()),\n skillIds: z.optional(z.array(z.string())),\n text: z.string(),\n});\n"]}
@@ -29,6 +29,7 @@ export declare const createConversationCodec: z.ZodMiniCodec<z.ZodMiniObject<{
29
29
  name: z.ZodMiniString<string>;
30
30
  }, z.core.$strip>>;
31
31
  }, z.core.$strip>>;
32
+ acceptTaskNames: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
32
33
  context: z.ZodMiniOptional<z.ZodMiniString<string>>;
33
34
  skillIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
34
35
  text: z.ZodMiniString<string>;
@@ -45,6 +45,7 @@ export const createConversationCodec = z.codec(createConversationInSchema, z.ext
45
45
  modelName: v.modelName,
46
46
  modelProviderId: v.modelProviderId,
47
47
  prompt: {
48
+ acceptTaskNames: v.message.prompt?.acceptTaskNames,
48
49
  approvals: v.message.prompt?.approvals,
49
50
  context: v.message.prompt?.context,
50
51
  skillIds: v.message.prompt?.skillIds,
@@ -55,6 +56,7 @@ export const createConversationCodec = z.codec(createConversationInSchema, z.ext
55
56
  encode(v) {
56
57
  return {
57
58
  message: UserChatMessage.new(v.prompt.text, {
59
+ acceptTaskNames: v.prompt?.acceptTaskNames,
58
60
  approvals: v.prompt?.approvals,
59
61
  context: v.prompt?.context,
60
62
  skillIds: v.prompt?.skillIds,
@@ -1 +1 @@
1
- {"version":3,"file":"createConversation.js","sourceRoot":"","sources":["../../../../../src/enterprise/ai/conversations/methods/createConversation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,8BAA8B,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhG,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAqB,EAAE,EAAE,CAC1D,SAAS,kBAAkB,CAAC,IAA6C;IACvE,OAAO,MAAM;SACV,cAAc,CAAC,qBAAqB,EAAE;QACrC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,uBAAuB,EAAE,IAAI,CAAC,CAAC;QAC7D,OAAO,EAAE;YACP,MAAM,EAAE,kBAAkB;YAC1B,cAAc,EAAE,kBAAkB;SACnC;QACD,SAAS,EAAE,IAAI;QACf,MAAM,EAAE,MAAM;KACf,CAAC;SACD,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAA0D,CAAC;SAChF,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC,CAAC;AACpE,CAAC,CAAC;AAEJ,MAAM,0BAA0B,GAAG,CAAC,CAAC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esContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as z from \"zod/mini\";\nimport type { SonarV4Config } from \"../../../../common/Config.ts\";\nimport { conversationPropertiesCodec } from \"../conversationPropertiesCodec.ts\";\nimport { createConversationPromptSchema, UserChatMessage } from \"../../chat/UserChatMessage.ts\";\n\nexport const createConversation = (config: SonarV4Config) =>\n function createConversation(body: z.input<typeof createConversationCodec>) {\n return config\n .sonarV4Request(`agent/conversations`, {\n body: JSON.stringify(z.decode(createConversationCodec, body)),\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n keepalive: true,\n method: \"POST\",\n })\n .map((res) => res.json() as Promise<z.input<typeof conversationPropertiesCodec>>)\n .map((entity) => z.decode(conversationPropertiesCodec, entity));\n };\n\nconst createConversationInSchema = z.strictObject({\n message: z.instanceof(UserChatMessage),\n modelName: z.optional(z.string()),\n modelProviderId: z.optional(z.string()),\n});\n\nexport const createConversationCodec = z.codec(\n createConversationInSchema,\n z.extend(\n z.omit(createConversationInSchema, {\n message: true,\n }),\n {\n prompt: createConversationPromptSchema,\n },\n ),\n {\n decode(v) {\n return {\n modelName: v.modelName,\n modelProviderId: v.modelProviderId,\n prompt: {\n approvals: v.message.prompt?.approvals,\n context: v.message.prompt?.context,\n skillIds: v.message.prompt?.skillIds,\n text: v.message.content,\n },\n };\n },\n encode(v) {\n return {\n message: UserChatMessage.new(v.prompt.text, {\n approvals: v.prompt?.approvals,\n context: v.prompt?.context,\n skillIds: v.prompt?.skillIds,\n }),\n modelName: v.modelName,\n modelProviderId: v.modelProviderId,\n };\n },\n },\n);\n"]}
1
+ {"version":3,"file":"createConversation.js","sourceRoot":"","sources":["../../../../../src/enterprise/ai/conversations/methods/createConversation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,8BAA8B,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhG,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAqB,EAAE,EAAE,CAC1D,SAAS,kBAAkB,CAAC,IAA6C;IACvE,OAAO,MAAM;SACV,cAAc,CAAC,qBAAqB,EAAE;QACrC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,uBAAuB,EAAE,IAAI,CAAC,CAAC;QAC7D,OAAO,EAAE;YACP,MAAM,EAAE,kBAAkB;YAC1B,cAAc,EAAE,kBAAkB;SACnC;QACD,SAAS,EAAE,IAAI;QACf,MAAM,EAAE,MAAM;KACf,CAAC;SACD,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAA0D,CAAC;SAChF,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC,CAAC;AACpE,CAAC,CAAC;AAEJ,MAAM,0BAA0B,GAAG,CAAC,CAAC,YAAY,CAAC;IAChD,OAAO,EAAE,CAAC,CAAC,UAAU,CAAC,eAAe,CAAC;IACtC,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACjC,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACxC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC5C,0BAA0B,EAC1B,CAAC,CAAC,MAAM,CACN,CAAC,CAAC,IAAI,CAAC,0BAA0B,EAAE;IACjC,OAAO,EAAE,IAAI;CACd,CAAC,EACF;IACE,MAAM,EAAE,8BAA8B;CACvC,CACF,EACD;IACE,MAAM,CAAC,CAAC;QACN,OAAO;YACL,SAAS,EAAE,CAAC,CAAC,SAAS;YACtB,eAAe,EAAE,CAAC,CAAC,eAAe;YAClC,MAAM,EAAE;gBACN,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,eAAe;gBAClD,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS;gBACtC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO;gBAClC,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ;gBACpC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO;aACxB;SACF,CAAC;IACJ,CAAC;IACD,MAAM,CAAC,CAAC;QACN,OAAO;YACL,OAAO,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE;gBAC1C,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,eAAe;gBAC1C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,SAAS;gBAC9B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,OAAO;gBAC1B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,QAAQ;aAC7B,CAAC;YACF,SAAS,EAAE,CAAC,CAAC,SAAS;YACtB,eAAe,EAAE,CAAC,CAAC,eAAe;SACnC,CAAC;IACJ,CAAC;CACF,CACF,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as z from \"zod/mini\";\nimport type { SonarV4Config } from \"../../../../common/Config.ts\";\nimport { conversationPropertiesCodec } from \"../conversationPropertiesCodec.ts\";\nimport { createConversationPromptSchema, UserChatMessage } from \"../../chat/UserChatMessage.ts\";\n\nexport const createConversation = (config: SonarV4Config) =>\n function createConversation(body: z.input<typeof createConversationCodec>) {\n return config\n .sonarV4Request(`agent/conversations`, {\n body: JSON.stringify(z.decode(createConversationCodec, body)),\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n keepalive: true,\n method: \"POST\",\n })\n .map((res) => res.json() as Promise<z.input<typeof conversationPropertiesCodec>>)\n .map((entity) => z.decode(conversationPropertiesCodec, entity));\n };\n\nconst createConversationInSchema = z.strictObject({\n message: z.instanceof(UserChatMessage),\n modelName: z.optional(z.string()),\n modelProviderId: z.optional(z.string()),\n});\n\nexport const createConversationCodec = z.codec(\n createConversationInSchema,\n z.extend(\n z.omit(createConversationInSchema, {\n message: true,\n }),\n {\n prompt: createConversationPromptSchema,\n },\n ),\n {\n decode(v) {\n return {\n modelName: v.modelName,\n modelProviderId: v.modelProviderId,\n prompt: {\n acceptTaskNames: v.message.prompt?.acceptTaskNames,\n approvals: v.message.prompt?.approvals,\n context: v.message.prompt?.context,\n skillIds: v.message.prompt?.skillIds,\n text: v.message.content,\n },\n };\n },\n encode(v) {\n return {\n message: UserChatMessage.new(v.prompt.text, {\n acceptTaskNames: v.prompt?.acceptTaskNames,\n approvals: v.prompt?.approvals,\n context: v.prompt?.context,\n skillIds: v.prompt?.skillIds,\n }),\n modelName: v.modelName,\n modelProviderId: v.modelProviderId,\n };\n },\n },\n);\n"]}
@@ -12648,6 +12648,7 @@ var DremioCloud = (() => {
12648
12648
  var prodLikePattern = /^([^.]+)(\.(?:(?:eu\.)?dremio\.cloud|[^.]+\.dremio\.site))$/;
12649
12649
  var privateLinkPattern = /^([^.]+\.)([^.]+)((\.privatelink\.dremio\.cloud)|(\.privatelink\.([^.]+)\.dremio\.site))$/;
12650
12650
  var daasEnginePattern = /^(dcs-(?:aws|cloud)-\d+-ns\.)([^.]+)(\.drem\.io)$/;
12651
+ var daasAzurePattern = /^([^.]+)(\.daas-azure\.drem\.io)$/;
12651
12652
  var awsInternalPattern = /^([^.]+)(\.([^.]+\.aws\.dremio\.site))$/;
12652
12653
  function _replaceOriginResource(origin, resource) {
12653
12654
  const url = new URL(origin);
@@ -12659,6 +12660,10 @@ var DremioCloud = (() => {
12659
12660
  url.hostname = hostname2.replace(privateLinkPattern, `$1${resource}$3`);
12660
12661
  return url.origin;
12661
12662
  }
12663
+ if (daasAzurePattern.test(hostname2)) {
12664
+ url.hostname = hostname2.replace(daasAzurePattern, `${resource}$2`);
12665
+ return url.origin;
12666
+ }
12662
12667
  if (daasEnginePattern.test(hostname2)) {
12663
12668
  url.hostname = hostname2.replace(daasEnginePattern, `$1${resource}$3`);
12664
12669
  return url.origin;
@@ -17257,6 +17262,7 @@ var DremioCloud = (() => {
17257
17262
  name: string2()
17258
17263
  }))
17259
17264
  })),
17265
+ acceptTaskNames: optional(array(string2())),
17260
17266
  context: optional(string2()),
17261
17267
  skillIds: optional(array(string2())),
17262
17268
  text: string2()
@@ -17724,6 +17730,7 @@ var DremioCloud = (() => {
17724
17730
  modelName: v2.modelName,
17725
17731
  modelProviderId: v2.modelProviderId,
17726
17732
  prompt: {
17733
+ acceptTaskNames: v2.message.prompt?.acceptTaskNames,
17727
17734
  approvals: v2.message.prompt?.approvals,
17728
17735
  context: v2.message.prompt?.context,
17729
17736
  skillIds: v2.message.prompt?.skillIds,
@@ -17734,6 +17741,7 @@ var DremioCloud = (() => {
17734
17741
  encode(v2) {
17735
17742
  return {
17736
17743
  message: UserChatMessage.new(v2.prompt.text, {
17744
+ acceptTaskNames: v2.prompt?.acceptTaskNames,
17737
17745
  approvals: v2.prompt?.approvals,
17738
17746
  context: v2.prompt?.context,
17739
17747
  skillIds: v2.prompt?.skillIds
@@ -16469,6 +16469,7 @@ var DremioEnterprise = (() => {
16469
16469
  name: string2()
16470
16470
  }))
16471
16471
  })),
16472
+ acceptTaskNames: optional(array(string2())),
16472
16473
  context: optional(string2()),
16473
16474
  skillIds: optional(array(string2())),
16474
16475
  text: string2()
@@ -16501,6 +16502,7 @@ var DremioEnterprise = (() => {
16501
16502
  modelName: v2.modelName,
16502
16503
  modelProviderId: v2.modelProviderId,
16503
16504
  prompt: {
16505
+ acceptTaskNames: v2.message.prompt?.acceptTaskNames,
16504
16506
  approvals: v2.message.prompt?.approvals,
16505
16507
  context: v2.message.prompt?.context,
16506
16508
  skillIds: v2.message.prompt?.skillIds,
@@ -16511,6 +16513,7 @@ var DremioEnterprise = (() => {
16511
16513
  encode(v2) {
16512
16514
  return {
16513
16515
  message: UserChatMessage.new(v2.prompt.text, {
16516
+ acceptTaskNames: v2.prompt?.acceptTaskNames,
16514
16517
  approvals: v2.prompt?.approvals,
16515
16518
  context: v2.prompt?.context,
16516
16519
  skillIds: v2.prompt?.skillIds
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dremio/js-sdk",
3
- "version": "0.50.0",
3
+ "version": "0.52.0",
4
4
  "description": "JavaScript library for the Dremio API",
5
5
  "keywords": [
6
6
  "dremio",