@dremio/js-sdk 0.54.0 → 0.56.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.
@@ -17,6 +17,7 @@ const prodLikePattern = /^([^.]+)(\.(?:(?:eu\.)?dremio\.cloud|[^.]+\.dremio\.sit
17
17
  const privateLinkPattern = /^([^.]+\.)([^.]+)((\.privatelink\.dremio\.cloud)|(\.privatelink\.([^.]+)\.dremio\.site))$/;
18
18
  const daasEnginePattern = /^(dcs-(?:aws|cloud)-\d+-ns\.)([^.]+)(\.drem\.io)$/;
19
19
  const daasAzurePattern = /^([^.]+)(\.daas-azure\.drem\.io)$/;
20
+ const liftnShiftPattern = /^(dcs-(?:aws|cloud)-\d+-ns\.)([^.]+)(\.[^.]+\.drem\.io)$/;
20
21
  const awsInternalPattern = /^([^.]+)(\.([^.]+\.aws\.dremio\.site))$/;
21
22
  /**
22
23
  * @hidden
@@ -40,6 +41,10 @@ export function _replaceOriginResource(origin, resource) {
40
41
  url.hostname = hostname.replace(daasEnginePattern, `$1${resource}$3`);
41
42
  return url.origin;
42
43
  }
44
+ if (liftnShiftPattern.test(hostname)) {
45
+ url.hostname = hostname.replace(liftnShiftPattern, `$1${resource}$3`);
46
+ return url.origin;
47
+ }
43
48
  if (prodLikePattern.test(hostname)) {
44
49
  url.hostname = hostname.replace(prodLikePattern, `${resource}$2`);
45
50
  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,gBAAgB,GAAG,mCAAmC,CAAC;AAC7D,MAAM,kBAAkB,GAAG,yCAAyC,CAAC;AAErE;;;GAGG;AACH,MAA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cesContent":["/*\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"]}
1
+ {"version":3,"file":"repl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OAAO,CAAC,iBAAiB,EAAE,KAAK,QAAQ,IAAI,CAAC,CAAC;QACtE,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 liftnShiftPattern = /^(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 (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 (liftnShiftPattern.test(hostname)) {\n url.hostname = hostname.replace(liftnShiftPattern, `$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"]}
@@ -13,6 +13,7 @@ export declare class UserChatMessage {
13
13
  id: string;
14
14
  prompt: Omit<{
15
15
  text: string;
16
+ acceptTaskNames?: string[] | undefined;
16
17
  approvals?: {
17
18
  allToolsAllowed: boolean;
18
19
  approvalNonce: string;
@@ -21,9 +22,10 @@ export declare class UserChatMessage {
21
22
  arguments: Record<string, unknown>;
22
23
  executionId: string;
23
24
  name: string;
25
+ allowInConversation?: boolean | undefined;
26
+ catalogPath?: string[] | undefined;
24
27
  }[];
25
28
  } | undefined;
26
- acceptTaskNames?: string[] | undefined;
27
29
  context?: string | undefined;
28
30
  skillIds?: string[] | undefined;
29
31
  }, "text"> | undefined;
@@ -31,17 +33,19 @@ export declare class UserChatMessage {
31
33
  static new(content: UserChatMessage["content"], prompt?: UserChatMessage["prompt"]): UserChatMessage;
32
34
  }
33
35
  export declare const createConversationPromptSchema: z.ZodMiniObject<{
36
+ acceptTaskNames: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
34
37
  approvals: z.ZodMiniOptional<z.ZodMiniObject<{
35
38
  allToolsAllowed: z.ZodMiniBoolean<boolean>;
36
39
  approvalNonce: z.ZodMiniString<string>;
37
40
  toolDecisions: z.ZodMiniArray<z.ZodMiniObject<{
41
+ allowInConversation: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
38
42
  approved: z.ZodMiniBoolean<boolean>;
39
43
  arguments: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>;
44
+ catalogPath: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
40
45
  executionId: z.ZodMiniString<string>;
41
46
  name: z.ZodMiniString<string>;
42
47
  }, z.core.$strip>>;
43
48
  }, z.core.$strip>>;
44
- acceptTaskNames: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
45
49
  context: z.ZodMiniOptional<z.ZodMiniString<string>>;
46
50
  skillIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
47
51
  text: z.ZodMiniString<string>;
@@ -43,17 +43,19 @@ export class UserChatMessage {
43
43
  }
44
44
  }
45
45
  export const createConversationPromptSchema = z.strictObject({
46
+ acceptTaskNames: z.optional(z.array(z.string())),
46
47
  approvals: z.optional(z.object({
47
48
  allToolsAllowed: z.boolean(),
48
49
  approvalNonce: z.string(),
49
50
  toolDecisions: z.array(z.object({
51
+ allowInConversation: z.optional(z.boolean()),
50
52
  approved: z.boolean(),
51
53
  arguments: z.record(z.string(), z.unknown()),
54
+ catalogPath: z.optional(z.array(z.string())),
52
55
  executionId: z.string(),
53
56
  name: z.string(),
54
57
  })),
55
58
  })),
56
- acceptTaskNames: z.optional(z.array(z.string())),
57
59
  context: z.optional(z.string()),
58
60
  skillIds: z.optional(z.array(z.string())),
59
61
  text: z.string(),
@@ -1 +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3D,SAAS,EAAE,CAAC,CAAC,QAAQ,CACnB,CAAC,CAAC,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"]}
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,EAC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,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,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;YAC5C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;YACvB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;SACjB,CAAC,CACH;KACF,CAAC,CACH;IACD,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 acceptTaskNames: z.optional(z.array(z.string())),\n approvals: z.optional(\n z.object({\n allToolsAllowed: z.boolean(),\n approvalNonce: z.string(),\n toolDecisions: z.array(\n z.object({\n allowInConversation: z.optional(z.boolean()),\n approved: z.boolean(),\n arguments: z.record(z.string(), z.unknown()),\n catalogPath: z.optional(z.array(z.string())),\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"]}
@@ -2,12 +2,12 @@ import { Temporal } from "temporal-polyfill";
2
2
  import * as z from "zod/mini";
3
3
  export declare const conversationPropertiesCodec: z.ZodMiniCodec<z.ZodMiniObject<{
4
4
  conversationId: z.ZodMiniString<string>;
5
- createdAt: z.iso.ZodMiniISODateTime;
5
+ createdAt: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
6
6
  currentRunId: z.ZodMiniOptional<z.ZodMiniString<string>>;
7
7
  modelName: z.ZodMiniOptional<z.ZodMiniString<string>>;
8
8
  modelProviderId: z.ZodMiniOptional<z.ZodMiniString<string>>;
9
- modifiedAt: z.iso.ZodMiniISODateTime;
10
- tag: z.ZodMiniString<string>;
9
+ modifiedAt: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
10
+ tag: z.ZodMiniOptional<z.ZodMiniString<string>>;
11
11
  title: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
12
12
  }, z.core.$strip>, z.ZodMiniObject<{
13
13
  createdAt: z.ZodMiniCustom<Temporal.Instant, Temporal.Instant>;
@@ -17,12 +17,12 @@ import { Temporal } from "temporal-polyfill";
17
17
  import * as z from "zod/mini";
18
18
  export const conversationPropertiesCodec = z.codec(z.object({
19
19
  conversationId: z.string(),
20
- createdAt: z.iso.datetime(),
20
+ createdAt: z.optional(z.iso.datetime()),
21
21
  currentRunId: z.optional(z.string()),
22
22
  modelName: z.optional(z.string()),
23
23
  modelProviderId: z.optional(z.string()),
24
- modifiedAt: z.iso.datetime(),
25
- tag: z.string(),
24
+ modifiedAt: z.optional(z.iso.datetime()),
25
+ tag: z.optional(z.string()),
26
26
  title: z.optional(z.nullable(z.string())),
27
27
  }), z.object({
28
28
  createdAt: z.instanceof(Temporal.Instant),
@@ -35,14 +35,15 @@ export const conversationPropertiesCodec = z.codec(z.object({
35
35
  title: z.nullable(z.string()),
36
36
  }), {
37
37
  decode(v) {
38
+ const now = Temporal.Now.instant();
38
39
  return {
39
- createdAt: Temporal.Instant.from(v.createdAt),
40
+ createdAt: v.createdAt ? Temporal.Instant.from(v.createdAt) : now,
40
41
  currentRunId: v.currentRunId || null,
41
42
  id: v.conversationId,
42
43
  modelName: v.modelName || null,
43
44
  modelProviderId: v.modelProviderId || null,
44
- modifiedAt: Temporal.Instant.from(v.modifiedAt),
45
- tag: v.tag,
45
+ modifiedAt: v.modifiedAt ? Temporal.Instant.from(v.modifiedAt) : now,
46
+ tag: v.tag || "",
46
47
  title: v.title || null,
47
48
  };
48
49
  },
@@ -1 +1 @@
1
- {"version":3,"file":"conversationPropertiesCodec.js","sourceRoot":"","sources":["../../../../src/enterprise/ai/conversations/conversationPropertiesCodec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,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;YAC7C,YAAY,EAAE,CAAC,CAAC,YAAY,IAAI,IAAI;YACpC,EAAE,EAAE,CAAC,CAAC,cAAc;YACpB,SAAS,EAAE,CAAC,CAAC,SAAS,IAAI,IAAI;YAC9B,eAAe,EAAE,CAAC,CAAC,eAAe,IAAI,IAAI;YAC1C,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC;YAC/C,GAAG,EAAE,CAAC,CAAC,GAAG;YACV,KAAK,EAAE,CAAC,CAAC,KAAK,IAAI,IAAI;SACvB,CAAC;IACJ,CAAC;IACD,MAAM,CAAC,CAAC;QACN,OAAO;YACL,cAAc,EAAE,CAAC,CAAC,EAAE;YACpB,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE;YACjC,YAAY,EAAE,CAAC,CAAC,YAAY,IAAI,SAAS;YACzC,SAAS,EAAE,CAAC,CAAC,SAAS,IAAI,SAAS;YACnC,eAAe,EAAE,CAAC,CAAC,eAAe,IAAI,SAAS;YAC/C,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE;YACnC,GAAG,EAAE,CAAC,CAAC,GAAG;YACV,KAAK,EAAE,CAAC,CAAC,KAAK;SACf,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 { Temporal } from \"temporal-polyfill\";\nimport * as z from \"zod/mini\";\n\nexport const conversationPropertiesCodec = z.codec(\n z.object({\n conversationId: z.string(),\n createdAt: z.iso.datetime(),\n currentRunId: z.optional(z.string()),\n modelName: z.optional(z.string()),\n modelProviderId: z.optional(z.string()),\n modifiedAt: z.iso.datetime(),\n tag: z.string(),\n title: z.optional(z.nullable(z.string())),\n }),\n z.object({\n createdAt: z.instanceof(Temporal.Instant),\n currentRunId: z.nullable(z.string()),\n id: z.string(),\n modelName: z.nullable(z.string()),\n modelProviderId: z.nullable(z.string()),\n modifiedAt: z.instanceof(Temporal.Instant),\n tag: z.string(),\n title: z.nullable(z.string()),\n }),\n {\n decode(v) {\n return {\n createdAt: Temporal.Instant.from(v.createdAt),\n currentRunId: v.currentRunId || null,\n id: v.conversationId,\n modelName: v.modelName || null,\n modelProviderId: v.modelProviderId || null,\n modifiedAt: Temporal.Instant.from(v.modifiedAt),\n tag: v.tag,\n title: v.title || null,\n };\n },\n encode(v) {\n return {\n conversationId: v.id,\n createdAt: v.createdAt.toString(),\n currentRunId: v.currentRunId || undefined,\n modelName: v.modelName || undefined,\n modelProviderId: v.modelProviderId || undefined,\n modifiedAt: v.modifiedAt.toString(),\n tag: v.tag,\n title: v.title,\n };\n },\n },\n);\n\nexport type ConversationEntity = z.input<typeof conversationPropertiesCodec>;\n"]}
1
+ {"version":3,"file":"conversationPropertiesCodec.js","sourceRoot":"","sources":["../../../../src/enterprise/ai/conversations/conversationPropertiesCodec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAChD,CAAC,CAAC,MAAM,CAAC;IACP,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACvC,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAA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ACjE,YAAY,EAAE,CAAC,CAAC,YAAY,IAAI,IAAI;YACpC,EAAE,EAAE,CAAC,CAAC,cAAc;YACpB,SAAS,EAAE,CAAC,CAAC,SAAS,IAAI,IAAI;YAC9B,eAAe,EAAE,CAAC,CAAC,eAAe,IAAI,IAAI;YAC1C,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG;YACpE,GAAG,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE;YAChB,KAAK,EAAE,CAAC,CAAC,KAAK,IAAI,IAAI;SACvB,CAAC;IACJ,CAAC;IACD,MAAM,CAAC,CAAC;QACN,OAAO;YACL,cAAc,EAAE,CAAC,CAAC,EAAE;YACpB,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE;YACjC,YAAY,EAAE,CAAC,CAAC,YAAY,IAAI,SAAS;YACzC,SAAS,EAAE,CAAC,CAAC,SAAS,IAAI,SAAS;YACnC,eAAe,EAAE,CAAC,CAAC,eAAe,IAAI,SAAS;YAC/C,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE;YACnC,GAAG,EAAE,CAAC,CAAC,GAAG;YACV,KAAK,EAAE,CAAC,CAAC,KAAK;SACf,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 { Temporal } from \"temporal-polyfill\";\nimport * as z from \"zod/mini\";\n\nexport const conversationPropertiesCodec = z.codec(\n z.object({\n conversationId: z.string(),\n createdAt: z.optional(z.iso.datetime()),\n currentRunId: z.optional(z.string()),\n modelName: z.optional(z.string()),\n modelProviderId: z.optional(z.string()),\n modifiedAt: z.optional(z.iso.datetime()),\n tag: z.optional(z.string()),\n title: z.optional(z.nullable(z.string())),\n }),\n z.object({\n createdAt: z.instanceof(Temporal.Instant),\n currentRunId: z.nullable(z.string()),\n id: z.string(),\n modelName: z.nullable(z.string()),\n modelProviderId: z.nullable(z.string()),\n modifiedAt: z.instanceof(Temporal.Instant),\n tag: z.string(),\n title: z.nullable(z.string()),\n }),\n {\n decode(v) {\n const now = Temporal.Now.instant();\n return {\n createdAt: v.createdAt ? Temporal.Instant.from(v.createdAt) : now,\n currentRunId: v.currentRunId || null,\n id: v.conversationId,\n modelName: v.modelName || null,\n modelProviderId: v.modelProviderId || null,\n modifiedAt: v.modifiedAt ? Temporal.Instant.from(v.modifiedAt) : now,\n tag: v.tag || \"\",\n title: v.title || null,\n };\n },\n encode(v) {\n return {\n conversationId: v.id,\n createdAt: v.createdAt.toString(),\n currentRunId: v.currentRunId || undefined,\n modelName: v.modelName || undefined,\n modelProviderId: v.modelProviderId || undefined,\n modifiedAt: v.modifiedAt.toString(),\n tag: v.tag,\n title: v.title,\n };\n },\n },\n);\n\nexport type ConversationEntity = z.input<typeof conversationPropertiesCodec>;\n"]}
@@ -19,17 +19,19 @@ export declare const createConversationCodec: z.ZodMiniCodec<z.ZodMiniObject<{
19
19
  modelName: z.ZodMiniOptional<z.ZodMiniString<string>>;
20
20
  modelProviderId: z.ZodMiniOptional<z.ZodMiniString<string>>;
21
21
  prompt: z.ZodMiniObject<{
22
+ acceptTaskNames: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
22
23
  approvals: z.ZodMiniOptional<z.ZodMiniObject<{
23
24
  allToolsAllowed: z.ZodMiniBoolean<boolean>;
24
25
  approvalNonce: z.ZodMiniString<string>;
25
26
  toolDecisions: z.ZodMiniArray<z.ZodMiniObject<{
27
+ allowInConversation: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
26
28
  approved: z.ZodMiniBoolean<boolean>;
27
29
  arguments: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>;
30
+ catalogPath: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
28
31
  executionId: z.ZodMiniString<string>;
29
32
  name: z.ZodMiniString<string>;
30
33
  }, z.core.$strip>>;
31
34
  }, z.core.$strip>>;
32
- acceptTaskNames: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
33
35
  context: z.ZodMiniOptional<z.ZodMiniString<string>>;
34
36
  skillIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
35
37
  text: z.ZodMiniString<string>;
@@ -12649,6 +12649,7 @@ var DremioCloud = (() => {
12649
12649
  var privateLinkPattern = /^([^.]+\.)([^.]+)((\.privatelink\.dremio\.cloud)|(\.privatelink\.([^.]+)\.dremio\.site))$/;
12650
12650
  var daasEnginePattern = /^(dcs-(?:aws|cloud)-\d+-ns\.)([^.]+)(\.drem\.io)$/;
12651
12651
  var daasAzurePattern = /^([^.]+)(\.daas-azure\.drem\.io)$/;
12652
+ var liftnShiftPattern = /^(dcs-(?:aws|cloud)-\d+-ns\.)([^.]+)(\.[^.]+\.drem\.io)$/;
12652
12653
  var awsInternalPattern = /^([^.]+)(\.([^.]+\.aws\.dremio\.site))$/;
12653
12654
  function _replaceOriginResource(origin, resource) {
12654
12655
  const url = new URL(origin);
@@ -12668,6 +12669,10 @@ var DremioCloud = (() => {
12668
12669
  url.hostname = hostname2.replace(daasEnginePattern, `$1${resource}$3`);
12669
12670
  return url.origin;
12670
12671
  }
12672
+ if (liftnShiftPattern.test(hostname2)) {
12673
+ url.hostname = hostname2.replace(liftnShiftPattern, `$1${resource}$3`);
12674
+ return url.origin;
12675
+ }
12671
12676
  if (prodLikePattern.test(hostname2)) {
12672
12677
  url.hostname = hostname2.replace(prodLikePattern, `${resource}$2`);
12673
12678
  return url.origin;
@@ -17467,17 +17472,19 @@ var DremioCloud = (() => {
17467
17472
  }
17468
17473
  };
17469
17474
  var createConversationPromptSchema = strictObject({
17475
+ acceptTaskNames: optional(array(string2())),
17470
17476
  approvals: optional(object({
17471
17477
  allToolsAllowed: boolean2(),
17472
17478
  approvalNonce: string2(),
17473
17479
  toolDecisions: array(object({
17480
+ allowInConversation: optional(boolean2()),
17474
17481
  approved: boolean2(),
17475
17482
  arguments: record(string2(), unknown()),
17483
+ catalogPath: optional(array(string2())),
17476
17484
  executionId: string2(),
17477
17485
  name: string2()
17478
17486
  }))
17479
17487
  })),
17480
- acceptTaskNames: optional(array(string2())),
17481
17488
  context: optional(string2()),
17482
17489
  skillIds: optional(array(string2())),
17483
17490
  text: string2()
@@ -17875,12 +17882,12 @@ var DremioCloud = (() => {
17875
17882
  // dist/enterprise/ai/conversations/conversationPropertiesCodec.js
17876
17883
  var conversationPropertiesCodec = codec(object({
17877
17884
  conversationId: string2(),
17878
- createdAt: iso_exports.datetime(),
17885
+ createdAt: optional(iso_exports.datetime()),
17879
17886
  currentRunId: optional(string2()),
17880
17887
  modelName: optional(string2()),
17881
17888
  modelProviderId: optional(string2()),
17882
- modifiedAt: iso_exports.datetime(),
17883
- tag: string2(),
17889
+ modifiedAt: optional(iso_exports.datetime()),
17890
+ tag: optional(string2()),
17884
17891
  title: optional(nullable(string2()))
17885
17892
  }), object({
17886
17893
  createdAt: _instanceof(Xn.Instant),
@@ -17893,14 +17900,15 @@ var DremioCloud = (() => {
17893
17900
  title: nullable(string2())
17894
17901
  }), {
17895
17902
  decode(v2) {
17903
+ const now = Xn.Now.instant();
17896
17904
  return {
17897
- createdAt: Xn.Instant.from(v2.createdAt),
17905
+ createdAt: v2.createdAt ? Xn.Instant.from(v2.createdAt) : now,
17898
17906
  currentRunId: v2.currentRunId || null,
17899
17907
  id: v2.conversationId,
17900
17908
  modelName: v2.modelName || null,
17901
17909
  modelProviderId: v2.modelProviderId || null,
17902
- modifiedAt: Xn.Instant.from(v2.modifiedAt),
17903
- tag: v2.tag,
17910
+ modifiedAt: v2.modifiedAt ? Xn.Instant.from(v2.modifiedAt) : now,
17911
+ tag: v2.tag || "",
17904
17912
  title: v2.title || null
17905
17913
  };
17906
17914
  },
@@ -16412,12 +16412,12 @@ var DremioEnterprise = (() => {
16412
16412
  // dist/enterprise/ai/conversations/conversationPropertiesCodec.js
16413
16413
  var conversationPropertiesCodec = codec(object({
16414
16414
  conversationId: string2(),
16415
- createdAt: iso_exports.datetime(),
16415
+ createdAt: optional(iso_exports.datetime()),
16416
16416
  currentRunId: optional(string2()),
16417
16417
  modelName: optional(string2()),
16418
16418
  modelProviderId: optional(string2()),
16419
- modifiedAt: iso_exports.datetime(),
16420
- tag: string2(),
16419
+ modifiedAt: optional(iso_exports.datetime()),
16420
+ tag: optional(string2()),
16421
16421
  title: optional(nullable(string2()))
16422
16422
  }), object({
16423
16423
  createdAt: _instanceof(Xn.Instant),
@@ -16430,14 +16430,15 @@ var DremioEnterprise = (() => {
16430
16430
  title: nullable(string2())
16431
16431
  }), {
16432
16432
  decode(v2) {
16433
+ const now = Xn.Now.instant();
16433
16434
  return {
16434
- createdAt: Xn.Instant.from(v2.createdAt),
16435
+ createdAt: v2.createdAt ? Xn.Instant.from(v2.createdAt) : now,
16435
16436
  currentRunId: v2.currentRunId || null,
16436
16437
  id: v2.conversationId,
16437
16438
  modelName: v2.modelName || null,
16438
16439
  modelProviderId: v2.modelProviderId || null,
16439
- modifiedAt: Xn.Instant.from(v2.modifiedAt),
16440
- tag: v2.tag,
16440
+ modifiedAt: v2.modifiedAt ? Xn.Instant.from(v2.modifiedAt) : now,
16441
+ tag: v2.tag || "",
16441
16442
  title: v2.title || null
16442
16443
  };
16443
16444
  },
@@ -16483,17 +16484,19 @@ var DremioEnterprise = (() => {
16483
16484
  }
16484
16485
  };
16485
16486
  var createConversationPromptSchema = strictObject({
16487
+ acceptTaskNames: optional(array(string2())),
16486
16488
  approvals: optional(object({
16487
16489
  allToolsAllowed: boolean2(),
16488
16490
  approvalNonce: string2(),
16489
16491
  toolDecisions: array(object({
16492
+ allowInConversation: optional(boolean2()),
16490
16493
  approved: boolean2(),
16491
16494
  arguments: record(string2(), unknown()),
16495
+ catalogPath: optional(array(string2())),
16492
16496
  executionId: string2(),
16493
16497
  name: string2()
16494
16498
  }))
16495
16499
  })),
16496
- acceptTaskNames: optional(array(string2())),
16497
16500
  context: optional(string2()),
16498
16501
  skillIds: optional(array(string2())),
16499
16502
  text: string2()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dremio/js-sdk",
3
- "version": "0.54.0",
3
+ "version": "0.56.0",
4
4
  "description": "JavaScript library for the Dremio API",
5
5
  "keywords": [
6
6
  "dremio",
@@ -43,8 +43,9 @@
43
43
  "docs": "typedoc src/oss/index.ts --hideGenerator --out ./docs/oss && typedoc src/enterprise/index.ts --hideGenerator --out ./docs/enterprise && typedoc src/cloud/index.ts --hideGenerator --out ./docs/cloud",
44
44
  "lint": "eslint src",
45
45
  "lint:fix": "eslint src --fix",
46
- "lint:prettier": "prettier src --check",
47
- "prepare": "node --run dist"
46
+ "lint:prettier": "prettier src test --check",
47
+ "prepare": "node --run dist",
48
+ "test": "node --test 'test/**/*.test.ts'"
48
49
  },
49
50
  "dependencies": {
50
51
  "dequal": "^2",