@dremio/js-sdk 0.36.0 → 0.36.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.
@@ -42,7 +42,7 @@ export class AgentToolCallGroup {
42
42
  ...this.toolCalls.slice(0, requestIndex),
43
43
  toolCall.withResult(toolResult),
44
44
  ...this.toolCalls.slice(requestIndex + 1),
45
- ]);
45
+ ], this.id);
46
46
  }
47
47
  toJSON() {
48
48
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"AgentToolCallGroup.js","sourceRoot":"","sources":["../../../../../src/enterprise/ai/chat/eventWrappers/AgentToolCallGroup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAKnD;;;;GAIG;AACH,MAAM,OAAO,kBAAkB;IACpB,EAAE,GAAG,MAAM,EAAE,CAAC;IACd,SAAS,CAAkB;IAEpC,YAAY,SAA0C,EAAE,EAA6B;QACnF,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,EAAE,EAAE,CAAC;YACP,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACf,CAAC;IACH,CAAC;IAED,UAAU,CAAC,WAA+D;QACxE,OAAO,IAAI,kBAAkB,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,aAAa,CAAC,WAAW,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9F,CAAC;IAED,SAAS,CAAC,UAA6D;QACrE,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAC/C,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,UAAU,CAAC,OAAO,CAAC,MAAM,CACxD,CAAC;QAEF,IAAI,YAAY,KAAK,CAAC,CAAC,EAAE,CAAC;YACxB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,YAAY,CAAE,CAAC;QAElD,OAAO,IAAI,kBAAkB,CAAC;YAC5B,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,YAAY,CAAC;YACxC,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC;YAC/B,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,YAAY,GAAG,CAAC,CAAC;SAC1C,CAAC,CAAC;IACL,CAAC;IAED,MAAM;QACJ,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;SAC/D,CAAC;IACJ,CAAC;CACF","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 { AgentToolCall } from \"./AgentToolCall.ts\";\nimport type { AgentChatResponse } from \"../AgentChatResponse.ts\";\nimport type { AgentToolRequestResponseContent } from \"../AgentToolRequestResponseContent.ts\";\nimport type { AgentToolResultResponseContent } from \"../AgentToolResultResponseContent.ts\";\n\n/**\n * Contains a collection of `AgentToolCall` associated with an `AgentChatExchange`.\n * As tool calls stream in, this class is updated immutably but maintains\n * a stable `.id` property.\n */\nexport class AgentToolCallGroup {\n readonly id = nanoid();\n readonly toolCalls: AgentToolCall[];\n\n constructor(toolCalls: AgentToolCallGroup[\"toolCalls\"], id?: AgentToolCallGroup[\"id\"]) {\n this.toolCalls = toolCalls;\n if (id) {\n this.id = id;\n }\n }\n\n addRequest(toolRequest: AgentChatResponse<AgentToolRequestResponseContent>) {\n return new AgentToolCallGroup([...this.toolCalls, new AgentToolCall(toolRequest)], this.id);\n }\n\n addResult(toolResult: AgentChatResponse<AgentToolResultResponseContent>) {\n const requestIndex = this.toolCalls.findLastIndex(\n (toolCall) => toolCall.id === toolResult.content.callId,\n );\n\n if (requestIndex === -1) {\n return this;\n }\n\n const toolCall = this.toolCalls.at(requestIndex)!;\n\n return new AgentToolCallGroup([\n ...this.toolCalls.slice(0, requestIndex),\n toolCall.withResult(toolResult),\n ...this.toolCalls.slice(requestIndex + 1),\n ]);\n }\n\n toJSON() {\n return {\n id: this.id,\n toolCalls: this.toolCalls.map((toolCall) => toolCall.toJSON()),\n };\n }\n}\n"]}
1
+ {"version":3,"file":"AgentToolCallGroup.js","sourceRoot":"","sources":["../../../../../src/enterprise/ai/chat/eventWrappers/AgentToolCallGroup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAKnD;;;;GAIG;AACH,MAAM,OAAO,kBAAkB;IACpB,EAAE,GAAG,MAAM,EAAE,CAAC;IACd,SAAS,CAAkB;IAEpC,YAAY,SAA0C,EAAE,EAA6B;QACnF,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,EAAE,EAAE,CAAC;YACP,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACf,CAAC;IACH,CAAC;IAED,UAAU,CAAC,WAA+D;QACxE,OAAO,IAAI,kBAAkB,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,aAAa,CAAC,WAAW,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9F,CAAC;IAED,SAAS,CAAC,UAA6D;QACrE,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAC/C,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,UAAU,CAAC,OAAO,CAAC,MAAM,CACxD,CAAC;QAEF,IAAI,YAAY,KAAK,CAAC,CAAC,EAAE,CAAC;YACxB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,YAAY,CAAE,CAAC;QAElD,OAAO,IAAI,kBAAkB,CAC3B;YACE,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,YAAY,CAAC;YACxC,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC;YAC/B,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,YAAY,GAAG,CAAC,CAAC;SAC1C,EACD,IAAI,CAAC,EAAE,CACR,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;SAC/D,CAAC;IACJ,CAAC;CACF","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 { AgentToolCall } from \"./AgentToolCall.ts\";\nimport type { AgentChatResponse } from \"../AgentChatResponse.ts\";\nimport type { AgentToolRequestResponseContent } from \"../AgentToolRequestResponseContent.ts\";\nimport type { AgentToolResultResponseContent } from \"../AgentToolResultResponseContent.ts\";\n\n/**\n * Contains a collection of `AgentToolCall` associated with an `AgentChatExchange`.\n * As tool calls stream in, this class is updated immutably but maintains\n * a stable `.id` property.\n */\nexport class AgentToolCallGroup {\n readonly id = nanoid();\n readonly toolCalls: AgentToolCall[];\n\n constructor(toolCalls: AgentToolCallGroup[\"toolCalls\"], id?: AgentToolCallGroup[\"id\"]) {\n this.toolCalls = toolCalls;\n if (id) {\n this.id = id;\n }\n }\n\n addRequest(toolRequest: AgentChatResponse<AgentToolRequestResponseContent>) {\n return new AgentToolCallGroup([...this.toolCalls, new AgentToolCall(toolRequest)], this.id);\n }\n\n addResult(toolResult: AgentChatResponse<AgentToolResultResponseContent>) {\n const requestIndex = this.toolCalls.findLastIndex(\n (toolCall) => toolCall.id === toolResult.content.callId,\n );\n\n if (requestIndex === -1) {\n return this;\n }\n\n const toolCall = this.toolCalls.at(requestIndex)!;\n\n return new AgentToolCallGroup(\n [\n ...this.toolCalls.slice(0, requestIndex),\n toolCall.withResult(toolResult),\n ...this.toolCalls.slice(requestIndex + 1),\n ],\n this.id,\n );\n }\n\n toJSON() {\n return {\n id: this.id,\n toolCalls: this.toolCalls.map((toolCall) => toolCall.toJSON()),\n };\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dremio/js-sdk",
3
- "version": "0.36.0",
3
+ "version": "0.36.1",
4
4
  "description": "JavaScript library for the Dremio API",
5
5
  "keywords": [
6
6
  "dremio",