@osdk/foundry.aipagents 2.2.0 → 2.4.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/build/browser/_components.d.ts +213 -2
  3. package/build/browser/_components.d.ts.map +1 -1
  4. package/build/browser/_errors.d.ts +306 -0
  5. package/build/browser/_errors.d.ts.map +1 -1
  6. package/build/browser/index.d.ts +4 -2
  7. package/build/browser/index.d.ts.map +1 -1
  8. package/build/browser/index.js +2 -0
  9. package/build/browser/index.js.map +1 -1
  10. package/build/browser/public/Agent.d.ts +17 -1
  11. package/build/browser/public/Agent.d.ts.map +1 -1
  12. package/build/browser/public/Agent.js +14 -1
  13. package/build/browser/public/Agent.js.map +1 -1
  14. package/build/browser/public/AgentVersion.d.ts +2 -2
  15. package/build/browser/public/AgentVersion.js +2 -2
  16. package/build/browser/public/AgentVersion.js.map +1 -1
  17. package/build/browser/public/Content.d.ts +20 -0
  18. package/build/browser/public/Content.d.ts.map +1 -0
  19. package/build/browser/public/Content.js +30 -0
  20. package/build/browser/public/Content.js.map +1 -0
  21. package/build/browser/public/Session.d.ts +133 -0
  22. package/build/browser/public/Session.d.ts.map +1 -0
  23. package/build/browser/public/Session.js +120 -0
  24. package/build/browser/public/Session.js.map +1 -0
  25. package/build/esm/_components.d.ts +213 -2
  26. package/build/esm/_components.d.ts.map +1 -1
  27. package/build/esm/_errors.d.ts +306 -0
  28. package/build/esm/_errors.d.ts.map +1 -1
  29. package/build/esm/index.d.ts +4 -2
  30. package/build/esm/index.d.ts.map +1 -1
  31. package/build/esm/index.js +2 -0
  32. package/build/esm/index.js.map +1 -1
  33. package/build/esm/public/Agent.d.ts +17 -1
  34. package/build/esm/public/Agent.d.ts.map +1 -1
  35. package/build/esm/public/Agent.js +14 -1
  36. package/build/esm/public/Agent.js.map +1 -1
  37. package/build/esm/public/AgentVersion.d.ts +2 -2
  38. package/build/esm/public/AgentVersion.js +2 -2
  39. package/build/esm/public/AgentVersion.js.map +1 -1
  40. package/build/esm/public/Content.d.ts +20 -0
  41. package/build/esm/public/Content.d.ts.map +1 -0
  42. package/build/esm/public/Content.js +30 -0
  43. package/build/esm/public/Content.js.map +1 -0
  44. package/build/esm/public/Session.d.ts +133 -0
  45. package/build/esm/public/Session.d.ts.map +1 -0
  46. package/build/esm/public/Session.js +120 -0
  47. package/build/esm/public/Session.js.map +1 -0
  48. package/package.json +5 -5
@@ -5,7 +5,7 @@ import type * as _AipAgents from "../_components.js";
5
5
  /**
6
6
  * Get details for an AIP Agent.
7
7
  *
8
- * @alpha
8
+ * @beta
9
9
  *
10
10
  * Required Scopes: [api:aip-agents-read]
11
11
  * URL: /v2/aipAgents/agents/{agentRid}
@@ -17,4 +17,20 @@ export declare function get($ctx: $Client | $ClientContext | $OldClient | $OldCl
17
17
  preview?: _Core.PreviewMode | undefined;
18
18
  }
19
19
  ]): Promise<_AipAgents.Agent>;
20
+ /**
21
+ * List all conversation sessions between the calling user and all accessible Agents that were created by this client.
22
+ * Sessions are returned in order of most recently updated first.
23
+ *
24
+ * @beta
25
+ *
26
+ * Required Scopes: [api:aip-agents-write]
27
+ * URL: /v2/aipAgents/agents/allSessions
28
+ */
29
+ export declare function allSessions($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
30
+ $queryParams?: {
31
+ pageSize?: _Core.PageSize | undefined;
32
+ pageToken?: _Core.PageToken | undefined;
33
+ preview?: _Core.PreviewMode | undefined;
34
+ }
35
+ ]): Promise<_AipAgents.AgentsSessionsPage>;
20
36
  //# sourceMappingURL=Agent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Agent.d.ts","sourceRoot":"","sources":["../../../src/public/Agent.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,KAAK,KAAK,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EACV,YAAY,IAAI,UAAU,EAC1B,mBAAmB,IAAI,iBAAiB,EACzC,MAAM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,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAE3B;AAUD;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,iBAAiB,EAC/D,GAAG,IAAI,EAAE;IACP,YAAY,CAAC,EAAE;QACb,QAAQ,CAAC,EAAE,KAAK,CAAC,QAAQ,GAAG,SAAS,CAAC;QACtC,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;QACxC,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,SAAS,CAAC;KACzC;CACF,GACA,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAExC"}
@@ -19,7 +19,7 @@ const _get = [0, "/v2/aipAgents/agents/{0}", 2];
19
19
  /**
20
20
  * Get details for an AIP Agent.
21
21
  *
22
- * @alpha
22
+ * @beta
23
23
  *
24
24
  * Required Scopes: [api:aip-agents-read]
25
25
  * URL: /v2/aipAgents/agents/{agentRid}
@@ -27,4 +27,17 @@ const _get = [0, "/v2/aipAgents/agents/{0}", 2];
27
27
  export function get($ctx, ...args) {
28
28
  return $foundryPlatformFetch($ctx, _get, ...args);
29
29
  }
30
+ const _allSessions = [0, "/v2/aipAgents/agents/allSessions", 2];
31
+ /**
32
+ * List all conversation sessions between the calling user and all accessible Agents that were created by this client.
33
+ * Sessions are returned in order of most recently updated first.
34
+ *
35
+ * @beta
36
+ *
37
+ * Required Scopes: [api:aip-agents-write]
38
+ * URL: /v2/aipAgents/agents/allSessions
39
+ */
40
+ export function allSessions($ctx, ...args) {
41
+ return $foundryPlatformFetch($ctx, _allSessions, ...args);
42
+ }
30
43
  //# sourceMappingURL=Agent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Agent.js","names":["foundryPlatformFetch","$foundryPlatformFetch","_get","get","$ctx","args"],"sources":["Agent.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _get = [0, \"/v2/aipAgents/agents/{0}\", 2];\n/**\n * Get details for an AIP Agent.\n *\n * @alpha\n *\n * Required Scopes: [api:aip-agents-read]\n * URL: /v2/aipAgents/agents/{agentRid}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,oBAAoB,IAAIC,qBAAqB,QAAQ,8BAA8B;AAC5F;AACA,MAAMC,IAAI,GAAG,CAAC,CAAC,EAAE,0BAA0B,EAAE,CAAC,CAAC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,GAAGA,CAACC,IAAI,EAAE,GAAGC,IAAI,EAAE;EAC/B,OAAOJ,qBAAqB,CAACG,IAAI,EAAEF,IAAI,EAAE,GAAGG,IAAI,CAAC;AACrD","ignoreList":[]}
1
+ {"version":3,"file":"Agent.js","names":["foundryPlatformFetch","$foundryPlatformFetch","_get","get","$ctx","args","_allSessions","allSessions"],"sources":["Agent.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _get = [0, \"/v2/aipAgents/agents/{0}\", 2];\n/**\n * Get details for an AIP Agent.\n *\n * @beta\n *\n * Required Scopes: [api:aip-agents-read]\n * URL: /v2/aipAgents/agents/{agentRid}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _allSessions = [0, \"/v2/aipAgents/agents/allSessions\", 2];\n/**\n * List all conversation sessions between the calling user and all accessible Agents that were created by this client.\n * Sessions are returned in order of most recently updated first.\n *\n * @beta\n *\n * Required Scopes: [api:aip-agents-write]\n * URL: /v2/aipAgents/agents/allSessions\n */\nexport function allSessions($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _allSessions, ...args);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,oBAAoB,IAAIC,qBAAqB,QAAQ,8BAA8B;AAC5F;AACA,MAAMC,IAAI,GAAG,CAAC,CAAC,EAAE,0BAA0B,EAAE,CAAC,CAAC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,GAAGA,CAACC,IAAI,EAAE,GAAGC,IAAI,EAAE;EAC/B,OAAOJ,qBAAqB,CAACG,IAAI,EAAEF,IAAI,EAAE,GAAGG,IAAI,CAAC;AACrD;AACA,MAAMC,YAAY,GAAG,CAAC,CAAC,EAAE,kCAAkC,EAAE,CAAC,CAAC;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAACH,IAAI,EAAE,GAAGC,IAAI,EAAE;EACvC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEE,YAAY,EAAE,GAAGD,IAAI,CAAC;AAC7D","ignoreList":[]}
@@ -6,7 +6,7 @@ import type * as _AipAgents from "../_components.js";
6
6
  * List all versions for an AIP Agent.
7
7
  * Versions are returned in descending order, by most recent versions first.
8
8
  *
9
- * @alpha
9
+ * @beta
10
10
  *
11
11
  * Required Scopes: [api:aip-agents-read]
12
12
  * URL: /v2/aipAgents/agents/{agentRid}/agentVersions
@@ -22,7 +22,7 @@ export declare function list($ctx: $Client | $ClientContext | $OldClient | $OldC
22
22
  /**
23
23
  * Get version details for an AIP Agent.
24
24
  *
25
- * @alpha
25
+ * @beta
26
26
  *
27
27
  * Required Scopes: [api:aip-agents-read]
28
28
  * URL: /v2/aipAgents/agents/{agentRid}/agentVersions/{agentVersionString}
@@ -20,7 +20,7 @@ const _list = [0, "/v2/aipAgents/agents/{0}/agentVersions", 2];
20
20
  * List all versions for an AIP Agent.
21
21
  * Versions are returned in descending order, by most recent versions first.
22
22
  *
23
- * @alpha
23
+ * @beta
24
24
  *
25
25
  * Required Scopes: [api:aip-agents-read]
26
26
  * URL: /v2/aipAgents/agents/{agentRid}/agentVersions
@@ -32,7 +32,7 @@ const _get = [0, "/v2/aipAgents/agents/{0}/agentVersions/{1}", 2];
32
32
  /**
33
33
  * Get version details for an AIP Agent.
34
34
  *
35
- * @alpha
35
+ * @beta
36
36
  *
37
37
  * Required Scopes: [api:aip-agents-read]
38
38
  * URL: /v2/aipAgents/agents/{agentRid}/agentVersions/{agentVersionString}
@@ -1 +1 @@
1
- {"version":3,"file":"AgentVersion.js","names":["foundryPlatformFetch","$foundryPlatformFetch","_list","list","$ctx","args","_get","get"],"sources":["AgentVersion.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _list = [0, \"/v2/aipAgents/agents/{0}/agentVersions\", 2];\n/**\n * List all versions for an AIP Agent.\n * Versions are returned in descending order, by most recent versions first.\n *\n * @alpha\n *\n * Required Scopes: [api:aip-agents-read]\n * URL: /v2/aipAgents/agents/{agentRid}/agentVersions\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/aipAgents/agents/{0}/agentVersions/{1}\", 2];\n/**\n * Get version details for an AIP Agent.\n *\n * @alpha\n *\n * Required Scopes: [api:aip-agents-read]\n * URL: /v2/aipAgents/agents/{agentRid}/agentVersions/{agentVersionString}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,oBAAoB,IAAIC,qBAAqB,QAAQ,8BAA8B;AAC5F;AACA,MAAMC,KAAK,GAAG,CAAC,CAAC,EAAE,wCAAwC,EAAE,CAAC,CAAC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,IAAIA,CAACC,IAAI,EAAE,GAAGC,IAAI,EAAE;EAChC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEF,KAAK,EAAE,GAAGG,IAAI,CAAC;AACtD;AACA,MAAMC,IAAI,GAAG,CAAC,CAAC,EAAE,4CAA4C,EAAE,CAAC,CAAC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,GAAGA,CAACH,IAAI,EAAE,GAAGC,IAAI,EAAE;EAC/B,OAAOJ,qBAAqB,CAACG,IAAI,EAAEE,IAAI,EAAE,GAAGD,IAAI,CAAC;AACrD","ignoreList":[]}
1
+ {"version":3,"file":"AgentVersion.js","names":["foundryPlatformFetch","$foundryPlatformFetch","_list","list","$ctx","args","_get","get"],"sources":["AgentVersion.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _list = [0, \"/v2/aipAgents/agents/{0}/agentVersions\", 2];\n/**\n * List all versions for an AIP Agent.\n * Versions are returned in descending order, by most recent versions first.\n *\n * @beta\n *\n * Required Scopes: [api:aip-agents-read]\n * URL: /v2/aipAgents/agents/{agentRid}/agentVersions\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/aipAgents/agents/{0}/agentVersions/{1}\", 2];\n/**\n * Get version details for an AIP Agent.\n *\n * @beta\n *\n * Required Scopes: [api:aip-agents-read]\n * URL: /v2/aipAgents/agents/{agentRid}/agentVersions/{agentVersionString}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,oBAAoB,IAAIC,qBAAqB,QAAQ,8BAA8B;AAC5F;AACA,MAAMC,KAAK,GAAG,CAAC,CAAC,EAAE,wCAAwC,EAAE,CAAC,CAAC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,IAAIA,CAACC,IAAI,EAAE,GAAGC,IAAI,EAAE;EAChC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEF,KAAK,EAAE,GAAGG,IAAI,CAAC;AACtD;AACA,MAAMC,IAAI,GAAG,CAAC,CAAC,EAAE,4CAA4C,EAAE,CAAC,CAAC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,GAAGA,CAACH,IAAI,EAAE,GAAGC,IAAI,EAAE;EAC/B,OAAOJ,qBAAqB,CAACG,IAAI,EAAEE,IAAI,EAAE,GAAGD,IAAI,CAAC;AACrD","ignoreList":[]}
@@ -0,0 +1,20 @@
1
+ import type * as _Core from "@osdk/foundry.core";
2
+ import type { SharedClient as $OldClient, SharedClientContext as $OldClientContext } from "@osdk/shared.client";
3
+ import type { SharedClient as $Client, SharedClientContext as $ClientContext } from "@osdk/shared.client2";
4
+ import type * as _AipAgents from "../_components.js";
5
+ /**
6
+ * Get the conversation content for a session between the calling user and an Agent.
7
+ *
8
+ * @beta
9
+ *
10
+ * Required Scopes: [api:aip-agents-read]
11
+ * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/content
12
+ */
13
+ export declare function get($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
14
+ agentRid: _AipAgents.AgentRid,
15
+ sessionRid: _AipAgents.SessionRid,
16
+ $queryParams?: {
17
+ preview?: _Core.PreviewMode | undefined;
18
+ }
19
+ ]): Promise<_AipAgents.Content>;
20
+ //# sourceMappingURL=Content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Content.d.ts","sourceRoot":"","sources":["../../../src/public/Content.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,KAAK,KAAK,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EACV,YAAY,IAAI,UAAU,EAC1B,mBAAmB,IAAI,iBAAiB,EACzC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,YAAY,IAAI,OAAO,EACvB,mBAAmB,IAAI,cAAc,EACtC,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAYrD;;;;;;;GAOG;AACH,wBAAgB,GAAG,CACjB,IAAI,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,iBAAiB,EAC/D,GAAG,IAAI,EAAE;IACP,QAAQ,EAAE,UAAU,CAAC,QAAQ;IAC7B,UAAU,EAAE,UAAU,CAAC,UAAU;IAEjC,YAAY,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,SAAS,CAAA;KAAE;CAC3D,GACA,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAE7B"}
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { foundryPlatformFetch as $foundryPlatformFetch } from "@osdk/shared.net.platformapi";
17
+ //
18
+ const _get = [0, "/v2/aipAgents/agents/{0}/sessions/{1}/content", 2];
19
+ /**
20
+ * Get the conversation content for a session between the calling user and an Agent.
21
+ *
22
+ * @beta
23
+ *
24
+ * Required Scopes: [api:aip-agents-read]
25
+ * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/content
26
+ */
27
+ export function get($ctx, ...args) {
28
+ return $foundryPlatformFetch($ctx, _get, ...args);
29
+ }
30
+ //# sourceMappingURL=Content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Content.js","names":["foundryPlatformFetch","$foundryPlatformFetch","_get","get","$ctx","args"],"sources":["Content.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _get = [0, \"/v2/aipAgents/agents/{0}/sessions/{1}/content\", 2];\n/**\n * Get the conversation content for a session between the calling user and an Agent.\n *\n * @beta\n *\n * Required Scopes: [api:aip-agents-read]\n * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/content\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,oBAAoB,IAAIC,qBAAqB,QAAQ,8BAA8B;AAC5F;AACA,MAAMC,IAAI,GAAG,CAAC,CAAC,EAAE,+CAA+C,EAAE,CAAC,CAAC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,GAAGA,CAACC,IAAI,EAAE,GAAGC,IAAI,EAAE;EAC/B,OAAOJ,qBAAqB,CAACG,IAAI,EAAEF,IAAI,EAAE,GAAGG,IAAI,CAAC;AACrD","ignoreList":[]}
@@ -0,0 +1,133 @@
1
+ import type * as _Core from "@osdk/foundry.core";
2
+ import type { SharedClient as $OldClient, SharedClientContext as $OldClientContext } from "@osdk/shared.client";
3
+ import type { SharedClient as $Client, SharedClientContext as $ClientContext } from "@osdk/shared.client2";
4
+ import type * as _AipAgents from "../_components.js";
5
+ /**
6
+ * Create a new conversation session between the calling user and an Agent.
7
+ * Use `blockingContinue` or `streamingContinue` to start adding exchanges to the session.
8
+ *
9
+ * @beta
10
+ *
11
+ * Required Scopes: [api:aip-agents-write]
12
+ * URL: /v2/aipAgents/agents/{agentRid}/sessions
13
+ */
14
+ export declare function create($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
15
+ agentRid: _AipAgents.AgentRid,
16
+ $body: _AipAgents.CreateSessionRequest,
17
+ $queryParams?: {
18
+ preview?: _Core.PreviewMode | undefined;
19
+ }
20
+ ]): Promise<_AipAgents.Session>;
21
+ /**
22
+ * List all conversation sessions between the calling user and an Agent that was created by this client.
23
+ * This does not list sessions for the user created by other clients.
24
+ * For example, any sessions created by the user in AIP Agent Studio will not be listed here.
25
+ * Sessions are returned in order of most recently updated first.
26
+ *
27
+ * @beta
28
+ *
29
+ * Required Scopes: [api:aip-agents-read]
30
+ * URL: /v2/aipAgents/agents/{agentRid}/sessions
31
+ */
32
+ export declare function list($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
33
+ agentRid: _AipAgents.AgentRid,
34
+ $queryParams?: {
35
+ pageSize?: _Core.PageSize | undefined;
36
+ pageToken?: _Core.PageToken | undefined;
37
+ preview?: _Core.PreviewMode | undefined;
38
+ }
39
+ ]): Promise<_AipAgents.ListSessionsResponse>;
40
+ /**
41
+ * Get the details of a conversation session between the calling user and an Agent.
42
+ *
43
+ * @beta
44
+ *
45
+ * Required Scopes: [api:aip-agents-read]
46
+ * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}
47
+ */
48
+ export declare function get($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
49
+ agentRid: _AipAgents.AgentRid,
50
+ sessionRid: _AipAgents.SessionRid,
51
+ $queryParams?: {
52
+ preview?: _Core.PreviewMode | undefined;
53
+ }
54
+ ]): Promise<_AipAgents.Session>;
55
+ /**
56
+ * Continue a conversation session with an Agent, or add the first exchange to a session after creation.
57
+ * Adds a new exchange to the session with the provided inputs, and generates a response from the Agent.
58
+ * Blocks on returning the result of the added exchange until the response is fully generated.
59
+ * Streamed responses are also supported; see `streamingContinue` for details.
60
+ * Concurrent requests to continue the same session are not supported.
61
+ * Clients should wait to receive a response before sending the next message.
62
+ *
63
+ * @beta
64
+ *
65
+ * Required Scopes: [api:aip-agents-write]
66
+ * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/blockingContinue
67
+ */
68
+ export declare function blockingContinue($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
69
+ agentRid: _AipAgents.AgentRid,
70
+ sessionRid: _AipAgents.SessionRid,
71
+ $body: _AipAgents.BlockingContinueSessionRequest,
72
+ $queryParams?: {
73
+ preview?: _Core.PreviewMode | undefined;
74
+ }
75
+ ]): Promise<_AipAgents.SessionExchangeResult>;
76
+ /**
77
+ * Continue a conversation session with an Agent, or add the first exchange to a session after creation.
78
+ * Adds a new exchange to the session with the provided inputs, and generates a response from the Agent.
79
+ * Returns a stream of the Agent response text (formatted using markdown) for clients to consume as the response is generated.
80
+ * On completion of the streamed response, clients can load the full details of the exchange that was added to the session by reloading the session content.
81
+ * Streamed exchanges also support cancellation; see `cancel` for details.
82
+ * Concurrent requests to continue the same session are not supported.
83
+ * Clients should wait to receive a response, or cancel the in-progress exchange, before sending the next message.
84
+ *
85
+ * @beta
86
+ *
87
+ * Required Scopes: [api:aip-agents-write]
88
+ * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/streamingContinue
89
+ */
90
+ export declare function streamingContinue($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
91
+ agentRid: _AipAgents.AgentRid,
92
+ sessionRid: _AipAgents.SessionRid,
93
+ $body: _AipAgents.StreamingContinueSessionRequest,
94
+ $queryParams?: {
95
+ preview?: _Core.PreviewMode | undefined;
96
+ }
97
+ ]): Promise<Blob>;
98
+ /**
99
+ * Cancel an in-progress streamed exchange with an Agent which was initiated with `streamingContinue`.
100
+ * Canceling an exchange allows clients to prevent the exchange from being added to the session, or to provide a response to replace the Agent-generated response.
101
+ * Note that canceling an exchange does not terminate the stream returned by `streamingContinue`; clients should close the stream on triggering the cancellation request to stop reading from the stream.
102
+ *
103
+ * @beta
104
+ *
105
+ * Required Scopes: [api:aip-agents-write]
106
+ * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/cancel
107
+ */
108
+ export declare function cancel($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
109
+ agentRid: _AipAgents.AgentRid,
110
+ sessionRid: _AipAgents.SessionRid,
111
+ $body: _AipAgents.CancelSessionRequest,
112
+ $queryParams?: {
113
+ preview?: _Core.PreviewMode | undefined;
114
+ }
115
+ ]): Promise<_AipAgents.CancelSessionResponse>;
116
+ /**
117
+ * Retrieve relevant [context](https://www.palantir.com/docs/foundry/agent-studio/core-concepts/#retrieval-context) for a user message from the data sources configured for the session.
118
+ * This allows clients to pre-retrieve context for a user message before sending it to the Agent with the `contextsOverride` option when continuing a session, to allow any pre-processing of the context before sending it to the Agent.
119
+ *
120
+ * @beta
121
+ *
122
+ * Required Scopes: [api:aip-agents-write]
123
+ * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/ragContext
124
+ */
125
+ export declare function ragContext($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
126
+ agentRid: _AipAgents.AgentRid,
127
+ sessionRid: _AipAgents.SessionRid,
128
+ $body: _AipAgents.RagContextSessionRequest,
129
+ $queryParams?: {
130
+ preview?: _Core.PreviewMode | undefined;
131
+ }
132
+ ]): Promise<_AipAgents.AgentSessionRagContextResponse>;
133
+ //# sourceMappingURL=Session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Session.d.ts","sourceRoot":"","sources":["../../../src/public/Session.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,KAAK,KAAK,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EACV,YAAY,IAAI,UAAU,EAC1B,mBAAmB,IAAI,iBAA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qB,CAAC,CAE3C;AAWD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,iBAAiB,EAC/D,GAAG,IAAI,EAAE;IACP,QAAQ,EAAE,UAAU,CAAC,QAAQ;IAC7B,UAAU,EAAE,UAAU,CAAC,UAAU;IACjC,KAAK,EAAE,UAAU,CAAC,wBAAwB;IAC1C,YAAY,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,SAAS,CAAA;KAAE;CAC3D,GACA,OAAO,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAEpD"}
@@ -0,0 +1,120 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { foundryPlatformFetch as $foundryPlatformFetch } from "@osdk/shared.net.platformapi";
17
+ //
18
+ const _create = [1, "/v2/aipAgents/agents/{0}/sessions", 3];
19
+ /**
20
+ * Create a new conversation session between the calling user and an Agent.
21
+ * Use `blockingContinue` or `streamingContinue` to start adding exchanges to the session.
22
+ *
23
+ * @beta
24
+ *
25
+ * Required Scopes: [api:aip-agents-write]
26
+ * URL: /v2/aipAgents/agents/{agentRid}/sessions
27
+ */
28
+ export function create($ctx, ...args) {
29
+ return $foundryPlatformFetch($ctx, _create, ...args);
30
+ }
31
+ const _list = [0, "/v2/aipAgents/agents/{0}/sessions", 2];
32
+ /**
33
+ * List all conversation sessions between the calling user and an Agent that was created by this client.
34
+ * This does not list sessions for the user created by other clients.
35
+ * For example, any sessions created by the user in AIP Agent Studio will not be listed here.
36
+ * Sessions are returned in order of most recently updated first.
37
+ *
38
+ * @beta
39
+ *
40
+ * Required Scopes: [api:aip-agents-read]
41
+ * URL: /v2/aipAgents/agents/{agentRid}/sessions
42
+ */
43
+ export function list($ctx, ...args) {
44
+ return $foundryPlatformFetch($ctx, _list, ...args);
45
+ }
46
+ const _get = [0, "/v2/aipAgents/agents/{0}/sessions/{1}", 2];
47
+ /**
48
+ * Get the details of a conversation session between the calling user and an Agent.
49
+ *
50
+ * @beta
51
+ *
52
+ * Required Scopes: [api:aip-agents-read]
53
+ * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}
54
+ */
55
+ export function get($ctx, ...args) {
56
+ return $foundryPlatformFetch($ctx, _get, ...args);
57
+ }
58
+ const _blockingContinue = [1, "/v2/aipAgents/agents/{0}/sessions/{1}/blockingContinue", 3];
59
+ /**
60
+ * Continue a conversation session with an Agent, or add the first exchange to a session after creation.
61
+ * Adds a new exchange to the session with the provided inputs, and generates a response from the Agent.
62
+ * Blocks on returning the result of the added exchange until the response is fully generated.
63
+ * Streamed responses are also supported; see `streamingContinue` for details.
64
+ * Concurrent requests to continue the same session are not supported.
65
+ * Clients should wait to receive a response before sending the next message.
66
+ *
67
+ * @beta
68
+ *
69
+ * Required Scopes: [api:aip-agents-write]
70
+ * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/blockingContinue
71
+ */
72
+ export function blockingContinue($ctx, ...args) {
73
+ return $foundryPlatformFetch($ctx, _blockingContinue, ...args);
74
+ }
75
+ const _streamingContinue = [1, "/v2/aipAgents/agents/{0}/sessions/{1}/streamingContinue", 3,, "application/octet-stream"];
76
+ /**
77
+ * Continue a conversation session with an Agent, or add the first exchange to a session after creation.
78
+ * Adds a new exchange to the session with the provided inputs, and generates a response from the Agent.
79
+ * Returns a stream of the Agent response text (formatted using markdown) for clients to consume as the response is generated.
80
+ * On completion of the streamed response, clients can load the full details of the exchange that was added to the session by reloading the session content.
81
+ * Streamed exchanges also support cancellation; see `cancel` for details.
82
+ * Concurrent requests to continue the same session are not supported.
83
+ * Clients should wait to receive a response, or cancel the in-progress exchange, before sending the next message.
84
+ *
85
+ * @beta
86
+ *
87
+ * Required Scopes: [api:aip-agents-write]
88
+ * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/streamingContinue
89
+ */
90
+ export function streamingContinue($ctx, ...args) {
91
+ return $foundryPlatformFetch($ctx, _streamingContinue, ...args);
92
+ }
93
+ const _cancel = [1, "/v2/aipAgents/agents/{0}/sessions/{1}/cancel", 3];
94
+ /**
95
+ * Cancel an in-progress streamed exchange with an Agent which was initiated with `streamingContinue`.
96
+ * Canceling an exchange allows clients to prevent the exchange from being added to the session, or to provide a response to replace the Agent-generated response.
97
+ * Note that canceling an exchange does not terminate the stream returned by `streamingContinue`; clients should close the stream on triggering the cancellation request to stop reading from the stream.
98
+ *
99
+ * @beta
100
+ *
101
+ * Required Scopes: [api:aip-agents-write]
102
+ * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/cancel
103
+ */
104
+ export function cancel($ctx, ...args) {
105
+ return $foundryPlatformFetch($ctx, _cancel, ...args);
106
+ }
107
+ const _ragContext = [2, "/v2/aipAgents/agents/{0}/sessions/{1}/ragContext", 3];
108
+ /**
109
+ * Retrieve relevant [context](https://www.palantir.com/docs/foundry/agent-studio/core-concepts/#retrieval-context) for a user message from the data sources configured for the session.
110
+ * This allows clients to pre-retrieve context for a user message before sending it to the Agent with the `contextsOverride` option when continuing a session, to allow any pre-processing of the context before sending it to the Agent.
111
+ *
112
+ * @beta
113
+ *
114
+ * Required Scopes: [api:aip-agents-write]
115
+ * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/ragContext
116
+ */
117
+ export function ragContext($ctx, ...args) {
118
+ return $foundryPlatformFetch($ctx, _ragContext, ...args);
119
+ }
120
+ //# sourceMappingURL=Session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Session.js","names":["foundryPlatformFetch","$foundryPlatformFetch","_create","create","$ctx","args","_list","list","_get","get","_blockingContinue","blockingContinue","_streamingContinue","streamingContinue","_cancel","cancel","_ragContext","ragContext"],"sources":["Session.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _create = [1, \"/v2/aipAgents/agents/{0}/sessions\", 3];\n/**\n * Create a new conversation session between the calling user and an Agent.\n * Use `blockingContinue` or `streamingContinue` to start adding exchanges to the session.\n *\n * @beta\n *\n * Required Scopes: [api:aip-agents-write]\n * URL: /v2/aipAgents/agents/{agentRid}/sessions\n */\nexport function create($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _create, ...args);\n}\nconst _list = [0, \"/v2/aipAgents/agents/{0}/sessions\", 2];\n/**\n * List all conversation sessions between the calling user and an Agent that was created by this client.\n * This does not list sessions for the user created by other clients.\n * For example, any sessions created by the user in AIP Agent Studio will not be listed here.\n * Sessions are returned in order of most recently updated first.\n *\n * @beta\n *\n * Required Scopes: [api:aip-agents-read]\n * URL: /v2/aipAgents/agents/{agentRid}/sessions\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/aipAgents/agents/{0}/sessions/{1}\", 2];\n/**\n * Get the details of a conversation session between the calling user and an Agent.\n *\n * @beta\n *\n * Required Scopes: [api:aip-agents-read]\n * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _blockingContinue = [1, \"/v2/aipAgents/agents/{0}/sessions/{1}/blockingContinue\", 3];\n/**\n * Continue a conversation session with an Agent, or add the first exchange to a session after creation.\n * Adds a new exchange to the session with the provided inputs, and generates a response from the Agent.\n * Blocks on returning the result of the added exchange until the response is fully generated.\n * Streamed responses are also supported; see `streamingContinue` for details.\n * Concurrent requests to continue the same session are not supported.\n * Clients should wait to receive a response before sending the next message.\n *\n * @beta\n *\n * Required Scopes: [api:aip-agents-write]\n * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/blockingContinue\n */\nexport function blockingContinue($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _blockingContinue, ...args);\n}\nconst _streamingContinue = [\n 1,\n \"/v2/aipAgents/agents/{0}/sessions/{1}/streamingContinue\",\n 3,\n ,\n \"application/octet-stream\",\n];\n/**\n * Continue a conversation session with an Agent, or add the first exchange to a session after creation.\n * Adds a new exchange to the session with the provided inputs, and generates a response from the Agent.\n * Returns a stream of the Agent response text (formatted using markdown) for clients to consume as the response is generated.\n * On completion of the streamed response, clients can load the full details of the exchange that was added to the session by reloading the session content.\n * Streamed exchanges also support cancellation; see `cancel` for details.\n * Concurrent requests to continue the same session are not supported.\n * Clients should wait to receive a response, or cancel the in-progress exchange, before sending the next message.\n *\n * @beta\n *\n * Required Scopes: [api:aip-agents-write]\n * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/streamingContinue\n */\nexport function streamingContinue($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamingContinue, ...args);\n}\nconst _cancel = [1, \"/v2/aipAgents/agents/{0}/sessions/{1}/cancel\", 3];\n/**\n * Cancel an in-progress streamed exchange with an Agent which was initiated with `streamingContinue`.\n * Canceling an exchange allows clients to prevent the exchange from being added to the session, or to provide a response to replace the Agent-generated response.\n * Note that canceling an exchange does not terminate the stream returned by `streamingContinue`; clients should close the stream on triggering the cancellation request to stop reading from the stream.\n *\n * @beta\n *\n * Required Scopes: [api:aip-agents-write]\n * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/cancel\n */\nexport function cancel($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _cancel, ...args);\n}\nconst _ragContext = [2, \"/v2/aipAgents/agents/{0}/sessions/{1}/ragContext\", 3];\n/**\n * Retrieve relevant [context](https://www.palantir.com/docs/foundry/agent-studio/core-concepts/#retrieval-context) for a user message from the data sources configured for the session.\n * This allows clients to pre-retrieve context for a user message before sending it to the Agent with the `contextsOverride` option when continuing a session, to allow any pre-processing of the context before sending it to the Agent.\n *\n * @beta\n *\n * Required Scopes: [api:aip-agents-write]\n * URL: /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/ragContext\n */\nexport function ragContext($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _ragContext, ...args);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,oBAAoB,IAAIC,qBAAqB,QAAQ,8BAA8B;AAC5F;AACA,MAAMC,OAAO,GAAG,CAAC,CAAC,EAAE,mCAAmC,EAAE,CAAC,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,MAAMA,CAACC,IAAI,EAAE,GAAGC,IAAI,EAAE;EAClC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEF,OAAO,EAAE,GAAGG,IAAI,CAAC;AACxD;AACA,MAAMC,KAAK,GAAG,CAAC,CAAC,EAAE,mCAAmC,EAAE,CAAC,CAAC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,IAAIA,CAACH,IAAI,EAAE,GAAGC,IAAI,EAAE;EAChC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEE,KAAK,EAAE,GAAGD,IAAI,CAAC;AACtD;AACA,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